Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b8dc61

Browse files
committed
New make target to program fuses bits
Also includes: * Corresponding documentation update
1 parent f769610 commit 0b8dc61

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,30 @@ and developed.
8484

8585
### Firmware
8686

87-
```
87+
Build the firmware using the following command. Firmware binary is the `./out/firmware.hex` file.
88+
89+
```bash
8890
BUILD_DIR=out make
8991
```
9092

91-
Firmware is the `./out/firmware.hex` file. To program micro with avrdude, we can do `make program`.
93+
To program using avrdude we run the following command.
94+
95+
```bash
96+
make program
97+
```
98+
99+
When programming a new microcontroller, we also need to program the required fuse bits. This can be
100+
using the following command
101+
102+
```bash
103+
make program_fuses
104+
```
92105

93106
### Unittests
94107

95108
We can build every unittests and run them using the `run` target.
96109

97-
```
110+
```bash
98111
BUILD=ut BUILD_DIR=out/ut make run
99112
```
100113

build/fw/avrdude.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
program: $(firmware_BIN)
22
avrdude -c usbasp -p m8a -U flash:w:"$^":i
33

4+
program_fuses:
5+
avrdude -c usbasp -p m8a -U lfuse:w:0xff:m -U hfuse:w:0xc9:m
6+
47
reset:
58
avrdude -c usbasp -p m8a -U signature:r:-:h
69

7-
.PHONY: program reset
10+
.PHONY: program reset program_fuses

0 commit comments

Comments
 (0)