-
Notifications
You must be signed in to change notification settings - Fork 290
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
NRF52840 boards? #3
Comments
The main requirement today is the Nordic nRF52840 SOC. The two development boards that Nordic made around their chip (the NRF52840-DK and the NRF52840-Dongle) are already supported but it's pretty easy to adapt the code to support a custom design around the Nordic chip. You need 1 button and at least 1 LED to be wired to the chip. Supporting another chip than the Nordic is also possible but requires more effort. |
Seems great, unfortunately I know nothing of programming hardware. But if someone else is interested, this dongle would be a great match for OpenSK: https://github.com/makerdiary/nrf52840-mdk-usb-dongle It has a really small form-factor and is available with a form-fit shell, I already made a suggestion to integrate OpenSK in their github. |
Just FYI, the official Nordic nRF52840 dongle sells for $10, which is less than the price of the Makerdiary dongle. The design of the Nordic dongle is open. It doesn't come with a case, but if you have a 3D printer... |
@brouhaha I looked at having the shell printed, but the shell is much larger, less durable and doesn't have a ring to have it in a key-chain. Plus, the MD dongle size is smaller, which I prefer - I'm too used to the smaller form-factor of Yubikeys. |
I managed to get it work with https://github.com/makerdiary/nrf52840-mdk-usb-dongle. By the way, I use gitpod.io to build the project.
|
Is it possible to program the NRF52840 USB Dongle as a security key without additional hardware ? |
Google is presenting OpenSK as a tool for developers and hobbyists. |
There are a multitude of options for programming the nRF52, none of which cost $1000. The Nordic nRF52 DK board can be used, and sells for $40. |
It looks like nRF Connect Programmer can do the job: |
I tried RAYTAC MDBT50Q-RX and it worked. Note: you need to tweak pin settings for the led and the button. It would be safer to also change the pin for uart so that it won’t interfere with the reset pin. |
It looks like the MDBT50Q-RX does not include a bootloader, so you also need a MDBT50Q-RX to do the programming? Sure beats anything JLink for cost though. The NRF52840 does appear to include the DFU Bootloader, so programming by USB is possible. |
If you have two nRF52840 MDK USB Dongle, you can use one as a CMSIS-DAP debug adapter with OpenOCD or pyOCD |
Well that leaves open the question. Can you use the nRF52840 dongle bootloader to install OpenSK on itself, using just the one dongle - or does that destroy the bootloader? May be time to buy a second dongle... |
I think it can be done. I mean, it should be possible to install OpenSK with ordinary bootloaders and without using any jtag/swd adapters. |
We can modify
|
Man - you are getting there! Glad I asked! |
The larger nRF52840 DK board spec lists it as "comes with an on-board SEGGER J-Link debugger allowing programming and debugging both the on-board SoC and external SoCs through the debug out header" so could one of those be used to provide the required support to the dongle ? |
Thanks all for your contributions. Regarding JLink probes, multiple things:
Regarding using another probe than the JLink, I tried a while ago with a Black Magic Probe and OpenOCD without success. I haven't tried with pyOCD instead. I'll give it a try and add documentation about it. Regarding supporting the Nordic DFU bootloader, that's something we will indeed think about. Because it will also spare the cost of the Tag-Connect cable (even though one can also use a breadboard and press fit headers on the castellated holes for SWD). Finally about supporting the nRF52840 MDK board, it's for sure possible but as mentioned in the review of the pull request, we would prefer the boards to be added directly to Tock OS instead of having to maintain patches for this. The patches we currently have in our repository are changes that are in the process of being upstreamed and we hope that we will soon be able to fully remove them from our repository. |
@xiongyihui would this mean you can program the dongle with nRF Connect Programmer? |
Let me second the Super Awesome. Us low budget users will thank you forever! |
On nRF52840 MDK USB Dongle, we can install OpenSK without a debug adapter. See Get Started with OpenSK guide I still can not get OpenSK with Nordic open bootloader directly. However, the open bootloader supports self-upgrade, so we can replace open bootloader with a UF2 bootloader, and then get OpenSK work with the UF2 bootloader. |
@xiongyihui Amazing! I'll start ordering a bunch :-D |
Regarding the nRF Connect Programmer, it looks like you need hex files. The build script creates elf files. Is there a way to convert elf to hex? Or modify the build script to output hex files? |
@gregvinyard the Building OpenSK page https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/opensk/building/ covers using bin2hex.py and hexmerge.py to built a single .hex file to install via UF2 bootloader. I'm guessing someone has already tried using the output of that with nRF Connect Programmer ? |
Thanks @MatchstickUK . Apparently I have a lot to learn, heh. I was able to convert the bin and tbf files to hex and flash them using nRF Connect Programmer, but OpenSK doesn't run. I didn't brick the dongle, I can flash again. No idea what I'm doing though. Time to do some more reading. :-) |
@sissaias yes I did: have a look at dennisg/OpenSK. After the generic installation instructions, run the |
Thank you will give it a try tonight. @dennisg I am getting these errors: WOPR ॐ ~/Projects/OpenSK:(9d15h10m|git@nrf52840_dongle_bootloader) |
Hi @sissaias, I'm running this on linux, untested on OSX, sorry. your root cause is this:
which means that it cannot find A little bit further in the logs I see that when I'm afraid I cannot help you to solve this since I do not have a mac for testing. |
I had this problem on my MacOS too. Most probably it's due to old bash version not supporting declare option. |
Portability issues should have been fixed. The |
Hi @jmichelp, I updated the fork, still untested but I will hopefully soon find time to do so; are you interested in knowing how to flash a regular nrf52840 dongle with your application without the use of expensive hardware? Do you care to help with your knowledge to fix the 'double flashing' ? I would really appreciate your input! |
Hello everyone I upgraded bash as suggested now using @dennisg fork I am getting the follow request for j-link: |
@dennisg Of course we're interested :) I actually bought myself 2 makerdiary dongles so that I can experiment/test. |
Yes, I've now started _really_ looking at the changes in master and indeed
we should build the `app` instead of the `os`. Thanks Adriaan.
Here's what I think we should fix to get flashing over DFU working again
(it's probably not that much):
- Within the `deploy.py` in `install_elf_file` the padding is installed at
address `0x30000` using tockloader just before flashing the app itself; we
should be able to generate a hex file that
contains that padding and that hex file should be merged with the os and
app hex-es.
- it might be best to create a completely separate target (e.g.
nrf52840_dongle_dfu) that incorporates these changes because we deviate
quite a lot from the regular target
- fix the issue that we have to flash the os twice, maybe we just flash the
padding, os and app hexes separately? downside is that we then have to
reset the dongle 3 times during the process.
I'll try setting this up as soon as possible
…On Tue, Mar 3, 2020 at 10:44 PM Jean-Michel Picod ***@***.***> wrote:
@dennisg <https://github.com/dennisg> Of course we're interested :) I
actually bought myself 2 makerdiary dongles so that I can experiment/test.
I'll do my best to help merging your contribution to the main repository.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AAB3P3O7BKJYFQA7IZ3KFODRFV23TA5CNFSM4KOHWZR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENVI27Y#issuecomment-594185599>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB3P3OC5LKRH7DODJCNJZDRFV23TANCNFSM4KOHWZRQ>
.
|
@jmichelp Okay, I moved as much as possible/ seemed sensible from the bash script to the |
1579: add set_vector_table_offset() r=alevy a=xiongyihui when using a bootloader, tock os may need to relocate interrupt vector table, then use this function to do that. See the discussion at google/OpenSK#3 ### Pull Request Overview This pull request adds `add set_vector_table_offset` function to relocate interrupt vector table. ### Testing Strategy TODO ### TODO or Help Wanted N/A ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make formatall`. Co-authored-by: Yihui Xiong <[email protected]>
@dennisg I have to say after spending days on OSX, I decided to do it on Linux. Your flash script worked. The key now works fine. Thanks everyone for your help next move to find somewhere to print a case |
it would be helpful to have an updated write up on how to program this onto a new dongle with factory defaults on windows, linux and macos. I am on windows and I got the files compiled in gitpod. I have the nrf desktop connect app, not sure whats the best to proceed without frying my dongle. thx |
Please be patient. I'm working on integrating all of that nicely into the main repository and the At the end, one should be able to flash OpenSK firmware using:
|
Has anyone tried |
No we haven't. |
Actually it has a button. I have picture and schematics of it: As I understand they are suggesting it can be used without a button for some applications. |
So, according to the schematics you provided, the board is equivalent to the nRF52840 Dongle from Nordic. Both LEDs and buttons are wired the same. Like on the Nordic dongle, one button acts as a reset button and the other one will be used for User Presence. You should be able to flash OpenSK using the board definition |
@elfmimi I have one of these, did you publish your tweaks anywhere? I can work out the changes to the pins myself but figured if you've already done it I would ask first. |
No, I haven't. I'll try to dig it out. pls wait few days. |
Wonderful, thank you. |
Does the key need to be the specific Nordic NRF52840 devoper dongle or does the key only need to have the NRF52840 SOC on the dongle?
The text was updated successfully, but these errors were encountered: