Sep 09, 2021
12:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 09, 2021
12:01 AM
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 ?
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 ?
- Tags:
- IFX
- xmc2go dave4
2 Replies
Sep 14, 2021
11:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 14, 2021
11:49 PM
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
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
Sep 16, 2021
05:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 16, 2021
05:00 AM
The example is a very simple blinker project using PWM.
To start with, the linker script is default with application flash start at 0x10001000:
The debug-settings are also default:
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:
and in the debug configuration change "Set program counter" to 0x10005018 (the address of the reset-handler as seen in the .map-file:
If I now erase the flash (using JLink commander) and try to start and debug the application, the debug-view looks like this:
Obviously the debug configuration is inconsistent. But what has to be changed?
To start with, the linker script is default with application flash start at 0x10001000:
The debug-settings are also default:
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:
and in the debug configuration change "Set program counter" to 0x10005018 (the address of the reset-handler as seen in the .map-file:
If I now erase the flash (using JLink commander) and try to start and debug the application, the debug-view looks like this:
Obviously the debug configuration is inconsistent. But what has to be changed?