:::: MENU ::::

BBC Microbit 오프라인에서 사용하기

BBC microbit를 오프라인에서 사용하려면 링크를 참고 하고 Manuall Installation 항목을 따라서 환경을 셋업한다.

1. yotta설치

Mac OS의 경우

brew tap ARMmbed/homebrew-formulae
brew install python cmake ninja arm-none-eabi-gcc
pip install yotta

Trouble shooting
brew 관련 아래과 같은 문제가 있을 경우

sudo chown -R $(whoami):admin /usr/local
cd $(brew –prefix) && git fetch origin && git reset –hard origin/master

터미널에서 다음과 같은 에러메시지가 나올때
error: connection error: (“bad handshake: Error([(‘SSL routines’, ‘ssl3_get_server_certificate’, ‘certificate verify failed’)],)”,)

pip install -U certifi

참고: https://github.com/ARMmbed/yotta/issues/744

2. Srecord 설치

brew install srecord

3. 예제 코드 받기

git clone https://github.com/lancaster-university/microbit-samples
cd microbit-samples

4. 타겟을 miccrobit로 설정

yt target bbc-microbit-classic-gcc

5. 프로젝트 빌드

yt build

6. 마이크로비트에 다운로드 하기
마이크로비트는 MICROBIT라는 이름의 외장디바이스로 되어 있으니 hex파일을 copy하면 된다.

cp ./build/bbc-microbit-classic-gcc/source/microbit-samples-combined.hex /Volumes/”MICROBIT”

참고
https://lancaster-university.github.io/microbit-docs/offline-toolchains/
http://yottadocs.mbed.com/#installing