How to develop?
We supply the source code for user. So user could do own application. I compile in linux, as below:
1.Download the micropython:
2.Replace \micropython\ports\nrf with our code.
3.Install arm-none-eabi-gcc for linux
sudo apt-get install gcc-arm-none-eabi
4.Install python3, refer to: https://www.tecmint.com/install-python-in-ubuntu/
5.execute:
cd micropython
git submodule update --init
make -C mpy-cross
cd micropython/ports/nrf
./drivers/bluetooth/download_ble_stack.sh
make BOARD=pca10056 SD=s140
6.firmware.hex will be in micropython/ports/nrf/build-pca10056-s140
Notes:
Our hex provides the basic api for sensors and bg96 on board. Micropython original thing is still work, like CTRL+D for restart
It runs the ble_uart_nus demo as periphral, device name is rak5010
User can do any change they want.
We are keeping study how to run script automatically, other than just in REPL mode. If you make it true, it is nice to share with us and other developers
This is the first version firmware based on Micropython for RAK5010, so there may be some incompleted features. We open all the source code here so that everyone can use it to do more customized features based on RAK5010. Surely, it will be grateful that anyone can help to complete all features togather with us, and any suggestions from you will be great!
Hi!
We have an issue, we can not connect to the device after we install the micropython hex file.
We start the RAK5010. We flash rak5010_micropython.hex using JLink and the USB to device cable. We then start the serial tool, but it does not find the RAK device anymore, the COM port is not in the ports list.
Hi,
I have test the rak5010_micropython.hex, it is ok. Do you copy all files of serial tool? The .ini is the config file of serial. After download, remove usb and insert again. It should be like below:
Almost a year later, let’s get this thread active again.
I’m having the same problem as CristianBell was having.
I’m able to successfully burn the .hex to the RAK5010 using the RAK DAP, however, after plugging the USB to the RAK I’m unable to see any serial port available.
If I burn the standard firmware .hex (no MicroPython), then I’m able to see the serial port.
So, my serial application and the USB cable work.
Is there any trick after burning the MicroPython .hex to the RAK5010? I’m using pyocd with RAK DAP.
I see that the RAK5010 MicroPython GitHub repository hasn’t been updated in 17 months. Does the Dec 3 2019 MicroPython .hex still work with the new RAK5010s?
I see that the version of MicroPython used in that .hex is the 1.11.
In order to develop my own compiled version, I cloned the MicroPython repository (now in v1.15) and copied the RAK nrf folder to the /ports.
It starts compiling but it stops in an error:
$ make BOARD=pca10056 SD=s140
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
mkdir -p build-pca10056-s140/genhdr
Create build-pca10056-s140/genhdr/pins.h
GEN build-pca10056-s140/genhdr/mpversion.h
GEN build-pca10056-s140/genhdr/moduledefs.h
make: *** No rule to make target lib/tinyusb/src/portable/nordic/nrf5x/hal_nrf5x.c', needed by build-pca10056-s140/genhdr/qstr.i.last’. Stop.
I cloned the MicroPython v1.12, compiled, and it works fine. It seems there is semi-recent change in newer MicroPython versions that broke the tinyusb.
If I copy the contents of the pca10056 folder (mpconfigboard.h, mpconfigboard.mk and pins.csv) to the newer version (v1.15), is that enough? Or there are any other files that RAK changed that I should copy as well?
Hi, because it is a long time not to update, I’m not clear the change of Micropython Version. But the code in boards is just about hardware config, like pin define of I2C, Uart, SPI… So theoretically, just copy it is enough.