玩 MicroPython v1.9.3@nRF52832 - PCA10040 - S132 DK開發板

動機:要如何在 nRF52832 - PCA10040 S132 DK開發板上安裝 ~最新版 MicroPython(1.9.3) 呢?!

準備環境
1.MacBook筆電
2.nRF52832 - S132 DK開發板(需連接USB數據線)

實作步驟
1.至 MicroPython官網下載 micropython-1.9.3.zip http://micropython.org/resources/source/micropython-1.9.3.zip ),並解壓縮...指令如下
unzip micropython-1.9.3.zip

2.複製 https://github.com/tralamazza/micropython/tree/master/ports/nrf 檔案至 上述 1. 目錄( ~/micropython-1.9.3)內...

3.Compile and Flash...
$ cd ~/micropython-1.9.3
$ make V=1 -C mpy-cross
$ cd ports/nrf
$ make V=1 BOARD=pca10040
$ make flash
如下圖

2.進入 REPL
sudo cu -s 115200 -l /dev/cu.usbmodem1411
按下 return 進入 >>>
按下 control+D 執行 soft reboot
如欲離開 cu,請輸入
>>> ~.
如下圖

3.測試 LED4 blinky
如下圖

4.此時,可以使用 Windows10 - nRFgo Studio 工具來查看 nRF52 DK 開發板上的 Region Verify .hex,如下圖


提供上述壓縮檔https://drive.google.com/file/d/1Q0DCAdDVd4D2eMmeJ-7pxAprLoII-KcP/view?usp=sharing

提供上述firmware檔https://drive.google.com/file/d/1HJBR08aH--OXBPWiFL5TMZ2cZhWu6zK_/view?usp=sharing

5.如果要 更新 git module,指令如下:
$ git submodule update --init
如下圖


參攷
1.MicroPython downloads, https://micropython.org/download
2.tralamazza/micropython, https://github.com/tralamazza/micropython

留言