This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Suddenly can't debug

Moved to a new machine and now can't debug. I suppose I've overlooked something. First, Segger doesn't recognize that it has just compiled the app and asks to recompile.  Then I get an "Invalid ELF file" message referencing the SPM.  Any pointers on this would appreciated.  Thanks.

Parents
  •           

    We've been able to find the root cause. The order of the elf files is extremely important - they must be in the correct address order, as in the image flashed at address 0x0 must come first, thereafter the second lower image, and so forth. 

    In asset_tracker this means the following order must be present in order for symbol loading to work correctly, and hence placing of breakpoints from source code.

    Please go to Project -> Options -> Debugger.

    And then change the order to this (see image below):

    Debug Symbols File [0]: $(ProjectDir)/mcuboot/zephyr/zephyr.elf

    Debug Symbols File [1]: $(ProjectDir)/spm/zephyr/zephyr.elf

    Debug Symbols File [2]: $(ProjectDir)/zephyr/zephyr/zephyr.elf

    Please try this and confirm that debugging now works in SES. 

    Note: This workaround lets you debug your application but not mcuboot or spm, so it's only a temporary solution. 

Reply
  •           

    We've been able to find the root cause. The order of the elf files is extremely important - they must be in the correct address order, as in the image flashed at address 0x0 must come first, thereafter the second lower image, and so forth. 

    In asset_tracker this means the following order must be present in order for symbol loading to work correctly, and hence placing of breakpoints from source code.

    Please go to Project -> Options -> Debugger.

    And then change the order to this (see image below):

    Debug Symbols File [0]: $(ProjectDir)/mcuboot/zephyr/zephyr.elf

    Debug Symbols File [1]: $(ProjectDir)/spm/zephyr/zephyr.elf

    Debug Symbols File [2]: $(ProjectDir)/zephyr/zephyr/zephyr.elf

    Please try this and confirm that debugging now works in SES. 

    Note: This workaround lets you debug your application but not mcuboot or spm, so it's only a temporary solution. 

Children
No Data
Related