Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile and burn nordic chips under ubuntu

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to compile and burn nordic chips under ubuntu. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

# compiling and burning nordic chips under ubuntu

Refer to the official instructions for details:

Http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.0.1%2Fmd_doc_getting_started_getting_started.html

# # 1 operating environment

Target system: ubuntu16.4 development board: PCA10040 nordic52832

# # 2. Environment installation

# install nRF5x Command Line Tools tools:

1, download https://www.nordicsemi.com/eng/nordic/download_resource/58852/27/55084982/94917 2 Decompress / usr/nRF5x-Command-Line-Tools_9_7_2_Linux-x86_64/ 3 Set the environment variable: $sudo gedit / etc/profile add path to the file export PATH=/usr/nRF5x-Command-Line-Tools_9_7_2_Linux-x86_64/mergehex:$PATH export PATH=/usr/nRF5x-Command-Line-Tools_9_7_2_Linux-x86_64/nrfjprog:$PATH $source / etc/profile $nrfjprog-v nrfjprog version: 9. 7.2 JLinkARM.dll version: 6.22d

# install SEGGER J-Link Software Package tools:

1. Download https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.tgz 2, extract / usr/JLink_Linux_V632_x86_64 3, set environment variables as above and add variables to the file to export PATH=/usr/JLink_Linux_V632_x86_64:$PATH 4. Add the soft link ln-s / usr/JLink_Linux_V632_x86_64/libjlinkarm.so / usr/lib/libjlinkarm.so (to prevent an error message when using nrfprog that there is no JLinkarm.dll file) 5 source / etc/profile update source 6, verify

# install cmake tools

1. Download https://cmake.org/files/v3.11/cmake-3.11.1-Linux-x86_64.sh 2, extract it to / usr/cmake-3.11.1-Linux-x86_64/ 3, add the environment variable xport PATH=/usr/cmake-3.11.1-Linux-x86_64/bin:$PATH 4 source / etc/profile update source 5, and verify cmake--version

# install toolchain tool chain

$sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa $sudo apt-get update $sudo apt-get install gcc-arm-embedded

# install virtualenv first to install Python (similar to sandboxie)

$sudo apt-get install virtualenv $mkdir / usr/virtualenvs $virtualenv-p python3 / usr/virtualenvs/mesh switching environment $source / usr/virtualenvs/mesh/bin/activate check $which python-/ home//virtualenvs/mesh/bin/python $which pip-/ home//virtualenvs/mesh/bin/pip cancel switching environment $deactivate if you need to switch on, add him to / home/jhe/.bashrc

# install other tools for building unit tests

Sudo apt-get install gcc-multilib sudo apt-get install ruby

# = Environment has been built = #

# # 3. Compile the file

Download nrf5_SDK_for_Mesh_v2.0.1_src nRF5_SDK_15.0.0_a53641a to / home/jhe/file/mesh/ and extract $cd / home/jhe/file/mesh/nrf5_SDK_for_Mesh_v2.0.1_src $mkdir build & $cd build $cmake-DGENERATE_SES_PROJECTS=ON-DPLATFORM=nrf52832_xxAA-DSOFTDEVICE=s132_6.0.0.. / # make or generate a codeblock project file $cmake.. /-G "CodeBlocks-Unix Makefiles" is compiled with codeclock software. [refer to the codeblock project environment built in this blog] the final generated hex file is under / home/jhe/file/mesh/nrf5_SDK_for_Mesh_v2.0.1_src/build/examples/xxx/xxx.hex.

# = Program compiled = #

# Burning procedure

Link development board $nrfjprog-- family nRF52-e / / erase chip $nrfjprog-- family nRF52-- program softdevice_xxaa.hex / / burn softdevice $nrfjprog-- family nRF52-- program ap_xxaa.hex / / burn ap program $nrfjprog-- family nRF52-r / / Applying system reset. Run...

# = essay = =

# A synthesize a hex file

# B generate bin file

# note

1. It has been prompted that sudo apt-get install cannot use sudo apt-get install-f all the time. 2, if prompted that the version of header-gernic is too low, uninstall sudo apt-get remove xxx first and then install it on "how to compile and burn nordic chips under ubuntu" this article is here. I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report