# 在linux上架設nrf52832的開發環境 **需要下載的工具:** 1. [SDK](https://www.nordicsemi.com/Products/Development-software/nRF5-SDK/Download#infotabs) 2. JLink(https://www.segger.com/downloads/jlink/) 3. arm toolchain:[gcc-arm-none-eabi-4_9-2015q3](https://launchpad.net/gcc-arm-embedded/+download) 4. [nRF Command Line Tools](https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs) **設定環境:** 1. 解壓縮檔案 ```bash= sudo unzip SDK.zip dpkg -i nrf-command-line-tools_version.deb sudo tar -xzf ./gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 ``` **以SDK裡面的examples/ble_peripheral/ble_app_uart為例:** 1. 編輯SDK裡面的/components/toolchain/gcc/Makefile.posix檔案。原本的內容如下 ```bash= GNU_INSTALL_ROOT ?= /usr/local/gcc-arm-none-eabi-7-2018-q2-update/bin/ GNU_VERSION ?= 7.3.1 GNU_PREFIX ?= arm-none-eabi ``` 需將**GNU_INSTALL_ROOT**改為arm toolchain放置位置下的bin目錄。 2. 將JLink底下的**99-jlink.rules**複製到/etc/udev/rule.d目錄底下 ```bash= cp 99-jlink.rules /etc/udev/rule.d ``` 3. 到ble_app_uart目錄底下命令做編譯和燒錄的動作: ```bash= cd /nRF5-SDK/example/ble_peripheral/ble_app_uart make make flash ``` 最後程式可以正常運作 參考資料 1. https://leavesified.wordpress.com/2016/03/24/setup-nrf51-development-on-linux/ 2. https://www.irnas.eu/nrf52-development-setup-on-linux/ 3. https://devzone.nordicsemi.com/f/nordic-q-a/9327/is-a-pure-linux-development-environment-possible-for-nrf52 4. [Nordic tools and downloads](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf52840_dk%2FUG%2Fcommon%2Fnordic_tools.html) ###### tags: `ble` `nrf52`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up