I've successfully written a custom bootloader. Now I would like to integrate everything in one single project, so that I can write all with a single operation.
I am not sure this is possible but maybe someone with more experience may give me a suggestion.
The bootloader uses some standard libraries that are allocated in the .text segment
If .text is relocated in the bootloader area, the main program will not fit.
If, bootloader code is moved to a different segment - say .boot - and that segment is relocated, standard libraries will still be in .text and thus destroyed while the bootloader writes the new flash code.
To make everything work I would need to link some libraries twice - one copy that uses .text, the other relocated in the boot section.
Any ideas?? :shock: :?: