当前位置:网站首页>BearPi-HM_ Nano development environment
BearPi-HM_ Nano development environment
2022-07-06 17:37:00 【Moon Dream Studio】
Set up the environment
Environmental requirements
Hardware requirements
- Linux The server
- Windows The workbench ( Host computer )
- BearPi-HM_Nano Development board
- USB Type-C Line (Windows The workbench passes USB And BearPi-HM_Nano Development board group connection )
The connection relationship of each hardware is shown in the figure below .
chart 1 Hardware wiring diagram
Software system requirements
surface 1 BearPi-HM_Nano Development board development platform requirements
Hardware | Software | describe |
---|---|---|
Linux Build server | operating system | Ubuntu16.04 And above 64 Bit system version ,Shell Use bash |
Windows The workbench | operating system | Windows XP/Windows7/Windows10 |
remarks : Developers can Windows Program development in the workbench , Or log in remotely to Linux Server for program development .
Linux Build tool requirements
Linux The tools required for server general environment configuration and their acquisition methods are shown in the following table .
surface 2 Linux Server development tools and access
development tool | purpose | Access |
---|---|---|
Cross compiler gcc_riscv32 | Cross compiler tool | Baidu SkyDrive Please enter the extraction code Extraction code :1234 |
Python3.7+ | Compile build tools | https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz |
SCons3.0.4+ | Compile build tools | Get through the Internet |
bash | Command processor | Get through the Internet |
build-essential | Compile the dependent base package | Get through the Internet |
gn | produce ninja Compile the script | Baidu SkyDrive Please enter the extraction code Extraction code :1234 |
ninja | perform ninja Compile the script | Baidu SkyDrive Please enter the extraction code Extraction code :1234 |
Windows Development tool requirements
surface 3 Windows Workbench development tools and access
development tool | purpose | Access |
---|---|---|
Visual Studio Code | Code editing tool | https://code.visualstudio.com |
MobaXterm、PuTTY Or other super terminals ( Choose one ) | Remote connection Linux Build server , Connect module serial port tool | Get through the Internet ( Such as :https://mobaxterm.mobatek.net/) |
CH341SER.EXE | USB Serial port drive | Search for ch340g - Nanjing qinheng Microelectronics Co., Ltd |
Hiburn Burning tools | Code burning tool | Baidu SkyDrive Please enter the extraction code password :1234 |
Install and compile the basic environment
Connect Linux The server
Use Windows Remote login Linux, With MobaXterm Tools, for example :
open MobaXterm Tools , Input Linux The server IP Address , Then click “OK”, Open the connection .
chart 2 MobaXterm Interface sample diagram
Pop up alarm selection “ yes (Y)”.
Enter the account number in the pop-up interface and press enter , Continue to enter the password and press enter .
chart 3 Login interface diagram
Login successful .
chart 4 Login success screen
take Linux shell Change it to bash
see shell Is it bash, Run the following command at the terminal
ls -l /bin/sh
If yes, it displays /bin/sh -> bash It's normal , Otherwise, please modify it in the following way :
Method 1 : Run the following command at the terminal , And then choose no.
sudo dpkg-reconfigure dash
Method 2 : Delete first sh, Then create soft links .
rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh
install Python Environmental Science
open Linux Compile the server terminal .
Enter the command “python3 --version”, see Python Version number . Need to use python3.7 Above version , Otherwise, please follow the following steps , With python3.8 For example :
If Ubuntu Version is 18, function "sudo apt-get install python3.8"
If Ubuntu Version is 16, Please install by downloading the package python:
- python Installation environment depends on (gcc, g++, make, zlib, libffi) Please run :
"sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev "
- obtain python3.8.5 Installation package , Put it in linux Server , function :
“tar -xvzf Python-3.8.5.tgz && cd Python-3.8.5 && sudo ./configure && make && sudo make install”
determine Python-3.8.5 After installed , function "which python3.8", Link the echo path to "/usr/bin/python", Example :
"cd /usr/bin && sudo rm python && sudo ln -s /usr/bin/python3.8 python && python --version" If the system exists python3, adopt "python3 --version" Instruction query version , If it is not 3.7 Above version , You also need to execute the following instructions "cd /usr/bin && sudo rm python3 && sudo ln -s /usr/bin/python3.8 python3 && python3 --version"
install Python Package management tools , function “sudo apt-get install python3-setuptools python3-pip -y” command .( Need to be root/sudo Permission installation ), upgrade pip3 function "sudo pip3 install --upgrade pip".
Or install it according to the official website Python Package management tools : download "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py" after , Re execution "python get-pip.py"
install python modular setuptools, function "pip3 install setuptools"
function “sudo pip3 install kconfiglib” command , install GUI menuconfig Tools , Proposed installation Kconfiglib 13.2.0+ edition .( Need to be root/sudo Permission installation ).
Or install as follows Kconfiglib 13.2.0+.
download .whl file ( for example :kconfiglib-13.2.0-py2.py3-none-any.whl).
Download path :“kconfiglib · PyPI”
function “sudo pip3 install kconfiglib-xxx.whl” command ( for example :sudo pip3 install kconfiglib-13.2.0-py2.py3-none-any.whl), install .whl file ( Need to be root/sudo Permission installation ).
There may be mistakes :“subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1.”, resolvent :“find / -name lsb_release”, find lsb_release Position and delete , Such as :“rm -rf /usr/bin/lsb_release”
install pycryptodome. function “sudo pip3 install pycryptodome” command , Or install as follows :
explain :
- Installation upgrade file signature depends on Python The component package , Include :pycryptodome、six、ecdsa.
- install ecdsa rely on six, Please follow the document requirements , Install first six, Install again ecdsa.
download .whl file ( for example :pycryptodome-3.7.3-cp37-cp37m-manylinux1_x86_64.whl).
Download path :“pycryptodome · PyPI”.
function “sudo pip3 install pycryptodome-xxx.whl” command ( for example :sudo pip3 install pycryptodome-3.7.3-cp37-cp37m-manylinux1_x86_64.whl), install .whl file ( Need to be root/sudo Permission installation ).
After installation, the interface will prompt “Successfully installed pycryptodome-3.7.3”.
install six. function "sudo pip3 install six --upgrade --ignore-installed six" Or install as follows :
download .whl file ( for example :six-1.12.0-py2.py3-none-any.whl).
Download path :“six · PyPI”
function “sudo pip3 install six-xxx.whl” command ( for example :sudo pip3 install six-1.12.0-py2.py3-none-any.whl), install .whl file ( Need to be root/sudo Permission installation ).
After installation, the interface will prompt “Successfully installed six-1.12.0”.
install ecdsa. function "sudo pip3 install ecdsa" Or install as follows :
download .whl file ( for example :ecdsa-0.14.1-py2.py3-none-any.whl).
Download path :“ecdsa · PyPI”
function “sudo pip3 install ecdsa-xxx.whl” command ( for example :sudo pip3 install ecdsa-0.14.1-py2.py3-none-any.whl), install .whl file ( Need to be root/sudo Permission installation ).
After installation, the interface will prompt “Successfully installed ecdsa-0.14.1”.
install Scons
open Linux Compile the server terminal .
install SCons Installation package ( Need to be root/sudo Permission installation ).
Run the command :“sudo apt-get install scons -y”. If the installation package cannot be found in the software source , Please follow the steps below :
- Download source package ( Download path :“ SCons Downloads ”, recommend SCons The version is 3.0.4+).
- Unzip the source package to any directory .
- Install the source code package : Go to unzip directory , Run the command “sudo python3 setup.py install”( Need to be root/sudo Permission installation ), Wait for the installation to complete .
Enter the command “scons -v”, Check whether the installation is successful . If the installation is successful , The query results are shown in the figure below .
chart 5 SCons Installation success screen
Install compiler environment
instructions :
- If it passes later “HPM Component mode ” or “HPM Package manager command line tool mode ” Access to the source code , No installation required gn、ninja、gcc_riscv32 Compiler tools .
- ( recommend ) If it passes later “ Mirror site mode ” or “ Code warehouse mode ” Access to the source code , Need to install gn、ninja、gcc_riscv32 Compiler tools .
install gn、ninja、gcc_riscv32 When compiling tools , Please ensure that the environment variable path of the compilation tool is unique .
install gn
- open Linux Compile the server terminal .
- download gn Tools : Baidu SkyDrive Please enter the extraction code Extraction code :1234
- decompression gn Installation package to ~/gn Under the path :“tar -xvf gn.1523.tar -C ~/”.
- Set the environment variable :“vim ~/.bashrc”, newly added :“export PATH=~/gn:$PATH”.
- Effective environment variables :“source ~/.bashrc”.
install ninja
- open Linux Compile the server terminal
- download ninja Tools : Baidu SkyDrive Please enter the extraction code Extraction code :1234
- decompression ninja Installation package to ~/ninja Under the path :“tar -xvf ninja.1.9.0.tar -C ~/”.
- Set the environment variable :“vim ~/.bashrc”, newly added :“export PATH=~/ninja:$PATH”.
- Effective environment variables :“source ~/.bashrc”.
install gcc_riscv32(WLAN Module class compilation tool chain )
instructions :
Hi3861 The platform only supports libgcc Static links to runtime libraries , Developers are not recommended to use libgcc Dynamic link of runtime library , It will cause commercial distribution to be GPL V3 Pollution .
- open Linux Compile the server terminal .
- download gcc_riscv32 Tools : Baidu SkyDrive Please enter the extraction code Extraction code :1234
- decompression gcc_riscv32 Installation package to /opt/gcc_riscv32 Under the path :“tar -xvf gcc_riscv32-linux-7.3.0.tar.gz -C ~/”.
- Set the environment variable :“vim ~/.bashrc”, newly added :“export PATH=~/gcc_riscv32/bin:$PATH”.
- Effective environment variables :“source ~/.bashrc”.
- Shell Enter... On the command line “riscv32-unknown-elf-gcc -v”, If the compiler version number can be displayed correctly , Indicates that the compiler was successfully installed .
The copyright belongs to the author and HarmonyOS The technology community is jointly owned , If you want to reprint , Please indicate the source , Otherwise, the legal liability will be investigated
边栏推荐
- Redis快速入门
- MySQL basic addition, deletion, modification and query of SQL statements
- MySQL报错解决
- JVM 垃圾回收器之Serial SerialOld ParNew
- MySQL advanced (index, view, stored procedure, function, password modification)
- Selenium test of automatic answer runs directly in the browser, just like real users.
- C WinForm series button easy to use
- Deploy flask project based on LNMP
- vscode
- 虚拟机启动提示Probing EDD (edd=off to disable)错误
猜你喜欢
[reverse primary] Unique
Concept and basic knowledge of network layering
自动答题 之 Selenium测试直接运行在浏览器中,就像真正的用户在操作一样。
Vscode matches and replaces the brackets
Flink analysis (II): analysis of backpressure mechanism
数据仓库建模使用的模型以及分层介绍
JUnit unit test
[reverse] repair IAT and close ASLR after shelling
The most complete tcpdump and Wireshark packet capturing practice in the whole network
C# NanoFramework 点灯和按键 之 ESP32
随机推荐
【Elastic】Elastic缺少xpack无法创建模板 unknown setting index.lifecycle.name index.lifecycle.rollover_alias
复盘网鼎杯Re-Signal Writeup
[reverse primary] Unique
Redis快速入门
[reverse] repair IAT and close ASLR after shelling
Redis installation on centos7
BearPi-HM_ Nano development board "flower protector" case
04个人研发的产品及推广-数据推送工具
【逆向中级】跃跃欲试
集成开发管理平台
Flink analysis (II): analysis of backpressure mechanism
Connect to LAN MySQL
PySpark算子处理空间数据全解析(4): 先说说空间运算
JVM garbage collector part 2
JUnit unit test
Concept and basic knowledge of network layering
About selenium starting Chrome browser flash back
华为认证云计算HICA
Take you hand-in-hand to do intensive learning experiments -- knock the level in detail
Automatic operation and maintenance sharp weapon ansible Playbook