I have a strange idea, but have totally no experience with bootloaders so wonder if it can be done at all.
I want to develop a datalogger that I can use to track were we have been while walking.
why: as a learning experience. So I do know I can just go to a chineese online store and buy zillion for 1/100th of the price my logger will cost, but I want to be using it as learning platform for myself.
Now I am going to put the whole thing in a box and only a mmc card slot and a USB connection will be accessible in the end.
As I want to keep the USB connection for debugging I would like to go the route of using the MMC card to update FW when needed.
I know Cliff has made a bootloader that can do that, so after I found that code that should be covered.
Now I am wondering if it is possible to have a bootloader present, but not starting through the bootloader at start-up of the processor.
So my idea is to have the processor start the normal user application and when the operator (I have LCD + keyboard) selects a programming option, the bootloader is started and then most likely starts reading the mmc to see if a valid hex is avaliable.
I think that involves not setting the bootrst fuse such that the bootloader is not activated at start-up and most likely also means I still have to set the section size to the correct one as to be able to have the SPM operation available. But I am wondering if this is possible at all.
another route could be that the bootloader will check a fixed location in the eeprom at start-up and if that does not hold a special character it will switch to user mode, but then I have to figure out how to make sure that that specific location is fixed defined as I will be storing more parameters in the eeprom and till now not have done anything other than just a struct that just has the names and the compiler can do with it what it wants.
So I hope someone can shed a bit of light on this as this is way beyond uncharted territory for me.