My mbed Microcontroller contains multiple binaries. Which one will be loaded/run when I press reset?
The file with the newest timestamp will be loaded and run on reset. If you want to run a different binary, simply ensure that it has the newest timestamp. You can do this in Mac/Linux using the 'touch command.
In Windows XP its not quite as easy. There are freeware utilities to change the timestamp of a file. It is probably easier to make a new copy of the file you want to run, and delete the old one.
Note: If you swap the microcontroller between PC's with different clocks, you may see some unexpected results!
No tags
|
3 comments
Please login to post comments.
I am new to mBed but a very experienced embedded developer. My targets typically contain two pieces of software: a small image providing bootstrap loader and persistent configuration data in low memory and one or more application images stored higher in flash. It was a piece of cake to get the bootstrap/loader into the mBed, but now I need to load the application image *without erasing the bootloader*. Is there a way to tell the mBed to load one .bin file at the start of flash and another .bin file elsewhere (e.g. to 0x00008000)?
UPDATE: I implemented 2 solutions: 1) combine the bootstrap loader and the application image into a single .bin file using common cygwin and gcc tools (cat, sed, unix2dos, arm-elf-objcopy). Unfortunately this solution also wipes everything in flash between the bootloader and the application image which is where I store persistent configuration.
2) Use the bootstrap loader to load the application image via IAP.
The mBed is a nifty platform, especially for folks new to embedded development; for more experienced users, it would be nice if it supported loading .hex files in addition to binaries...hex files contain more information such as load addresses, sizes, etc. and would allow loading different regions of flash with different things.