I want to debug the code using ICE. I must place the code to ext sram 0x62000000.But i found something strangely. When I place the code to cpu sram 0x20000000, It works well. I relink the code to 0x62000000,and download the code to ext sram 0x62000000,It can't run to main function. Another question,You said remap RAM to address 0 ,I have to enable the RAM remapping, therefore uncomment the GBLL remapping and GBLL remap_flash. Why not uncomment the GBLL remapping and GBLL remap_ram? uncomment remap_flash means remap cpu flash 0x400000000 to 0x0000, and does't remap cpu sram 0x20000000 to 0x0000. [ This message was edited by: dom on 09-03-2006 03:05 ]
ok I wrote some code to copy all the contents from the flash to ram... do I place this code before the GBLL remap? or is it the first instruction before the resethandler?
LDR R1, =FLASHBASE ;FLASH START ADDR LDR R2, =RAMB ;RAM STAR ADDR LDR R3, =RAML ;RAM END ADDR COPY CMP R2, R3 LDRLO R0,[R1],#4 STRLO R0,[R2],#4 BLO COPY well i want to start from flash====>copy to ram=====>remap ram to 0x0000
Here is my scat file. I want to download and debug my program to ext sram 0x62000000. I can't go to main function and the debug says ''DBT Warning 00135: Cannot set breakpoints in literal pools'' When i try to step to B __main. I don't what's wrong! When relink the program to cpu sram 0x20000000 It works well.
On 10-03-2006 at 09:58, Anonymous wrote: @Dom, could you send me your scatter file. @fixxer, You do not need to copy the code from FLASH to RAM by hand. With an appropriate scatter file the __main will copy the code from FLASH to RAM. Here an example of scatter file: FLASH 0x40000000 0x40000 { FLASH 0x40000000 { 71x_init.o (Init,+First) * (InRoot$$Sections) } RAM 0x20000000 0x10000000 { 71x_vect.o (Vect, +First) * (+RO) * (+RW) * (+ZI) } } In your init.s file you should have the following instruction at the beginning: Reset_Handler LDR pc, =NextInst NextInst NOP NOP NOP : : RAM_remapping B __main Regards. Hi what goes in * (InRoot$$Sections) ? I made some good progress, can boot from flash, but stack pointers seem to get confused, while running from flash.