IMPORTANT: Infineon Forums currently doesn’t allow sign-in & registrations to prepare for the upcoming transition. To learn more, check out our announcement.
Results 1 to 3 of 3

Thread: Rund and Debug from another Flash location

  1. #1
    Beginner Beginner Markus S. is on a distinguished road
    Join Date
    Jan 2020
    Location
    Switzerland
    Posts
    16
    Points
    96.25

    Run and Debug from another Flash location

    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 ?
    Last edited by Markus S.; Sep 10th, 2021 at 04:26 AM. Reason: more precisely

  2. #2
    Intermediate Intermediate
    Infineon Employee
    Infineon Employee
    ncbs is on a distinguished road
    Join Date
    May 2021
    Posts
    13
    Points
    320
    Hi Markus,

    I understand that the kit being used is XMC1100 XMC2GO kit - https://www.infineon.com/cms/en/prod...go_xmc1100_v1/

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

    Regards,
    Nikhil
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    Beginner Beginner Markus S. is on a distinguished road
    Join Date
    Jan 2020
    Location
    Switzerland
    Posts
    16
    Points
    96.25
    The example is a very simple blinker project using PWM.
    To start with, the linker script is default with application flash start at 0x10001000:

    Click image for larger version

Name:	linker_default.PNG
Views:	0
Size:	17.3 KB
ID:	5974

    The debug-settings are also default:

    Click image for larger version

Name:	debug_default.PNG
Views:	0
Size:	30.5 KB
ID:	5975

    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:

    Click image for larger version

Name:	linker_new.PNG
Views:	0
Size:	13.5 KB
ID:	5976

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

    Click image for larger version

Name:	debug_new.PNG
Views:	0
Size:	25.3 KB
ID:	5977

    If I now erase the flash (using JLink commander) and try to start and debug the application, the debug-view looks like this:
    Click image for larger version

Name:	degug_view.PNG
Views:	2
Size:	71.8 KB
ID:	5978

    Obviously the debug configuration is inconsistent. But what has to be changed?

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.