i have an sd card with a hex file and want to upload it to the arduino where i plug it in.
So i put an sd card in arduino and that arduino needs to program that file to its own flash.
my sdcard is fat32.
i already know 2boot but that needs fat 16 but it has to be fat32 for my project.
I think this is the best one because it is easy to install and is probably the most active of the SD card bootloader projects. There is no serial upload capability at this time though so that is an advantage of 2boots over avr_boot. GitHub - zevero/avr_boot: Arduino Bootloader to Flash from SD Card
If you look at the avr_boot page I linked there's a list of other options under the Thanks To and Alternatives sections. I haven't looked closely at these to see if any other than 2boots have serial support and fat32, maybe there is one there.
arduino123456789:
But i also need to import it in my project and call the function for uploading from my project.
I'm don't understand what that means. I don't think there is any way to load a hex file to flash while your program is running but you you can just do a reset to trigger the bootloader. Some bootloaders are only activated on hardware reset but if you needed to modify one to also work with watchdog reset that shouldn't be too difficult.