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

nrf51-dk and nrf52-dk blinky with keil MDK-Lite 5.22 NOT doing breakpoints

Why can't I breakpoint or step blinky, using kiel MDK lite?

Comment --- I suggest Nordic do videos or provide exact steps for how to setup-run the base example (like Blinky) using the built in seggerob to breakpoint and step on a main development ide (keil or what else?).

FYI I am using Windows 10 Pro, with 2 cores, and 4gb of ram. I have recent nrf51-dk pca10028 2016.30 and nrf52-dk pca10040 2016.46 I using nRF5_SDK-12.2.0 examples\blinky\pca10028 or pca10040\blank\arm-no-packs\blinky I have the same problem with both evals

I can edit-modify blink rate, compile (see log output way below), and execute \nRF5_SDK-12.2.0\examples\peripheral\blinky\pca10028\blank\arm5_no_packs\blinky-pca10028

I do see a GUI red X error in nrf-delay.h on line 109 SUBS number_of_us,number_of_us, #1 the popup info says ... error: expected identifier error: use of undeclared label '#1 BNE Loop' By searching here it seems the above error may be some Keil compiler error which doesn't matter?, but this error does not exactly match any other posting I found. Is that OK?, who should fix that?

***** My big issue is -- I have tried and tried but I can not hit a breakpoint I have set in main.c or anywhere. I see the red dot breakpoint indicator but when I start the debug run I see the red dot become a circle with a exclamation point. I see the nrf51-dk board blinking away but no breakpoint.

Also Debug > Run, Stop Step, Run To Cursor,are all greyed out (not available) as blinky is running.

I have Options for Target 'nrf51422-xxac' set with ...

Target> Arm Compiler: Use Default Compiler version Output > Create Executable with Debug Information, Hex File, Browse Information C/C++ > PreProcessor Symbols Define: NRF51422 BOARD_PCA10028 BSP_DEFINES_ONLY NRF51 SWI_DISABLE0 Code Gen with Optimization of Level 3 or Level 0 makes no difference. Debug > use J-Link / J-Trace Cortex Target Driver setup FW: J-Link OB-SAM#U128-V2 compiled Nov 14 Port: SW Max Clock 50Khz ... I have also tried 500Khz and 1mhz makes no difference

I can do Project > Rebuild all target files and see this output

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Rebuild target 'nrf51422_xxac' compiling main.c... compiling boards.c... compiling nrf_drv_clock.c... compiling nrf_drv_common.c... compiling nrf_drv_uart.c... compiling nrf_nvic.c... compiling nrf_soc.c... compiling app_error.c... compiling app_error_weak.c... compiling app_timer.c... compiling app_util_platform.c... compiling hardfault_implementation.c... compiling nrf_assert.c... compiling sdk_errors.c... compiling nrf_log_backend_serial.c... compiling nrf_log_frontend.c... compiling RTT_Syscalls_KEIL.c... compiling SEGGER_RTT.c... compiling SEGGER_RTT_printf.c... assembling arm_startup_nrf51.s... compiling system_nrf51.c... linking... Program Size: Code=2354 RO-data=234 RW-data=36 ZI-data=2100
FromELF: creating hex file... "._build\nrf51422_xxac.axf" - 0 Error(s), 0 Warning(s). Build Time Elapsed: 00:00:09 Load "\\Mac\Home\Desktop\nRF5_SDK-12.2.0\examples\peripheral\blinky\pca10028\blank\arm5_no_packs\_build\nrf51422_xxac.axf" Set JLink Project File to "\Mac\Home\Desktop\nRF5_SDK-12.2.0\examples\peripheral\blinky\pca10028\blank\arm5_no_packs\JLinkSettings.ini"

  • JLink Info: Device "NRF51422_XXAC" selected.

JLink info:

DLL: V6.12i, compiled Feb 3 2017 15:24:41 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Nov 14 2016 16:58:29 Hardware: V1.00 S/N : 681553907

  • JLink Info: Debugger selects 50 kHz debug communication speed, which is below the min. speed for this device. Speed changed to 100 kHz
  • JLink Info: Found SWD-DP with ID 0x0BB11477
  • JLink Info: AP-IDR: 0x04770021, Type: AHB-AP
  • JLink Info: AHB-AP ROM: 0xF0000000 (Base addr. of first ROM table)
  • JLink Info: Found Cortex-M0 r0p0, Little endian.
  • JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
  • JLink Info: CoreSight components:
  • JLink Info: ROMTbl 0 @ F0000000
  • JLink Info: ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB471 ROM Table
  • JLink Info: ROMTbl 1 @ E00FF000
  • JLink Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
  • JLink Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
  • JLink Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
  • JLink Info: ROMTbl 0 [1]: 00002000, CID: B105900D, PID: 000BB9A3 ??? ROMTableAddr = 0xF0000000

Target info:

Device: nRF51422_xxAC VTarget = 3.300V State of Pins: TCK: 0, TDI: 1, TDO: 1, TMS: 1, TRES: 1, TRST: 1 Hardware-Breakpoints: 4 Software-Breakpoints: 8192 Watchpoints: 2 JTAG speed: 100 kHz

Erase Done. Programming Done. Verify OK. Application running ... Flash Load finished at 06:57:39

Related