Monitor Mode Debugging Build Failed

Hello,

I am running into an issue with monitor mode debugging and am not sure how to fix it,. I followed the guide https://github.com/NordicPlayground/j-link-monitoring-mode-debugging and think I did most of it correctly, I included the 3 files in my project, added the code snippet to main.c (but it is still greyed out) the only thing I am not certain of is if I should be calling out the location of LinkerScript somewhere in my project's debug configuration?

My build output in debug mode is below:

Building ‘ovvi_pet_feeder’ from solution ‘ovvi_pet_feeder’ in configuration ‘Debug’
1> Linking ovvi_pet_feeder.elf
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.50/gcc/arm-none-eabi/bin/ld: Output/Debug/Obj/ovvi_pet_feeder/JLINK_MONITOR_ISR_SES.o: in function `DebugMon_Handler':
1> C:\nRF5_SDK_17.1.0_ddde560\examples\My Projects\faun-001-pet-feeder-firmware\OvviPetfeeder\USAFW\libraries/JLINK_MONITOR_ISR_SES.s:159: undefined reference to `JLINK_MONITOR_OnEnter'
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.50/gcc/arm-none-eabi/bin/ld: Output/Debug/Obj/ovvi_pet_feeder/JLINK_MONITOR_ISR_SES.o: in function `_WaitForJLinkCmd':
1> C:\nRF5_SDK_17.1.0_ddde560\examples\My Projects\faun-001-pet-feeder-firmware\OvviPetfeeder\USAFW\libraries/JLINK_MONITOR_ISR_SES.s:183: undefined reference to `JLINK_MONITOR_OnPoll'
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.50/gcc/arm-none-eabi/bin/ld: Output/Debug/Obj/ovvi_pet_feeder/JLINK_MONITOR_ISR_SES.o: in function `_HandleRestartCPU':
1> C:\nRF5_SDK_17.1.0_ddde560\examples\My Projects\faun-001-pet-feeder-firmware\OvviPetfeeder\USAFW\libraries/JLINK_MONITOR_ISR_SES.s:228: undefined reference to `JLINK_MONITOR_OnExit'
Build failed

Thank you in advance for your help

Matt

Parents Reply Children
  • Try adding CONFIG_JLINK_MONITOR_ENABLE=1 in your preprocessor definitions.

    I have never tried monitor mode debugging personally.

    That being said, the IDEs aren't always good at telling what is included in the project (so it is greyed out even though the compiler will include it). If your project builds, try adding some logging inside it and see if it prints to determine whether it is included or not. 

    If it doesn't build, can you please look into the build log? The first error message says:

    C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.50/gcc/arm-none-eabi/bin/ld: Output/Debug/Obj/ovvi_pet_feeder/JLINK_MONITOR_ISR_SES.o: in function `DebugMon_Handler':
    1> C:\nRF5_SDK_17.1.0_ddde560\examples\My Projects\faun-001-pet-feeder-firmware\OvviPetfeeder\USAFW\libraries/JLINK_MONITOR_ISR_SES.s:159: undefined reference to `JLINK_MONITOR_OnEnter'

    Is the JLINK_MONITOR_OnEnter function defined somewhere?

    Best regards,

    Edvin

Related