cancel
Showing results for 
Search instead for 
Did you mean: 

DAVE™

Markus_S
New Contributor
I would like to relocate the start-adress of an application program by modifying the linker-script in DAVE4.
For testing this I use the XMC2go board.

It is originally
MEMORY
{
FLASH(RX) : ORIGIN = 0x10001000, LENGTH = 0x10000
SRAM(!RX) : ORIGIN = 0x20000000, LENGTH = 0x4000
}


and afterwards:
MEMORY
{
FLASH(RX) : ORIGIN = 0x10005000, LENGTH = 0x5000
SRAM(!RX) : ORIGIN = 0x20000000, LENGTH = 0x4000
}


I now change the Debug-Configuration in the tab "Startup" and set the field "Set program counter at (hex)" to 10005000 as in the linker script.

After an flash-erase I'm not able to load, run and debug the Project any more. The flash seems to be programmed,
but debugging fails.

How can I run and debug an application from another Flash-Start adress than 10001000 ?
0 Likes
2 Replies
ncbs
Moderator
Moderator
Hi Markus,

I understand that the kit being used is XMC1100 XMC2GO kit - https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc_2go_xmc1100_v1/

Can you share the screenshot of all modified settings and other debug settings set for the project?

Regards,
Nikhil
0 Likes
Markus_S
New Contributor
The example is a very simple blinker project using PWM.
To start with, the linker script is default with application flash start at 0x10001000:

5377.attach

The debug-settings are also default:

5375.attach

This can, of coure, be flashed, run and debugged with DAVE4 as usual.

If the application is to be startet and debugged at another address (f.ex. 0x10005000) I do this:
Change linkerscript:

5376.attach

and in the debug configuration change "Set program counter" to 0x10005018 (the address of the reset-handler as seen in the .map-file:

5394.attach

If I now erase the flash (using JLink commander) and try to start and debug the application, the debug-view looks like this:
5395.attach

Obviously the debug configuration is inconsistent. But what has to be changed?
0 Likes
Top labels