Hi!
I am writing a bootloader for the RM44 and I have 2 questions about the F021 library:
Question 1:
Provided the bootloader will help install new versions of the application and never a new bootloader, does only the F021 library need to run from RAM, or must the whole bootloader program run from RAM?
E.g:
Bootloader is in flash, bank 0, sector 0
Application is in flash, bank 0, sector 1 to 15.
F021 is stored in flash, bank 0, sector 0, but runs from RAM.
I assume:
I can run the bootloader from flash, but F021 must be stored in flash, copied to RAM before use, and the linker must link to RAM location of F021. The bootloader will then be able to utilize F021 to write to other sectors than its own. Is this assumption correct?
Question 2:
Must the "copy from ROM to RAM" functions be in assembly code? All the examples I see does this, but if it's done after stack has been set up and it's just for a library, surely the memory copying must be possible to do in C code?
I have been browsing through some questions here on the forum and also through your bootloader examples and app notes, but my brain is a tad too slow to figure these things out. Hope you can help, thank you.