網頁

2020年5月4日 星期一

MicroBit 之開發

Micro:bit 使用 c 開發,可使用 線上開發 或 離線開發
但是 線上開發的版本沒有更新,導致新的板子無法使用
加速度和磁力計有兩種不同版本, MMA8653 和 LSM303
離線開發是使用 yotta

yotta 安裝方式
參考 yotta Documentation 和 Yotta
$ sudo apt-get update
$ sudo apt-get install python-setuptools cmake build-essential ninja-build python-dev libffi-dev libssl-dev
$ sudo easy_install pip
$ pip install yotta
$ sudo mkdir -p /usr/local/lib/yotta_modules
$ sudo chown $USER /usr/local/lib/yotta_modules
$ chmod 755 /usr/local/lib/yotta_modules
$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
$ sudo apt-get update
$ sudo apt-get install gcc-arm-embedded
$ sudo apt-get install clang-3.9
$ pip install --upgrade cryptography
$ sudo apt-get install srecord
$ git clone https://github.com/lancaster-university/microbit-samples

$ yt target bcc-microbit-classic-gcc
$ cd microbit-samples
$ cp source/examples/bluetooth-services/* source/
$ yt clean
$ yt build

資料產生於 build/bcc-microbit-classic-gcc/source/microbit-samples-combined.hex



沒有留言:

張貼留言