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
  • Here are few logs of openocd.

    > halt
    target state: halted
    target halted due to debug-request, current mode: Handler HardFault
    xPSR: 0x61000003 pc: 0xfffffffe msp: 0x20007fe0
    > flash write_image erase peripheral_uart.hex
    auto erase enabled
    Unknown device (HWID 0x0000008f)
    Padding image section 0 with 2112 bytes
    Padding image section 1 with 32 bytes
    using fast async flash loader. This is currently supported
    only with ST-Link and CMSIS-DAP. If you have issues, add
    "set WORKAREASIZE 0" before sourcing nrf51.cfg to disable it
    target state: halted
    target halted due to breakpoint, current mode: Handler HardFault
    xPSR: 0x61000003 pc: 0x2000001e msp: 0x20007fe0
    wrote 134144 bytes from file peripheral_uart.hex in 6.647914s (19.705 KiB/s)
    
Reply
  • Here are few logs of openocd.

    > halt
    target state: halted
    target halted due to debug-request, current mode: Handler HardFault
    xPSR: 0x61000003 pc: 0xfffffffe msp: 0x20007fe0
    > flash write_image erase peripheral_uart.hex
    auto erase enabled
    Unknown device (HWID 0x0000008f)
    Padding image section 0 with 2112 bytes
    Padding image section 1 with 32 bytes
    using fast async flash loader. This is currently supported
    only with ST-Link and CMSIS-DAP. If you have issues, add
    "set WORKAREASIZE 0" before sourcing nrf51.cfg to disable it
    target state: halted
    target halted due to breakpoint, current mode: Handler HardFault
    xPSR: 0x61000003 pc: 0x2000001e msp: 0x20007fe0
    wrote 134144 bytes from file peripheral_uart.hex in 6.647914s (19.705 KiB/s)
    
Children
No Data
Related