A cute little module that comes with its own LiPo charger and does all what a UNO can do.
I have a simple requirement : To erase the boot loader and directly make the MCU start my code as the 2 sec boot loader delay annoys the user when powering the unit to read a RFID tag. As soon as they press the power button, nothing seems to happen and then try to press again releasing it ... a real mess.
I know i can use another UNO as an ISP and using the SPI interface download the boot loader code. I regularly do this based on the excellent resource from here https://www.gammon.com.au/bootloader
Now my question is how to prepare my sketch for this process and load it to the target MCU ? What about the fuses that need to be set ?
Nothing special with the sketch. It is same. Once the sketch is uploaded via ISP the bootloader is removed. The only thing you have to change is fuse to boot from adress 0 instead of bootloader region.
If the sketch is already uploaded you have to just change high fuse from 0xDE to 0xD9 (ATmega328P) which tells that the boot region has size 0 and default reset vector.
It is possible to just do a Sketch > Upload Using Programmer to compile and upload your sketch to the board, overwriting the bootloader. That should work fine, even though the fuses will be configured for a bootloader.
If you want to set the fuses correctly, the easiest way is to use MiniCore:
Install MiniCore following the instructions at the above link.