Anyone working on a port to Nordics PCA10059 Dongle?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Anyone working on a port to Nordics PCA10059 Dongle?

Post by RWLTOK » Sun Jul 29, 2018 8:24 pm

Is anyone working on a port to Nordic's PCA10059 Dongle?

Looks like a great platform for developing Micropython BLE applications.

http://infocenter.nordicsemi.com/index. ... 5%39%22%20

Rich

User avatar
benalb
Posts: 25
Joined: Fri May 19, 2017 1:23 pm

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by benalb » Mon Jul 30, 2018 7:53 am


User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by pythoncoder » Mon Jul 30, 2018 8:12 am

It seems it's been merged. See build instructions.
Peter Hinch
Index to my micropython libraries.

User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by RWLTOK » Wed Aug 01, 2018 1:50 am

Hmm. I only see 10056. There is not a directory in the boards folder. I'll keep looking.

User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by RWLTOK » Wed Aug 01, 2018 1:53 am

I ordered both PCA10056 and PCA10059 boards so maybe I can see what needs to be done when the boards arrive. The nice thing about the PCA10059 is that it takes DFU image downloads over USB like the PYBoards.

Rich

User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by RWLTOK » Sat Aug 04, 2018 2:48 pm

Oh well. My boards came, but I am dead ending on how to build it. I followed the build instructions you provided a link to Peter. There is stuff missing, because when I go to build (following the example), I get fatal errors indicating nrfx.h is not available. I downloaded the drivers. Any suggestions on where I can ask questions to figure out what step is missing.

Rich

User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by RWLTOK » Sat Aug 04, 2018 4:32 pm

NM. I started from scratch, followed the instructions again and all the build steps worked. Trying to target the PCA10059 board now. I think I started from an old clone.

Thanks to you both for answering my question.

Rich

User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by RWLTOK » Thu Aug 09, 2018 12:07 am

If anyone else views this thread and can make a suggestion, I am all ears.

I copied the nrf/boards/pca10056 directory and made a pca10059 directory.
I can build the package.
Next, I ran:

Code: Select all

nrfutil pkg generate --debug-mode --hw-version 52 --sd-req 0xA9 --application build-pca10059/firmware.hex build-pca10059/firmware.dfu
then

Code: Select all

nrfutil dfu serial -pkg build-pca10059/firmware.dfu -p /dev/ttyACM1 
the following is the error:
a stack unwind followed by the NordicSemeException

Code: Select all

Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.
Since I don't develop with Nordic, I don't know what to do about this error, or even know what I can do to troubleshoot the issue. I will shelve this project for a while in hopes that someone else is more successful that I have been.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by pythoncoder » Sat Aug 11, 2018 4:15 am

I would suggest concentrating on the PCA10056 as that's officially supported. If you can't get that to work you might want to raise an issue on GitHub. Porting to the PCA10059 is likely to be a somewhat involved process. Have you studied the files in the PCA10056 directory? You'll need a detailed understanding of them and of the differences between the two hardware targets.

Sorry I can't offer any specific advice: I've no experience of the Nordic port which is very recent.
Peter Hinch
Index to my micropython libraries.

kak
Posts: 22
Joined: Fri Oct 05, 2018 11:35 am

Re: Anyone working on a port to Nordics PCA10059 Dongle?

Post by kak » Fri Oct 05, 2018 11:55 am

Adafruits fork of micropython (called circuitpython) has support for the pca10059 dongle.

But I could never flash it onto the stick using nrfutil, or adafruit_nrfutil.
I had to use nRF Connect to flash the circuitpython and softdevice hex files separately.
The softdevice has to be s140, btw.

I also failed miserably to replace the stock bootloader with Adafruit's UF2 bootloader. The stock bootloader refuses to overwrite itself, if the update package isn't signed, and I don't know how to sign it properly.
I would have to use a J-Link. I ordered one, but it's still in the mail.

You should also be careful when completely erasing the device, because also the flags get erased, and that causes the dongle to start up with a 1.8V supply voltage. A full fledged J-Link can handle that (but you have to connect it's VTref pin to the dongles VDDOUT pin), but a cheap clone or a J-Link EDU Mini can't.

BTW: You can't use a ST-Link reflashed to J-Link, the Segger tools will refuse to work with that, and tell you that the J-Link works only with STM32 micros.

So far, I could only flash circuitpython, using the mentioned nRF Connect method. The same method doesn't work with micropython.
I can flash it, but it doesn't start.

Bluetooth REPL doesn't work in circuitpython (yet), but lots of other things do. Virtual drive works, REPL over USB CDC works, USB HID works.

As I'm new to Micropython and the nRF family, I'm not sure how big the differences to circuitpython are, and how much effort it'll be to backport the pc10059 support.

But I'll try.

Post Reply