Open kiiv-cz opened 3 months ago
Fuses are usually set by options in the platformio.ini file as documented here. Setting the fuses manually elsewhere can have unforeseen consequences.
What fuse were you unable to set correctly?
My aim is creating single production file (= elf) that contains code + eeprom and fuses so my coworker can just run Quick Programming tool from Microchip studio and not care about anything.
I can pass those fuses into program as defines to have it consistent (but only with magic numbers), however it still can't be present inside of hex (or I could use avrdude v8 that now supports flashing everything inside single file - released recently).
Another way is another env with purpose only generate production file as changing platform localy will work only until it gets updated.
I'm getting error:
avrdude error: address 0x820009 out of range at line 665 of .pio\build\test_fuses_in_elf\firmware.hex
caused by having C source file containing FUSES setting (src/fuses.c):
Fix is adding "-R" ".fuse" into ElfToHex Builder builder/main.py#L129:
Another workaround is using custom upload protocol and just copy hex file to CURIOSITY NANO drive:
Board: Curiosity Nano DB / AVRxDB (but should be valid for any supported MCU) Plaform version: 1.9.0