Attached is micropython firmware for the nRF52840

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
WhiteHare
Posts: 129
Joined: Thu Oct 04, 2018 4:00 am

Attached is micropython firmware for the nRF52840

Post by WhiteHare » Fri Oct 05, 2018 4:26 pm

I built the firmware for the nRF52840. To save others the bother, here it is attached.

IMHO, setting up the toolchain and other programs to do the build is non-trivial, and the firmware.hex file should, as a rule, be posted to github, but it presently isn't. Therefore, I recommend the moderator to post this file there.

Proof:

Code: Select all

MicroPython v1.9.4-623-g34af10d2e on 2018-10-05; PCA10056 with NRF52840
Type "help()" for more information.
>>> 1+1
2
>>> 
Attachments
firmware.zip
(146.95 KiB) Downloaded 314 times

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

Re: Attached is micropython firmware for the nRF52840

Post by kak » Thu Oct 11, 2018 5:02 pm

Is this with native USB support, or only TTL serial?

User avatar
WhiteHare
Posts: 129
Joined: Thu Oct 04, 2018 4:00 am

Re: Attached is micropython firmware for the nRF52840

Post by WhiteHare » Thu Oct 11, 2018 5:10 pm

kak wrote:
Thu Oct 11, 2018 5:02 pm
Is this with native USB support, or only TTL serial?
It works no problem over USB if I connect to it from an x86 machine. If I connect to it using, say, putty on a Raspberry Pi, I can see its output but I can't seem to send it anything.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Attached is micropython firmware for the nRF52840

Post by pfalcon » Fri Oct 12, 2018 8:22 am

IMHO, setting up the toolchain and other programs to do the build is non-trivial,
Please get more acquainted with the idea of "Open Source". The basic idea is that it give people the right to use the source code of programs they're interested in, and as any right, it needs to be exercised (or they may be deprived of it).

Besides, it's non-trivial, but you did it, you surely don't think that other people are less capable? Oh, and in such cases I always remember an epigraph from my childhood book on LISP - "everything is hard, until becomes easy".
and the firmware.hex file should, as a rule, be posted to github, but it presently isn't.
Nice rule. I'm sure if you sponsor MicroPython maintainers, they'll happily do it for you.
Therefore, I recommend the moderator to post this file there.
Are you seriously making such a suggestion with all news screaming around that "China by being nice and cheap-priced, sneaked spy chips into the servers of half of US companies"? Compare that with "I'm a nice guy, politely ask here for this random binary which I put here, which may contain malware, ransomware, beginnings of a new mirai botnet, to be impersonated as something official and delivered straight into unsuspecting users' hands".

Umm, thanks, but no. Moderators here are good people and assume that you have good (albeit simplistic and short-sighted) intentions, and don't delete your binaries of unknown origin, but that's it. And if you're truly care about users, please join the movement of teaching-to-fish, that's what we're doing here, instead of stuffing your fish in. Thank you!
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
WhiteHare
Posts: 129
Joined: Thu Oct 04, 2018 4:00 am

Re: Attached is micropython firmware for the nRF52840

Post by WhiteHare » Fri Oct 12, 2018 1:31 pm

A lawyer I once knew, who had witnessed more than his share of human misunderstanding, would describe this as a tempest in a teapot. I will say that I do my best to provide a win-win outcome with my posts for those who participate in the discussion. So, to use your analogy, I see this endeavor as one of helping each other become better fishermen.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Attached is micropython firmware for the nRF52840

Post by pfalcon » Sat Oct 13, 2018 11:39 am

Sounds good.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Attached is micropython firmware for the nRF52840

Post by devnull » Thu Oct 25, 2018 10:46 am

https://www.aliexpress.com/item/Nordic- ... 65660.html

Just received a few of these and are looking to flash the firmware which I have built.

I see there is native USB so have connected USB to D+, D- and Ground and supplied via 3.3 volts, it's drawing 12ma but does not seem to be recognized as a USB device on OSX ??

is the USB a serial device, HID or ???

Any pointers on getting started would be welcome :-)

User avatar
WhiteHare
Posts: 129
Joined: Thu Oct 04, 2018 4:00 am

Re: Attached is micropython firmware for the nRF52840

Post by WhiteHare » Thu Oct 25, 2018 12:31 pm

I haven't tried the particular modules you linked to, but, generally speaking, you'll most likely need a programmer to program them using pins SWDIO and SWDCLK. There are various programmers available, including really cheap $2 ones, but not all of them are easy to setup for use. Probably the easiest to use is the one built into the nRF52840-DK, which can be used to program external module such as the one you linked. That's what use. I haven't had much luck with the other programmers, but they do seem to work for some people.

After you burn the micropython firmware onto it, you'll most likely want to upload your micropython programs (e.g. main.py) to it over a UART serial connection, often pins P0.06 and P0.08, depending on which firmware you burned onto it.

The only firmware that I'm aware of that supports USB at the moment is the firmware used on the nRF52840-DONGLE. That isn't to say that you maybe couldn't roll your own, but I haven't tried that yet, so i can't really comment as to how easy or difficult it might be.

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Attached is micropython firmware for the nRF52840

Post by devnull » Fri Oct 26, 2018 5:31 am

Thanks for helping.

I have the ST-LINK V2 which has the SWCLK and SWDIO lines and have connected them together with ground and VnRF > 3.3V.

I know you said some programmers don't work, but this is all I have right now so want to give it a try.

But what software is used to flash the device ?? - I am using OSX but have windows on VMWARE if absolutely necessary.

Sorry for my lack of understanding, but I can't really find a lot of info and appreciate the help !

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Attached is micropython firmware for the nRF52840

Post by devnull » Fri Oct 26, 2018 8:53 am

OK, Success, I am using your firmware file initially until I can figure everything out, but I have a REPL

Code: Select all

>>> MicroPython v1.9.4-623-g34af10d2e on 2018-10-05; PCA10056 with NRF52840
Type "help()" for more information.

Post Reply