Nordic, nRF52 Preview DK
目錄
Prepare
Install SDK
- Get latest SDK from https://developer.nordicsemi.com/nRF52_SDK/nRF52_SDK_v0.x.x/ (ex. nRF52_SDK_0.9.2_dbc28c9.zip)
- Get SDK with FreeRTOS example from http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v11.x.x/ (nRF5_SDK_11.0.0-2.alpha_bc3f6a0.zip)
- Edit ./components/toolchain/gcc/Makefile.posix to fit your toolchain setting if necessary
Install JLink
- Download "Software and Document pack" from https://www.segger.com/jlink-software.html according your platform (ex. x86_64)
- decompress and make a symbolic to /opt/SEGGER/JLink
- ln -s ~/Downloads/JLink_Linux_V510c_x86_64 /opt/SEGGER/JLink
Toolchain
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded sudo apt-get update sudo apt-get install gcc-arm-none-eabi
Programming
1. Softdevice ex. sudo /home/tommy/projects/mbed/nRF52/NrfJProg_7_7_0_Linux/nrfjprog --family NRF52 --program ~/projects/mbed/nRF52/s132_nrf52_1.0.0-3.alpha/s132_nrf52_1.0.0-3.alpha_softdevice.hex 2. change dir to example ex. sudo ~/projects/mbed/nRF52/NrfJProg_7_7_0_Linux/nrfjprog --sectorerase --family nRF52 --program _build/nrf52832_xxaa_s132.hex 3. sudo ~/projects/mbed/nRF52/NrfJProg_7_7_0_Linux/nrfjprog --sectorerase --family nRF52 --program _build/nrf52832_xxaa.hex 4. power recycle to take effect
tommy@tommy-HP-EliteBook-Folio-1040-G2:~/projects/mbed/nordic/nRF52/nRF5_SDK_11.0.0_89a8197/examples/ble_peripheral/ble_app_beacon/pca10040/s132/armgcc$ sudo ~/projects/mbed/nordic/tools/nrfjprog --sectorerase --family nRF52 --program ~/projects/mbed/nordic/nRF52/s132/s132_nrf52_1.0.0-3.alpha_softdevice.hex Parsing hex file. Erasing page at address 0x0. Erasing page at address 0x3000. Erasing page at address 0x4000. Erasing page at address 0x5000. Erasing page at address 0x6000. Erasing page at address 0x7000. Erasing page at address 0x8000. Erasing page at address 0x9000. Erasing page at address 0xA000. Erasing page at address 0xB000. Erasing page at address 0xC000. Erasing page at address 0xD000. Erasing page at address 0xE000. Erasing page at address 0xF000. Erasing page at address 0x10000. Erasing page at address 0x11000. Erasing page at address 0x12000. Erasing page at address 0x13000. Erasing page at address 0x14000. Erasing page at address 0x15000. Erasing page at address 0x16000. Erasing page at address 0x17000. Erasing page at address 0x18000. Erasing page at address 0x19000. Erasing page at address 0x1A000. Erasing page at address 0x1B000. Erasing page at address 0x1C000. Erasing page at address 0x1D000. Applying system reset. Checking that the area to write is not protected. Programing device. tommy@tommy-HP-EliteBook-Folio-1040-G2:~/projects/mbed/nordic/nRF52/nRF5_SDK_11.0.0_89a8197/examples/ble_peripheral/ble_app_beacon/pca10040/s132/armgcc$ sudo ~/projects/mbed/nordic/tools/nrfjprog --sectorerase --family nRF52 --program _build/nrf52832_xxaa_s132.hex Parsing hex file. Erasing page at address 0x1C000. Erasing page at address 0x1D000. Erasing page at address 0x1E000. Erasing page at address 0x1F000. Applying system reset. Checking that the area to write is not protected. Programing device.
Console, UART
- cp2105 in host
nRF52 Host ----------------- RX TX CTS RTS TX RX RTS CTS
Tool, nRF Connect
App source
SDK
- git clone https://bitbucket.org/tommy0804/nrf52 (based on nRF52_SDK_0.9.2_dbc28c9.zip)