Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

A *working* demo of Monitor Mode Debug (MMD) on SDK 15, please?

The zipped project attached to this blog doesn't say what SDK version it should work with - but it certainly doesn't work with v15.

https://devzone.nordicsemi.com/b/blog/posts/segger-embedded-studio-part-2-monitor-mode-debuggi

Having fixed the Include Paths (whose stupid idea was it to make them absolute?!), I can get the source to compile with SDK v15 - but the link fails:

cannot move location counter backwards (from fffffffffffffc00 to 0000000000000000)

The point at which this is flagged is:

__stack_load_start__ = __SRAM_segment_end__ - 1024;
.stack __SRAM_segment_end__ - 1024 (NOLOAD) : AT(__SRAM_segment_end__ - 1024)
{
__stack_start__ = .;
*(.stack .stack.*)
. = ALIGN(MAX(__stack_start__ + __STACKSIZE__ , .), 8);
}

What is wrong, and how to I fix it?

Parents
  • I've made a new tutorial for SDK14.2, and working on SDK15. 

    See https://github.com/NordicPlayground/j-link-monitoring-mode-debugging and the SDK14.2 branch.

  • Thanks.

    Could you clarify the question (above) about SetMonModeVTableAddr ?

    (to be pedantic, note that it's usually called "monitor mode" - rather than "monitoring mode")

    EDIT

    The SES tutorial also doesn't mention the  mon exec SetMonModeDebug=1 command

  • I'm not familiar with GDB, but SetMonModeDebug=1 should be place in the projects j-link setting file. The j-link will read this file at the beginning of each j-link dll session and use those settings. I'm assuming that "mon exec" is some sort of keyword to include the following keywords to the j-link settings file. 

  • I'm not familiar with GDB

    Neither am I!

    I'm not asking about GDB - just SES.

  • Aah, I forgot to document it.

    1. Open up the example project from the SDK14.2 branch.
    2. Right-click 'Project ble_app_blinky...' and choose 'Edit Options'.
    3. Select 'Debug' from the drop-down menu. (Common, Debug, Release).
    4. Go to Debug -> J-Link -> Additional J-Link Options. Double click to view or edit.
  • You're missing the point!

    The question was whether the option(s) are necessary - not how to specify them!

    And, in the case of the SetMonModeVTableAddr option, what value, exactly, has to be specified?

  • The application's vector table is at the start of the application's starting address in flash. In a SES project you'll find it in:
    Option for project -> Common -> Linker -> Section Placement Macros -> FLASH_START. 

Reply
  • The application's vector table is at the start of the application's starting address in flash. In a SES project you'll find it in:
    Option for project -> Common -> Linker -> Section Placement Macros -> FLASH_START. 

Children