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

openocd configuration file nrf51.cfg not working

Hi, I am using st-link debugger with NRF51822 module. I was trying to connect it openocd, but it failed. st-link is working with STM32 processor and able to flash through STM32 ST-LINK Utility.
I was got error as follows.

[code]>openocd -f nrf51.cfg
Open On-Chip Debugger 0.9.0-dev-00415-g2d4ae3f-dirty (2015-06-12-17:54)
Licensed under GNU GPL v2
For bug reports, read
        openocd.org/.../bugs.html
nrf51.cfg:5: Error: Can't find target/swj-dp.tcl
in procedure 'script'
at file "embedded:startup.tcl", line 60
at file "nrf51.cfg", line 5[/code]  

I tried nos. ways but it failing to connect. Any suggestion please.

Parents
  • Hi, I program the chip with verify option and it gave me "Verify OK" result. So, i think program might have flashed correctly. here are registers status i got from chip.

    > reg
    ===== arm v7m registers
    (0) r0 (/32): 0x00000000
    (1) r1 (/32): 0x00000000
    (2) r2 (/32): 0x200000E0
    (3) r3 (/32): 0x20000064
    (4) r4 (/32): 0x00000000
    (5) r5 (/32): 0x00000000
    (6) r6 (/32): 0xFFFFFFFF
    (7) r7 (/32): 0x00000000
    (8) r8 (/32): 0xFFFFFFFF
    (9) r9 (/32): 0xFFFFFFFF
    (10) r10 (/32): 0x1FFF8000
    (11) r11 (/32): 0x00000000
    (12) r12 (/32): 0xFFFFFFFF
    (13) sp (/32): 0x20007FE0
    (14) lr (/32): 0xFFFFFFF9
    (15) pc (/32): 0x00000B02
    (16) xPSR (/32): 0x61000003
    (17) msp (/32): 0x20007FE0
    (18) psp (/32): 0xFFFFFFFC
    (19) primask (/1): 0x00
    (20) basepri (/8): 0x00
    (21) faultmask (/1): 0x00
    (22) control (/2): 0x00
    ===== Cortex-M DWT registers
    (23) dwt_ctrl (/32)
    (24) dwt_cyccnt (/32)
    (25) dwt_0_comp (/32)
    (26) dwt_0_mask (/4)
    (27) dwt_0_function (/32)
    (28) dwt_1_comp (/32)
    (29) dwt_1_mask (/4)
    (30) dwt_1_function (/32)
    

    PC is not all changing. means chip is not running.

Reply
  • Hi, I program the chip with verify option and it gave me "Verify OK" result. So, i think program might have flashed correctly. here are registers status i got from chip.

    > reg
    ===== arm v7m registers
    (0) r0 (/32): 0x00000000
    (1) r1 (/32): 0x00000000
    (2) r2 (/32): 0x200000E0
    (3) r3 (/32): 0x20000064
    (4) r4 (/32): 0x00000000
    (5) r5 (/32): 0x00000000
    (6) r6 (/32): 0xFFFFFFFF
    (7) r7 (/32): 0x00000000
    (8) r8 (/32): 0xFFFFFFFF
    (9) r9 (/32): 0xFFFFFFFF
    (10) r10 (/32): 0x1FFF8000
    (11) r11 (/32): 0x00000000
    (12) r12 (/32): 0xFFFFFFFF
    (13) sp (/32): 0x20007FE0
    (14) lr (/32): 0xFFFFFFF9
    (15) pc (/32): 0x00000B02
    (16) xPSR (/32): 0x61000003
    (17) msp (/32): 0x20007FE0
    (18) psp (/32): 0xFFFFFFFC
    (19) primask (/1): 0x00
    (20) basepri (/8): 0x00
    (21) faultmask (/1): 0x00
    (22) control (/2): 0x00
    ===== Cortex-M DWT registers
    (23) dwt_ctrl (/32)
    (24) dwt_cyccnt (/32)
    (25) dwt_0_comp (/32)
    (26) dwt_0_mask (/4)
    (27) dwt_0_function (/32)
    (28) dwt_1_comp (/32)
    (29) dwt_1_mask (/4)
    (30) dwt_1_function (/32)
    

    PC is not all changing. means chip is not running.

Children
No Data
Related