Nuttx flash configuration - nrf52840dk

I recently got the nrf52840dk board and I am trying to use it with the Nuttx embedded OS. However, I am having some issues flashing the nuttx binary on my board.

this is the instruction on the nuttx page: 

openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c 'init' \
  -c 'program nuttx/nuttx.bin verify reset' -c 'shutdown'

Would appreciate some help with this. I am a beginner with both nuttx and the nordic semi-conductors. Need this for some research implementation.

Thanks

Parents
  • Thanks for the feedback. I am using openocd to flash the nrf52840dk board. I have tried 2 instances but facing some issues. Here are the error messages. I tried with jlink and stlink. 

    When I use jlink,

    openocd -f interface/jlink.cfg -f target/nrf52.cfg -c 'init' -c 'program nuttx/nuttx.bin verify reset' -c 'shutdown'
    Open On-Chip Debugger 0.11.0+dev-00551-gaad871805 (2022-01-10-14:22)
    Licensed under GNU GPL v2
    For bug reports, read
    openocd.org/.../bugs.html
    Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
    /usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl:28: Error: newtap: nrf52.cpu missing IR length
    in procedure 'script'
    at file "embedded:startup.tcl", line 26
    in procedure 'swj_newdap' called at file "/usr/local/bin/../share/openocd/scripts/target/nrf52.cfg", line 27
    at file "/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl", line 28

    When I use stlink,

    openocd -f interface/stlink.cfg -f target/nrf52.cfg -c 'init' -c 'program nuttx/nuttx.bin verify' -c 'shutdown'
    Open On-Chip Debugger 0.11.0+dev-00551-gaad871805 (2022-01-10-14:22)
    Licensed under GNU GPL v2
    For bug reports, read
    openocd.org/.../bugs.html
    Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

    nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
    A high level adapter (like a ST-Link) you are currently using cannot access
    the CTRL-AP so 'nrf52_recover' command will not work.
    Do not enable UICR APPROTECT.

    Info : clock speed 1000 kHz
    Error: open failed

    Can you provide some assistance on how to resolve these?

Reply
  • Thanks for the feedback. I am using openocd to flash the nrf52840dk board. I have tried 2 instances but facing some issues. Here are the error messages. I tried with jlink and stlink. 

    When I use jlink,

    openocd -f interface/jlink.cfg -f target/nrf52.cfg -c 'init' -c 'program nuttx/nuttx.bin verify reset' -c 'shutdown'
    Open On-Chip Debugger 0.11.0+dev-00551-gaad871805 (2022-01-10-14:22)
    Licensed under GNU GPL v2
    For bug reports, read
    openocd.org/.../bugs.html
    Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
    /usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl:28: Error: newtap: nrf52.cpu missing IR length
    in procedure 'script'
    at file "embedded:startup.tcl", line 26
    in procedure 'swj_newdap' called at file "/usr/local/bin/../share/openocd/scripts/target/nrf52.cfg", line 27
    at file "/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl", line 28

    When I use stlink,

    openocd -f interface/stlink.cfg -f target/nrf52.cfg -c 'init' -c 'program nuttx/nuttx.bin verify' -c 'shutdown'
    Open On-Chip Debugger 0.11.0+dev-00551-gaad871805 (2022-01-10-14:22)
    Licensed under GNU GPL v2
    For bug reports, read
    openocd.org/.../bugs.html
    Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

    nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
    A high level adapter (like a ST-Link) you are currently using cannot access
    the CTRL-AP so 'nrf52_recover' command will not work.
    Do not enable UICR APPROTECT.

    Info : clock speed 1000 kHz
    Error: open failed

    Can you provide some assistance on how to resolve these?

Children
No Data
Related