当前位置:网站首页>SoC development environment and hardware development preparation

SoC development environment and hardware development preparation

2022-06-10 21:39:00 guangod

I have been exposed to before linux Development board , Should be 2014 The arm of kindness purchased in 210, It also cost a lot of money , But it has never been used , There is nothing to do . This project is based on a soc Of , So let's start with this chip development environment .

About pre development ubuntu Use , in 2019 when , It has been used for some time , So no stranger . But no program has been developed on it . My own computer is originally a dual system . So it's not like the company's previous projects , What else to install vm ware, Still in windown Lower installation linux virtual machine .

ubuntu Development environment installation

vsftp

ubuntu And windows Do interactive , Pass documents to each other (windowns One needs to be installed at the end ftp Tools , image file zilla, Virtual machine installation ubuntu It is equivalent to a computer that can set up its own network ip, Through this ip,windowns And ubuntu You can transfer files to each other .). Do network transmission , Because it is based on Linux ubuntu Development , So this can be done without ANN for the time being .

Terminal execution ,sudo apt-get install vsftpd

At the same time, start it up , perform :/etc/init.d/vsftpd restart, And then in windows End boot ftp Tools , You can see that ubuntu The files under the .

After installing this tool , Press at the same time ctrl+alt, You can easily cut out to windows

install vim

Editor of script terminal , Used to give orders . Play this before ubuntu when , It should also be installed .

Terminal execution :

sudo apt-get purge vim common
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vim

install gcc And g++

Terminal execution gcc -v; Default ubuntu It is brought by itself. .
Terminal execution g++ -v; The default is also self-contained .

If it's not installed , Is executed sudo apt-get install g++// compile c++ Program ,
sudo apt-get install gcc// compile c Program

install vscode

Used to write code , It's already installed . There are three ways to install :

  1. sudo dpkg -i Installation package name .deb( This is linux Lower installation package format )

  2. make make install, Download the source code

  3. apt-get , Network installation mode , It's like a cell phone .

install git

be used for git Code and management .

perform sudo apt-get git

Hardware development preparation

When you get it , Generally, the hardware is like Quanzhi or Qigan SOC Chip linux The operating system is already installed , It's usually OS It's loaded TF Inside the card . Power on first , Wait for the system to start , Plug it in again USB The debug port also has Ethernet or mobile card .

Installing serial port driver

windows The next step is to pretend ch340 Or other drives ,ubuntu The next step is to install the corresponding driver .

Then install tools that interact with the board, such as moba or Xbell, Connect to the serial port on the board through the serial port , You can interact .

Install Ethernet driver

The single chip computer generally passes through jlink or stlink To download the program , but linux Most of the time, programs are downloaded or debugged through Ethernet .

adopt scp file [email protected] The board IP, To transfer files to the board linux.

Make system firmware ( You can also skip )

The routine is to prepare TF Card reader , And then tf The card becomes a boot disk . And then put linux Burn to External flash Just inside .

Add

Check the system version

perform :uname -a

When installing the software, you will encounter the problem that you cannot obtain resources , Whether there are other resources being occupied , Such as sudo apt-get install Prompt not available

This indicates that an upgrade of the software is required . You need to perform the following two steps .

sudo apt-get update// Update resources 
sudo apt-get  upgrade// Update software 

Build the board side development environment

Implementation process : First in pc End to write a good program , Through the cross compiler tool , Download to the board to run .

Cross compiler

It can be generated in arm End runnable program , And then copy to arm Upper linux In the system , Then it interacts with the board through the serial port , Send the command to run this program , You can see on the board linux In the process of executing this program .

Select the cross compilation environment

pwd: Displays the path of the relevant directory ., Build a path :sudo mkdir -p /home/guangod/qgsdk/buildroot
notes : Delete a path :sudo rmdir -p /home/guangod/qgsdk/buildroot

example

Tina Linux Is based on openwrt-14.07 Version of the software development kit . and openwrt Is an open source embedded system linux Automatically build the framework , from makefile and kconfig constitute .

Development process

Check system requirements

Only support ubuntu Compilation under the operating system .

Build a compilation environment

The development machine needs to install various software packages and tools

Choose the device

Before compiling the source code , Developers need to export predefined environment variables first , Then, according to the needs of the developers , Select the corresponding hardware board type .

System customization

Developers can use the hardware board 、 Product definition , customized U-Boot、Kernel And Openwrt

Compile and package

Complete device selection 、 Execute the compile command after the system is customized , Including the whole or module
Translation and compilation cleaning , further , The generated boot/ Kernel binaries 、 Root file
System 、 Package into firmware according to certain format .

Burn and run

After generating the image file , How to burn an image and run it on a hardware device .

Build the host compilation environment ( The corresponding is ubuntu Development environment installation )

ubuntu As a compilation server , adopt usb Or the serial port is connected to the development board , The compiled image file can be burned to the target hardware board , And debug the program .

Need to install gcc, binutils, bzip2,flex, python, perl, make,ia32-libs, find, grep, diff, unzip, gawk, getopt, subversion, libzdev, libc headers.
Or enter the command directly :
sudo apt-get install build-essential subversion git libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip ia32-libs-y

Operating time , Whether it is to input the installation commands one by one or other installation methods , There will be the problem that the software package cannot be located ???
The reason is : When copying, the slash is full angle , Input one half angle , You can install it directly .

The package cannot be located ia32-libs-y The problem of ?

Install the alternate installation package :sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386

stack overflow Answers on :

sudo -i
cd /etc/apt/sources.list.d
echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs

Burning software installation

Path is :/media/guangod/ Entertainment disc /QiganCenter/software/tools/aw_tools/.
Use ./LiveSuit.run No prompt at runtime dkms?

No solution dkms problem ?

dkms Is a kernel module management tool .
Selected publishing sources at the beginning , There is no such thing , Later, I was instructed by my colleagues , Search on Baidu dkms Installation package , Found in ubuntu This bag is available on the official website , Re in " Software and updates " choice ubuntu Official release source , Re execution sudo atp-get install dkms, Okay , It's installed .

Use

Enter the command first :cd ~/Bin/LiveSuit

Then input :./LiveSuit.sh

In the process of execution “error while loading shared libraries: libpng12.so.0 : cannot open shared object file: No such file or directory”??

from Launchpad.net This installation package , Just install it directly .

原网站

版权声明
本文为[guangod]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206102025402568.html