Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
processer
Commits
35570f3d
Commit
35570f3d
authored
May 29, 2018
by
Anders Blomdell
Browse files
Enable running from top level directory
parent
a5f94afc
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
35570f3d
*/avr/compiled
\ No newline at end of file
*/avr/compiled
*~
\ No newline at end of file
Makefile
0 → 100644
View file @
35570f3d
all
:
@
echo
"Do 'make PROCESS.LOAD' or 'make PROCESS.FUSE'"
>
&2
@
echo
"where PROCESS is one of"
>
&2
@
for
m
in
*
/
*
/Makefile
;
do
\
echo
"
$$
(dirname
$$
(dirname
$$
m))"
>
&2
\
;
done
@
echo
>
&2
@
exit
1
%.LOAD
:
make
-C
$*
/avr
$@
%.FUSE
:
make
-C
$*
/avr
$@
README.md
View file @
35570f3d
Software for processes used at Department of Automatic Control
==============================================================
batch-2002
How to (re)program a chip
=========================
Clone this repository and change to the top level directory, then
*
If it's the first time this chip is programmed, the fuse bits
need to be programmed, this is done by running
`make PROCESS_NAME.FUSE`
*
Program the chip by running
`make PROCESS_NAME.LOAD`
lib/avr/Makefile.common
View file @
35570f3d
...
...
@@ -68,12 +68,27 @@ OBJECTS=$($(1).C:%=compiled/$(1)/%.o)
-U
flash:w:compiled/
$(TARGET)
/
$*
.sr:s
%.FUSE
:
[
-n
"
$
(
$(TARGET)
.FUSE_L)"
]
&&
avrdude
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
lfuse:w:
$
(
$(TARGET)
.FUSE_L
)
:m
||
true
[
-n
"
$
(
$(TARGET)
.FUSE_H)"
]
&&
avrdude
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
hfuse:w:
$
(
$(TARGET)
.FUSE_H
)
:m
||
true
[
-n
"
$
(
$(TARGET)
.FUSE_E)"
]
&&
avrdude
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
efuse:w:
$
(
$(TARGET)
.FUSE_E
)
:m
||
true
@
if
[
-n
"
$
(
$(TARGET)
.FUSE_L)"
]
;
then
\
echo
avrdude
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
lfuse:w:
$
(
$(TARGET)
.FUSE_L
)
:m
>
&2
\
;
avrdude
-qq
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
lfuse:w:
$
(
$(TARGET)
.FUSE_L
)
:m
\
||
(
echo
"failed to program FUSE_L with
$
(
$(TARGET)
.FUSE_L)"
>
&2
&&
exit
1
)
\
;
fi
@
if
[
-n
"
$
(
$(TARGET)
.FUSE_H)"
]
;
then
\
echo
avrdude
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
hfuse:w:
$
(
$(TARGET)
.FUSE_H
)
:m
>
&2
\
;
avrdude
-qq
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
hfuse:w:
$
(
$(TARGET)
.FUSE_H
)
:m
\
||
(
echo
"failed to program FUSE_H with
$
(
$(TARGET)
.FUSE_H)"
>
&2
&&
exit
1
)
\
;
fi
@
if
[
-n
"
$
(
$(TARGET)
.FUSE_E)"
]
;
then
\
echo
avrdude
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
efuse:w:
$
(
$(TARGET)
.FUSE_E
)
:m
>
&2
\
;
avrdude
-qq
-P
usb
-c
avrisp2
-p
$(CHIP)
\
-U
efuse:w:
$
(
$(TARGET)
.FUSE_E
)
:m
\
||
(
echo
"failed to program FUSE_E with
$
(
$(TARGET)
.FUSE_E)"
>
&2
&&
exit
1
)
\
;
fi
%.FUSE_uisp
:
exit
1
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment