:::: MENU ::::

Mac OS X에 nRF51 개발 환경 설정하기

1. gcc 설치
여기에서 다운로드 한다.

$ mkdir /usr/local/gcc-arm
$ tar -xjf gcc-arm-none-eabi-5_4-2016q3-20160926-mac.tar.bz2 -C /usr/local/gcc-arm

2. nRF5x-Command-Line-Tools-OSX
여기에서 다운로드 한다.
/usr/local/ 에 nrfjprog와 mergehex를 copy한다.

3. .bash_profile 수정

export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/nrfjprog:$PATH

4. Segger Software and documentation pack for Mac OS X 설치
여기에 패키지 파일이 있다.

5. SDK설치 및 Makefile.posix 파일 수정
여기 또는 여기에서 SDK를 다운로드 해서 원하는 곳에서 압축을 푼다.
components/toolchain/gcc/Makefile.posix 이 파일을 gcc 버전에 맞게 수정한다.

GNU_INSTALL_ROOT := /usr/local/gcc-arm/gcc-arm-none-eabi-5_4-2016q3
GNU_VERSION := 5.4.1
GNU_PREFIX := arm-none-eabi

6. 컴파일 및 확인
example 폴더 아래에서 make해서 hex 파일이 생성되는지 확인한다.

$ make

7. 보드와 연결해서 다운로드가 되는지 확인한다.

$ make flash

Nordic에서 출시한 보드

PCA10028

PCA10031

참고
https://devzone.nordicsemi.com/blogs/22/getting-started-with-nrf51-development-on-mac-os-x/
https://aaroneiche.com/2016/06/01/programming-an-nrf52-on-a-mac/
http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822
Getting started with the nRF5 development kit
https://devzone.nordicsemi.com/tutorials/