当前位置:网站首页>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
边栏推荐
- Case: check the empty field [annotation + reflection + custom exception]
- 1. Introduction to JVM
- Flink analysis (II): analysis of backpressure mechanism
- PySpark算子处理空间数据全解析(5): 如何在PySpark里面使用空间运算接口
- Selenium test of automatic answer runs directly in the browser, just like real users.
- C# WinForm中DataGridView单元格显示图片
- Connect to LAN MySQL
- JVM garbage collector part 1
- Example of batch update statement combining update and inner join in SQL Server
- Application service configurator (regular, database backup, file backup, remote backup)
猜你喜欢
Learn the wisdom of investment Masters
信息与网络安全期末复习(基于老师给的重点)
Akamai浅谈风控原理与解决方案
集成开发管理平台
JVM garbage collector part 2
Wu Jun's trilogy insight (V) refusing fake workers
04个人研发的产品及推广-数据推送工具
Interpretation of Flink source code (II): Interpretation of jobgraph source code
C version selenium operation chrome full screen mode display (F11)
The NTFS format converter (convert.exe) is missing from the current system
随机推荐
【逆向】脱壳后修复IAT并关闭ASLR
Connect to LAN MySQL
【MySQL入门】第四话 · 和kiko一起探索MySQL中的运算符
关于Selenium启动Chrome浏览器闪退问题
Learn the wisdom of investment Masters
05 personal R & D products and promotion - data synchronization tool
Application service configurator (regular, database backup, file backup, remote backup)
Models used in data warehouse modeling and layered introduction
Junit单元测试
Huawei certified cloud computing hica
TCP连接不止用TCP协议沟通
Concept and basic knowledge of network layering
Wu Jun's trilogy insight (V) refusing fake workers
04 products and promotion developed by individuals - data push tool
Flink 解析(三):内存管理
mysql 基本增删改查SQL语句
[mmdetection] solves the installation problem
【MySQL入门】第一话 · 初入“数据库”大陆
02 personal developed products and promotion - SMS platform
应用服务配置器(定时,数据库备份,文件备份,异地备份)