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, Now I am able to flash the hex file to NRF51822. But code is not working on chip. Is there any parameters need to define? I tried Led Blinking and ble_peripheral/uart example. But not working, Any clues? Hete is my code.

    #include <stdbool.h>
    #include <stdint.h>
    #include "nrf_delay.h"
    #include "boards.h"
    
    #define LED1    6
    
    /**
     * @brief Function for application main entry.
     */
    int main(void)
    {
        /* Configure board. */
            NRF_GPIO->PIN_CNF[LED1] |= GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos; // Set pullup
            NRF_GPIO->DIRSET = 1<<LED1;
        /* Toggle LEDs. */
        while (true)
        {
            NRF_GPIO->OUTSET = 1<<LED1;
            nrf_delay_ms(1000);
            NRF_GPIO->OUTCLR = 1<<LED1;
            nrf_delay_ms(1000);
    
        }
    }
    
Reply
  • Hi, Now I am able to flash the hex file to NRF51822. But code is not working on chip. Is there any parameters need to define? I tried Led Blinking and ble_peripheral/uart example. But not working, Any clues? Hete is my code.

    #include <stdbool.h>
    #include <stdint.h>
    #include "nrf_delay.h"
    #include "boards.h"
    
    #define LED1    6
    
    /**
     * @brief Function for application main entry.
     */
    int main(void)
    {
        /* Configure board. */
            NRF_GPIO->PIN_CNF[LED1] |= GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos; // Set pullup
            NRF_GPIO->DIRSET = 1<<LED1;
        /* Toggle LEDs. */
        while (true)
        {
            NRF_GPIO->OUTSET = 1<<LED1;
            nrf_delay_ms(1000);
            NRF_GPIO->OUTCLR = 1<<LED1;
            nrf_delay_ms(1000);
    
        }
    }
    
Children
No Data
Related