This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugging an aplication in External Flash on AT91M42800A?

Hello.
Is there any way to debug a programm located in external flash (at EBI Bus)?
This CPU boots from external bus device at adres 0x0 (external flash).
Then it needs an ebi bus initialization and Memory Remap to know its other bus devices.
After remap, device adresses are different: eg the external flash after remap is at adress 0x0100.. external ram is at 0x02000..

actually i'm able to programm Flash and debug from External Ram.

But how can i debug a programm located in External Flash?
Following steps: ?
1st: flash download: flash download initialization script performs remap, and downloads the programm to flash
2nd: linker directive: replace the PC--> points at reset vector in external flash (flash start adress)
3rd: "REMAPPED" and "APP_IN_ROM" have to be defined for the startup script, so that exception vectors are copied to remapped adress of IRAM

$IF (APP_IN_ROM)
CODE_BASE       EQU     0x01000000
$ENDIF

$IF (APP_IN_XRAM)
CODE_BASE       EQU     0x02000000
$ENDIF

AREA   STARTUPCODE, CODE, AT CODE_BASE PUBLIC  __startup

// Copy Exception Vectors to Internal RAM ADR     R8, Vectors
$IF (REMAPPED)
MOV     R9, #RAM_Base (=0x003000...)
$ELSE
MOV     R9, #RAM_Boot (=0x000000...)
$ENDIF
....


so this application only runs, if memory remap has been done before?

The Final Application has to be linked with "REMAPPED" undefined and "APP_IN_ROM" defined?

Is this correct or is there another way to debug an applicationn in external flash?

0