Forum : ARM
Original Post
Post Information | Post |
---|---|
March 14, 2007 - 7:08pm
|
Greatly appreciate vincent 's help in the past. Here is another question. The code size in my project is less than 256K. In order to introduce code redundancy and In-field programming during the operation with the device, I need to pack two copies of the code image in the 512K flash memory. System boot starts from the 32K secondary flash and will jump to any one of the two copies of code images. With your experiences, is it feasible to do that? Among the startup code, linker scripts or external HEX or BIN manipulating software, which area I should pay special attention to? Thanks greatly again, Jim |
Hi,
Actually, you could do it by modifying the linker script (define two sections of Flash instead of one, etc.) or with hex or bin manipulations, as you prefer. (You'll probably have to modify the startup in any case)
Doing it in the linker script is "the right and clean way", which means it is nicer and easier to maintain in the future, but you'll have to take time to read the linker documentation.
Doing it with hex manipulations is "the quick and dirty way", which means it will probably be faster and easier to implement, but will not look very nice and might be harder to maintain or use as basis for other projects.
So it's your choice, in the end. However, I recommend not to mix the two options.
In any case, the debugger might get confused by this kind of unusual manipulations, but I think there will be less chance for that with the linker script option. (just a guess)
Best Regards,
Vincent
thanks vincent again for your inputs.
I will study the linker scripts and do it properly.
Cheers!
Jim