I am a student Embedded systems and I am trying to make a small custom bootloader work on my LPC1758. What I am trying to do is flash my bootloader between 0x0000 and 0x8000. My next step (for testing purposes) is to flash my application after 0x8000. However, when I let the program run, It will crash when it jumps to the application address. (see image below.)
I had the feeling that I had to change my project memory settings. After some research and trials, I could't work it out. (first one is bootloader, second one is application)
Does anyone have an idea how I should set this up correctly?
Update: This is what I get back.
1) First please confirm the application can work well without bootloader.
2)Confirm bootloader program application image correctly.
3) Confirm bootloader can jump to application.
4) There is USB secondary bootloader for lpc1700, you can refer to the jump code :
5) And there is debug application with MCUXpresso IDE method:
Hi @Alice_Yang , Thanks for your reply! I would like to know more about the memory mapping. Should the application have a seperate size too? What I am trying is the following:
This works good. But when I try to flash my application with my custom software, the bootloader gives me UNDEFINED INSTRUCTION. I checked the .hex file and this is written correctly into the memory.
The flash size of application should 0x80000 - 0x8000, because the total size of flash is 0x80000 (512k),
bootloader uses 0x8000.
Hi @Alice_Yang ,
I have seperated the Flash size for bootloader and application.
Should this also be done for the RAM?
I still get this error at jump while debugging bootloader :
1) From your screenshot, it application size still 0x80000:
2) RAM needn't.