-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenOCD can't work for the Nordic nRF52840-dongle #405
Comments
Thanks for reporting. Your issue is a lack of documentation on our side. OpenOCD requires to manually specify the programmer interface you use. Which means that the user must create a configuration file for their use case. The file should be named
The file should be located in The last 3 lines should be there all the time, only the first one needs to be changed based on the programmer you're using. |
(Sorry, I might be asking a very basic question...) |
OpenOCD, pyOCD as well as JLink are JTAG/SWD programmers which one must manually wire to the dongle by either using the castellations on the side of the PCB or the TagConnect pads on the bottom of the PCB. In order to flash over USB, please use the |
We need to document OpenOCD and pyOCD better, or remove support. |
Supporting openocd is definitely helpful, due to its reliability and availability of cheap interfaces like the st-link. (feel free to skip these next 2 paragraphs) Using jlink goes is contrary to the spirit of open source which has obvious security implications - god knows what the firmware is doing. It's also expensive. Openocd has one issue - for me it doesn't search in openocd_command = '{openocd_cmd} -c "{prefix} {source} {cmd_prefix} {cmd} {cmd_suffix} exit"'.format( to insert the search path: openocd_command = '{openocd_cmd} -s /home/foo/.local/share/openocd/scripts/ -c "{prefix} {source} {cmd_prefix} {cmd} {cmd_suffix} exit"'.format( No soldering or retainer clip are needed either - inserting regular jumper pins into the side channels/grooves of the dongle, against a breadboard or even just blu tack does the job. Flashing this way seems to work. This is obviously very hacky and far from streamlined and part of the issue lies in tock being unable to pass flags such as Either way, I'll be happy to contribute my notes to the documentation once I find a neater way. Hope this comment is helps for anyone in my position. |
Thanks for taking the time to explain! I'd be more than happy to merge a PR with documentation for OpenOCD, if you can make it work. |
As a side note, have you tried to use PyOCD instead? |
The problem with PyOCD is that one of the wheels it depends on doesn't want to build on musl by default:
On Alpine at least (which links musl dynamically), this can be solved with There's another concerning message:
but it seems pyocd has installed fine. I will assume that it works normally once installed, although I haven't tried actually flashing with it. Anyway, I think the issue has been resolved with the merge? |
Expected Behavior
run the program with OpenOCD
Actual Behavior
run
./deploy.py --board=nrf52840_dongle --programmer=openocd --opensk
(--programmer=openocd must ad, otherwise will try to run with Jlink)shows:
fatal: Couldn't install Tock OS: ERROR: Cannot find the board configuration file. You may need to update OpenOCD to the version in latest git master.
Steps to Reproduce the Problem
1.git clone and run './setup.sh' currectly
2.installed all other responses needed ( tockloader==1.5.0, rust (nightly-2020-06-10-x86_64), libssl-dev, uuid-runtime )
3. installed OpenOCD 0.11.0 (which is the newest one)
Specifications
lsusb Bus 001 Device 004: ID 1915:521f Nordic Semiconductor ASA Open DFU Bootloader
)The text was updated successfully, but these errors were encountered: