![]() ![]() To ensure everything is kosher for the C code, I am having the code start in C with a main() function.Īll the rest of the assembly code is put in the usual. I am expecting that to "use up" the program memory page in $007E00 - $007FFF. Reset by the bootloader with a goto to the user application Reset these two instructions will be replaced ![]() section jumpUserSection, code, address(BOOTADDR-PAGESIZE) last 4 words are reserved for a goto statement to the user application last page of "user space" in program memory but that doesn't seem to be used anywhere). I didn't touch anything else (I noticed a statement " _CODE_BASE = 0x200 ". This should insure that nothing is written outside the region I want to save for the bootloader. Program (xr) : ORIGIN = 0x200, LENGTH = 0xAA00 to I started with the linker script p24HJ64GP202.gld, and changed the line: Hopefully this is useful to others as well, but first I would appreciate it if someone knowledgeable with linker scripts and sections could look over this and let me know if it is reasonable. ![]() I would like to use C and Asm in a bootloader, and am trying to learn how to use the linker scripts and sections correctly for this purpose. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |