Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
1 year ago.
why mbed application won't work when compiled to another flash location? (LPC11U68)
Hello, I'm trying to develop a LPC11U68 Bootloader program.
My configurations are... - User application located at memory location from 0x0000 - 0x7FFF. - Bootloader application starting at memory location of 0x8000.
I compiled the User application code by first using the mbed Online compiler, and then export the project to Keil uVision. The User application works fines. everything is ok. and I designed the function to "Jump" to execute the bootloader code. which resides in 0x8000 address on the flash memory.
and for the Bootloader application. I also exported the project from the mbed Online compiler to Keil uVision too. and then use the "Config flash tools" to edit the location on flash of the code to be 0x8000 instead of 0x0000
and another configurations that i have adjusted are... - I edit the scatter file (.sct) > LR_IROM1 0x00008000 0x38000 and ER_IROM1 0x00008000 0x38000 - I edited the options > predefine="-DMBED_ROM_START=0x8000" on the "Misc controls" in the "Linker" tab - The other options (Clock settings, Compiler options) of both projects are the same.
The user application works fine. but when it jumps to the Bootloader application (that was created by exporting mbed Online compiler projects to Keil uVision) which resides at memory location 0x8000 it doesn't work!
But when i try with the simple blinky projects file that created originally from Keil (Using CMSIS core, No mbed). and put it at location 0x8000 . The jump successfully and the blinky code run perfectly after that.
I've checked this thread : https://os.mbed.com/questions/3022/MBED-code-fails-to-run-when-compiled-in-/ My problem is similar (or maybe IDENTICAL) to him. but i don't know how to solve it for the LPC11U68 Chip
and I would really appreciate help from anyone that may have gotten this to work too.