Notifications
Clear all

Flash hex file with bootloader or without?  

  RSS
madoxlabs
(@madoxlabs)
Active Member
Flash hex file with bootloader or without?

I'm playing around with adding some extra debug output to the firmware to try to figure out my printer issues. I have the firmware building and exporting hex files, as explained in the github instructions.  Should I be flashing 'Firmware.ino.with_bootloader.prusa_einsy_rambo.hex' or 'Firmware.ino.prusa_einsy_rambo.hex' ?  

I don't want to put the board into a state where it is un-flashable. Hopefully, if it goes wrong, I can always flash back the official firmware. 

Best Answer by madoxlabs:

Yes, they had the same timestamp. 

I got an answer though - over USB should use the file without a bootloader.  Flashing via the ICSP pins should use the file with a bootloader

Posted : 29/04/2022 3:23 am
towlerg
(@towlerg)
Noble Member
RE: Flash hex file with bootloader or without?

I don't want to put the board into a state where it is un-flashable. Hopefully, if it goes wrong, I can always flash back the official firmware. 

Provided you don't overwrite the boot loader you're golden. If you do then you'll have to use a programmer, if it were Pic based (which it most defiantly is not) you'd need a PicKit2 or similar. I assume there must be that equivalent device(s) for a Mega.

Posted : 29/04/2022 9:05 am
madoxlabs
(@madoxlabs)
Active Member
Topic starter answered:
RE: Flash hex file with bootloader or without?

Thanks for the info 🙂 But, I still don't know: will one of these files overwrite the bootloader?  I'm not sure which file is safe to flash.

Posted : 29/04/2022 11:57 am
towlerg
(@towlerg)
Noble Member
RE: Flash hex file with bootloader or without?

Going by the name I would assume (and we all know how dangerous that can be) that 'Firmware.ino.with_bootloader.prusa_einsy_rambo.hex'  included the bootloader, so you'd use 'Firmware.ino.prusa_einsy_rambo.hex' where bootloader is intact. Can't say I've ever seen a compiler produce 2 object files. Just out of curiosity what are the files sizes?

Posted : 29/04/2022 6:21 pm
madoxlabs
(@madoxlabs)
Active Member
Topic starter answered:
RE: Flash hex file with bootloader or without?

Without bootloader is 623kb.  With bootloader is 621kb, which doesn't make a lot of sense haha.

I ended up connecting the Arduino IDE to the printer and using the Sketch > Upload command, which worked fine.  I don't know which file it chose to upload though!

Posted : 29/04/2022 6:34 pm
towlerg
(@towlerg)
Noble Member
RE: Flash hex file with bootloader or without?

Are you sure that these two files were produced by the same compiler run?

Posted : 29/04/2022 6:41 pm
madoxlabs
(@madoxlabs)
Active Member
Topic starter answered:
RE: Flash hex file with bootloader or without?

Yes, they had the same timestamp. 

I got an answer though - over USB should use the file without a bootloader.  Flashing via the ICSP pins should use the file with a bootloader

Posted : 29/04/2022 11:08 pm
towlerg
(@towlerg)
Noble Member
RE: Flash hex file with bootloader or without?

Academic now but very odd re files size.

Posted : 30/04/2022 9:28 am
Share: