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

nRF51422 Won`t Debug with IAR Tools

I am trying to bring up a simple program on the IAR tool chain 7.40.1 using an I-Jet debugger using the nRFDK. I have this simple programming running under the Keil code limited version using the built in Segger debugger.

It compiles correctly and I can download it to the target but it won`t run past the second statement in main it just keeps running to this point if you free run with it as a breakpoint. If I free run I end up in the __exit function.

I am using SDK8.0.0 as the basis of my startup code and I have --drv_vector_table_base=0x0 in the Debugger Extra Options.

I attached my main.c file as a reference.

Thoughts as to why I can`t run?

Also, can I not single step with the nRF51422 and the I-Jet

main.c

Thanks, Darren

  • When the debugger is downloading data to the target I get this:

    Mon Mar 23, 2015 11:18:48: Loading the I-jet/JTAGjet driver 
    Mon Mar 23, 2015 11:18:48: Probe: Probe SW module ver 1.40 
    Mon Mar 23, 2015 11:18:48: Probe: Option: trace(Auto,size_limit=8M) 
    Mon Mar 23, 2015 11:18:48: Probe: I-jet-Trace SW module ver 1.31 
    Mon Mar 23, 2015 11:18:48: Probe: Found I-jet, SN=79707 
    Mon Mar 23, 2015 11:18:48: Probe: Opened connection to I-jet:79707 
    Mon Mar 23, 2015 11:18:48: Probe: USB connection verified (6581 packets/sec) 
    Mon Mar 23, 2015 11:18:48: Probe: I-jet, FW ver 4.2, HW Ver:A 
    Mon Mar 23, 2015 11:18:48: Probe: None or IJET-MIPI10 adapter detected 
    Mon Mar 23, 2015 11:18:48: Probe: Versions: JTAG=1.64 SWO=1.31 A2D=1.58 Stream=1.40 
    Mon Mar 23, 2015 11:18:48: EARM v.3.72 
    Mon Mar 23, 2015 11:18:48: Emulation layer version 3.72 
    Mon Mar 23, 2015 11:18:49: SWD clock detected: 12MHz 
    Mon Mar 23, 2015 11:18:49: Connected DAP on SWD. Detected IDCODE=0xbb11477. 
    Mon Mar 23, 2015 11:18:49: Connecting Cortex-M core ID = 0x4770021 on DAP port 0 
    Mon Mar 23, 2015 11:18:49: Recognized CPUID=0x410cc200 Cortex-M0 r0p0 arch ARMv6-M 
    Mon Mar 23, 2015 11:18:49: Debug resources: 4 instruction comparators, 2 data watchpoints. 
    Mon Mar 23, 2015 11:18:49: CPU status OK 
    Mon Mar 23, 2015 11:18:49: INFO: Configuring trace using 'Auto,size_limit=8M' setting ... 
    Mon Mar 23, 2015 11:18:49: CPU does not have TPIU - SWO cannot be enabled 
    Mon Mar 23, 2015 11:18:49: LowLevelReset(system, delay 200) 
    Mon Mar 23, 2015 11:18:49: CPU status - IN RESET 
    Mon Mar 23, 2015 11:18:49: CPU status OK 
    Mon Mar 23, 2015 11:18:50: Loaded debugee: C:\dbeckwith\Depot\650_NG\Debug\Exe\c.out 
    Mon Mar 23, 2015 11:18:50: The downloaded program doesn't seem to match the expected memory layout of the target system: 
    Mon Mar 23, 2015 11:18:50: Some SFRs are placed outside known memory areas, or in memory areas designated as read-only    or    as RAM: 
    Mon Mar 23, 2015 11:18:50:   POWER__TASKS_CONSTLAT @ 0x40000078, 32 bits 
    Mon Mar 23, 2015 11:18:50:   POWER__TASKS_LOWPWR @ 0x4000007C, 32 bits 
    Mon Mar 23, 2015 11:18:50:   POWER__EVENTS_POFWARN @ 0x40000108, 32 bits 
    Mon Mar 23, 2015 11:18:50:   POWER__INTENSET @ 0x40000304, 32 bits 
    Mon Mar 23, 2015 11:18:50:   POWER__INTENCLR @ 0x40000308, 32 bits 
    Mon Mar 23, 2015 11:18:50:   and more... 
    Mon Mar 23, 2015 11:18:50: Memory is specified as follows: 
    Mon Mar 23, 2015 11:18:50:   0x00000000 - 0x0003FFFF  ROM/Flash 
    Mon Mar 23, 2015 11:18:50:   0x10000000 - 0x100003FF  ROM/Flash 
    Mon Mar 23, 2015 11:18:50:   0x10001000 - 0x100013FF  ROM/Flash 
    Mon Mar 23, 2015 11:18:50:   0x20000000 - 0x20007FFF  RAM 
    Mon Mar 23, 2015 11:18:50:   0x40000000 - 0x4001FFFF  RAM 
    Mon Mar 23, 2015 11:18:50:   0x50000000 - 0x50000FFF  RAM 
    Mon Mar 23, 2015 11:18:50:   0xE0000000 - 0xE00FFFFF  Uncached/SFR 
    Mon Mar 23, 2015 11:18:50: SFRs range from 0x10000010 to 0xE00FFFFF 
    Mon Mar 23, 2015 11:18:50: Download error at 0x00000000: downloading into non-writable memory. 
    Mon Mar 23, 2015 11:18:50: 1192 bytes downloaded (116.41 Kbytes/sec) 
    Mon Mar 23, 2015 11:18:50: Warning: Cannot measure current when I-jet is not powering the target. 
    Mon Mar 23, 2015 11:18:50: Download completed. 
    Mon Mar 23, 2015 11:18:50: LowLevelReset(software, delay 200) 
    Mon Mar 23, 2015 11:18:50: Target reset 
    Mon Mar 23, 2015 11:18:50: There were 6 warnings during the initialization of the debugging session. 
    Mon Mar 23, 2015 11:18:50: CPU status - SLEEPING 
    Mon Mar 23, 2015 11:18:50: CPU status OK
    
  • Debugging works with the builtin Segger debugger on the nRFDK 10028 board but not with I-Jet. I am going to create a new question about this.

Related