[nRF52] How to get rshell to work with an nRF52?
Re: [nRF52] How to get rshell to work with an nRF52?
Hmm.
If you connect via the regular REPL, what does the output of:
```
>>> import sys
>>> sys.stdin.buffer
```
show?
If you connect via the regular REPL, what does the output of:
```
>>> import sys
>>> sys.stdin.buffer
```
show?
Re: [nRF52] How to get rshell to work with an nRF52?
Code: Select all
MicroPython v1.9.4-651-g0f6f86ca4-dirty on 2018-10-27; PCA10056 with NRF52840
Type "help()" for more information.
>>> import sys
>>> sys.stdin.buffer
Traceback (most recent call last):
File "<stdin>", in <module>
AttributeError: 'module' object has no attribute 'stdin'
>>>
Re: [nRF52] How to get rshell to work with an nRF52?
Yeah - rshell needs sys.stdin and sys.stdout to work properly.
I have an NRF52840 dongle (https://www.nordicsemi.com/eng/Products/nRF52840-Dongle) that I'll see about creating a board definition for and see what I can get running on that.
I have an NRF52840 dongle (https://www.nordicsemi.com/eng/Products/nRF52840-Dongle) that I'll see about creating a board definition for and see what I can get running on that.
Re: [nRF52] How to get rshell to work with an nRF52?
I noticed Mouser now has the nRF52840-Dongle in stock for $10. I've been waiting for a supported BLE MicroPython chip.
Is rshell compatible?
Are prebuilt binaries available?
How does the MicroPython port compare to the CircuitPython port?
Is rshell compatible?
Are prebuilt binaries available?
How does the MicroPython port compare to the CircuitPython port?
Re: [nRF52] How to get rshell to work with an nRF52?
AFAIK, there still is no micropython release for the dongle. You can run the bbc:microbit firmware on it, but the filesystem is minuscule and doesn't tap the potential of the much larger flash size of the nRF52840. I had to switch to a different language because of this.rdagger wrote: ↑Wed Nov 28, 2018 4:21 amI noticed Mouser now has the nRF52840-Dongle in stock for $10. I've been waiting for a supported BLE MicroPython chip.
Is rshell compatible?
Are prebuilt binaries available?
How does the MicroPython port compare to the CircuitPython port?
Re: [nRF52] How to get rshell to work with an nRF52?
Thanks for the info. It looks like Circuit Python v.4 Alpha 3 supports the dongle. I'm not sure if a J-link is required. The site mentions that the dongle can be programmed by DFU but it is vague on the details.WhiteHare wrote: ↑Mon Dec 03, 2018 7:30 pmAFAIK, there still is no micropython release for the dongle. You can run the bbc:microbit firmware on it, but the filesystem is minuscule and doesn't tap the potential of the much larger flash size of the nRF52840. I had to switch to a different language because of this.
Re: [nRF52] How to get rshell to work with an nRF52?
(CircuitPython dev here.)rdagger wrote: ↑Wed Nov 28, 2018 4:21 amI noticed Mouser now has the nRF52840-Dongle in stock for $10. I've been waiting for a supported BLE MicroPython chip.
Is rshell compatible?
Are prebuilt binaries available?
How does the MicroPython port compare to the CircuitPython port?
At this point its pretty different, we started with glennrub and tralamazzas nrf5 PR (https://github.com/micropython/micropython/pull/3137) into MicroPython and a bunch of work has been done on it since then including non-vendor support for USB (available outside of CircuitPython here: https://github.com/hathach/tinyusb/tree/develop/)
I'm happy to answer any further questions about it.
Re: [nRF52] How to get rshell to work with an nRF52?
I've pieced together install instructions from different sites. Assuming I don't have a J-link and I want to load CircuitPython on an nRF52840-dongle (PCA10059) will the following work?:tannewt wrote: ↑Tue Dec 04, 2018 12:59 am(CircuitPython dev here.)
At this point its pretty different, we started with glennrub and tralamazzas nrf5 PR (https://github.com/micropython/micropython/pull/3137) into MicroPython and a bunch of work has been done on it since then including non-vendor support for USB (available outside of CircuitPython here: https://github.com/hathach/tinyusb/tree/develop/)
I'm happy to answer any further questions about it.
1. Download the pre-compiled bin file here for the PCA10059.
2. Run the script download_ble_stack.sh from the CP repo ports/nrf/bluetooth folder to download the soft device files.
3. Plug the PCA10059 into a computer's USB port and press the reset button.
4. Use Nordic's nRF Connect Desktop to load the bin file and SD file.
Thanks.
Re: [nRF52] How to get rshell to work with an nRF52?
That sounds like it will work but I haven't done it that way myself. I've only done it with a JLink at this point.
One other option would be to install the nRF UF2 bootloader first and then use the CircuitPython UF2 to install it. The bootloader's repo is here: https://github.com/adafruit/Adafruit_nRF52_Bootloader I believe the instructions in the README are up-to-date (though I've only used a JLink).
One other option would be to install the nRF UF2 bootloader first and then use the CircuitPython UF2 to install it. The bootloader's repo is here: https://github.com/adafruit/Adafruit_nRF52_Bootloader I believe the instructions in the README are up-to-date (though I've only used a JLink).
Re: [nRF52] How to get rshell to work with an nRF52?
Did you advance on that topic? I have a similar issue using rshell with an nRF52832 MCU.
I have registered the errors encountered in this post viewtopic.php?f=12&t=6961#p39621.
Maybe MICROPY_PY_SYS_STDFILES and MICROPY_PY_SYS_STDIO_BUFFER need to be enabled in mpconfigport.h to get the buffered stdio activated. (But `make` fails with those features on.)