Hello
I'm using a LPC2132 and is it possible to let the linker know, that it can't use a specific sector in flash?
The first 8 sector is each of 4 kB. The first sector is used for the bootloader and I would like to reserve sector 8 for persistent data.
Sector 1: Bootloader Sector 2-7: application sector 8: Data Sector 9: application
Is that possible, so linker don't use sector 8?
Alternative, I can reserve the first to sectors for bootloader and persistent data. But then I need somehow to debug the application without the bootloader, so I just can download the application to sector 3 and onward, but still be able to debug the application. How to let KEIL debugger do the jump to sector 3 for launching the main?'
/Thomas
As far as I know, RealView linker cannot do that. You'd have to manually place sections above and below the excluded sector. By the way, if I'm not mistaken, IAR linker can do that.
How to let KEIL debugger do the jump to sector 3 for launching the main?
This should be easy. Just use the uVision debug commands: http://www.keil.com/support/man/docs/uv4/uv4_debug_commands.htm Have a look at "GO", or maybe just "PC=0x1234" will do it. You can place debug commands in the debug script so they are run automatically at the start of each debug session.
Hi
Thanks for the answer. I though so about defining more flash area that can be used.
I have tried using the GO command or setting the program counter (PC). But that doesn't seems to work.
I have offset my program to sector 3 in the IROM1 area of KEIL and added the entry to the linker: --entry 0x2000
When Debug us hit and the GO command is used it cant debug it. PC is not in right spot.
Setting the PC to another address works well. But you have one other issue. If you are going to use any interrupts, then you need to store the interrupt vector table information at one of the locations your specific processor supports, since the processor do not know anything about what start address you download and run your application from.