| 154 | == Getting the firmware == |
| 155 | |
| 156 | For your convenience, you can always find the latest version of the firmware in FACTs SVN repository. |
| 157 | https://trac.fact-project.org/browser/firmware/FSC/FSC_firmware_version_from_20140318_1700.hex |
| 158 | Simply check out that file. |
| 159 | |
| 160 | == Flashing the hex-file == |
| 161 | In order to tell avrdude to write the hex-file into the MCUs flash memory, we use the **-U** option in the form: |
| 162 | |
| 163 | -U <memtype>:r|w|v:<filename>[:format]: |
| 164 | |
| 165 | In our case memtype is "flash", the want to write so we choose "w" next, and then we just give the filename, since the format can be inferred from that. |
| 166 | The entire session looks like this. |
| 167 | {{{ |
| 168 | dneise@NeiseLenovo:~/FSC_firmware_flash$ sudo avrdude -p m32 -c avrispmkII -P usb -U flash:w:FSC_firmware_version_from_20140318_1700.hex |
| 169 | |
| 170 | avrdude: AVR device initialized and ready to accept instructions |
| 171 | |
| 172 | Reading | ################################################## | 100% 0.00s |
| 173 | |
| 174 | avrdude: Device signature = 0x1e9502 |
| 175 | avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed |
| 176 | To disable this feature, specify the -D option. |
| 177 | avrdude: erasing chip |
| 178 | avrdude: reading input file "FSC_firmware_version_from_20140318_1700.hex" |
| 179 | avrdude: input file FSC_firmware_version_from_20140318_1700.hex auto detected as Intel Hex |
| 180 | avrdude: writing flash (4520 bytes): |
| 181 | |
| 182 | Writing | ################################################## | 100% 0.44s |
| 183 | |
| 184 | avrdude: 4520 bytes of flash written |
| 185 | avrdude: verifying flash memory against FSC_firmware_version_from_20140318_1700.hex: |
| 186 | avrdude: load data flash data from input file FSC_firmware_version_from_20140318_1700.hex: |
| 187 | avrdude: input file FSC_firmware_version_from_20140318_1700.hex auto detected as Intel Hex |
| 188 | avrdude: input file FSC_firmware_version_from_20140318_1700.hex contains 4520 bytes |
| 189 | avrdude: reading on-chip flash data: |
| 190 | |
| 191 | Reading | ################################################## | 100% 0.29s |
| 192 | |
| 193 | avrdude: verifying ... |
| 194 | avrdude: 4520 bytes of flash verified |
| 195 | |
| 196 | avrdude: safemode: Fuses OK (H:FF, E:D9, L:FE) |
| 197 | |
| 198 | avrdude done. Thank you. |
| 199 | }}} |
| 200 | |
| 201 | Congrats, you just flashed the FSC! |