File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -84,17 +84,30 @@ and developed.
84
84
85
85
### Firmware
86
86
87
- ```
87
+ Build the firmware using the following command. Firmware binary is the ` ./out/firmware.hex ` file.
88
+
89
+ ``` bash
88
90
BUILD_DIR=out make
89
91
```
90
92
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
+ ```
92
105
93
106
### Unittests
94
107
95
108
We can build every unittests and run them using the ` run ` target.
96
109
97
- ```
110
+ ``` bash
98
111
BUILD=ut BUILD_DIR=out/ut make run
99
112
```
100
113
Original file line number Diff line number Diff line change 1
1
program : $(firmware_BIN )
2
2
avrdude -c usbasp -p m8a -U flash:w:" $^" :i
3
3
4
+ program_fuses :
5
+ avrdude -c usbasp -p m8a -U lfuse:w:0xff:m -U hfuse:w:0xc9:m
6
+
4
7
reset :
5
8
avrdude -c usbasp -p m8a -U signature:r:-:h
6
9
7
- .PHONY : program reset
10
+ .PHONY : program reset program_fuses
You can’t perform that action at this time.
0 commit comments