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

SEGGER Embedded Studio and Monitor Mode Debugging

So I've been following these blogs on getting Monitor Mode Debugging working with SEGGER Embedded Studio: devzone.nordicsemi.com/.../ and devzone.nordicsemi.com/.../

These blogs state it is necessary to amend the start-up file to define DebugMon_Handler. There are included some amended start-up files with the blog posts but none for SEGGER Embedded Studio that I can see. One is labelled "arm_startup_nrf52.s" and the other "iar_startup_nrf52.s".

The start-up file for SES comes in the package which is installed by the package manager in SES. It is called "nrf_startup.s" and I appear to have the latest package installed. It looks so very different from the amended start-up files included in the blog posts above that I am not sure what needs to be changed to define DebugMon_Handler in it.

Could someone please provide further guidance?

  • Hello,

    In order to get MMD up and running under Segger Embedded Studio (SES), you will need the following files (in addition to your main application code):

    JLINK_MONITOR.c - contains the definitions of the mmd routines (in file JLink_Monitor_Code.zip of the original blog post that you referenced & nRF5x-MMD-led-btn-example.zip in the Part 2 blog)

    JLINK_MONITOR.h - contains the declarations of the mmd routines (in file JLink_Monitor_Code.zip of the original blog post that you referenced & nRF5x-MMD-led-btn-example.zip in the Part 2 blog)

    JLINK_MONITOR_ISR_SES.s - contains the SES specific asm code which drive the mmd routines referenced in the above files when the Debugmon interrupt is triggered (in file JLink_Monitor_Code.zip of the original blog post that you referenced & nRF5x-MMD-led-btn-example.zip in the Part 2 blog)

    ses_nrf52_startup.s - contains the SES specific definition for the vector table with DebugMon_Handler entry (in file nRF5x-MMD-led-btn-example.zip in the Part 2 blog)

    Please respond back if you experience any issue(s) with the above or getting MMD working correctly.

    Regards

  • arm_startup_nrf52.s and iar_startup_nrf52.s are the startup files for the Keil and IAR IDEs respectively, and will not work with Embedded Studio.

    Use the nRF Package in Embedded Studio like you already are. You don't need to modify nrf_startup.s as this is not where the exceptions/interrupts are defined in Embedded Studio. You need to modify $(DeviceVectorsFile) which is in the same System Files/ folder as nRF_Startup.s. Basically all you need to do is make sure DebugMon_Handler is defined as the other ISRs. But here is my file, you can check against it or just use it: nrf52_Vectors.s

    -Mike

Related