My code has a classic startup written in assembly code that run the C main() function. Into the main() function i have: #ifdef RAM_RUN // Per la compilazione in RAM รจ necessario reimpostare // anche la zona degli interrupt (se usati...) SCB_MEMMAP = 2; #endif VIC_Init(); initTimer0(1000); // set up the timer0 enableIRQ(); while(1) ..... If i take a look into the main.lss i see: 40000000 <startup>: .section .startup, "ax" .code 32 .align 0 b _start 40000000: ea000083 b 40000214 <start> ldr pc, _undf 40000004: e59ff014 ldr pc, [pc, #20] ; 40000020 <_undf> ldr pc, _swi 40000008: e59ff014 ldr pc, [pc, #20] ; 40000024 <_swi> ldr pc, _pabt 4000000c: e59ff014 ldr pc, [pc, #20] ; 40000028 <_pabt> ldr pc, _dabt 40000010: e59ff014 ldr pc, [pc, #20] ; 4000002c <_dabt> nop 40000014: e1a00000 nop (mov r0,r0) ldr pc, [pc,#-0xFF0] So I think this it is correcty mapped ... My dubt is: when the interrupt is fired, the flow should go to 0x4000.0018 address to read the IRQ VIC address (0xFFFF.F030) containing the service routine. When the vectors are based on 0x0 (Flash) then pc,#-0xFF0 => 0xFFFF.F030 but when the vectors are based on 0x4000.000 (RAM) the difference is equal to 0x3FFF.F030 that's incorrect !! Thanks again !! --- In lpc2000@yahoogroups.com, 3gpabko <zdravko_k_d@...> wrote: > > When you have set MEMMAP=2 and an exception occurs the > ARM core will fetch from addresses 0x40000000 - > 0x4000001C instead of 0x00000000 - 0x0000001C. That's > why you have to be sure that before this happens you > already have at address 0x40000000 a correct Exception > Vectors Table. > With my tools I am doing this with manually written > code in the startup file(reset handler) and linker > scripts. > > Regards > Zdravko > > --- stefano_m_a <stefano_mora@...> wrote: > > > MEMMAP=2 is not enought ?? > > > > Thanks !
Message
Re: Handling interrupts on RAM (debug) version
2006-05-29 by stefano_m_a
Attachments
- No local attachments were found for this message.