We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
As I understand we must define both RAM_MODE and REMAP in ASM settings, but what about the linker settings ?
Here is what I have gotten to work, but it is a bit different from your question. I load the code as normal (not from RAM). I then use something like what was posted on Keil's site as a "MAP" problem someone was having. My first call in main is to copy_vectors. unsigned char vectors[64] __at 0x40000000; // reserve space for IRQ vectors void copy_vectors (void) { memcpy (vectors, 0, 64); // copy original IRQ vectors to RAM MEMMAP = 2; // fetch vectors from RAM } You can do this in your startup file as well, but I don't bother. Basically copy the bytes representing your handlers into RAM and then tell the code to run in RAM. Note: I am unclear how you get all your code to run in RAM, but this handles the exception vectors. You should change your linker to not use RAM from at least up to 0x4000003F possibly more if you use ISP stuff. Hope some of that helps.
Thank you for your reply. I want to configure the IDE to do all the work and let ULINK to download the code into ram and start debugging.
Take a look to: C:\Keil\ARM\RV30\Boards\Keil\MCB2100\Blinky - Target MCB2100 RAM is configured for RAM execution. So see all the required settings for the IDE.
Reinhard : Do I need to define REMAP in ASM ? Regards Viktor
To remap the interrupt vectors to RAM on a Philips LPC2000 device, you need just to enter under Project - Options - Asm - DEFINE: RAM_MODE The startup file does then setup the MEMMAP register for RAM interrupt vectors. In addition you need for the debugger the file RAM.INI (which corrects the inital PC value). Take a look to the entry on the dialog Project - Options - Debug
In the startup.s file for this project (section included below) it appears that if 'REMAP' isn't set, then RAM_MODE isn't even checked (and the MEMMAP register is never set). So I think REMAP also needs to be defined. -------------------------------------------- ; Memory Mapping (when Interrupt Vectors are in RAM) MEMMAP EQU 0xE01FC040 ; Memory Mapping Control IF :DEF:REMAP LDR R0, =MEMMAP IF :DEF:RAM_MODE MOV R1, #2 ELSE MOV R1, #1 ENDIF STR R1, [R0] ENDIF