1. Platform
vmware workstation pro 15 ,ubunutu-server 18.04 changed the source to Alibaba Cloud.
2. Install the compilation environment:
sudo apt install build-essential lsb-core lib32ncurses5
lsb-core and lib32ncurses5 are related to the installation of arm-linux-gcc.
3.Configure static IP:
Prerequisite steps: Use VMware's virtual network editor to turn off the DHCP of the virtual network card and set the subnet address and gateway.
In the host's Network Sharing Center, change the properties of vmnet8 according to the information in the virtual network editor and configure the IP and gateway.
Configure manual IP in Ubuntu:
$ ifconfig #Query the network card
$ sudo vi /etc/netplan/"The file name here depends on the specific situation"
The file content is modified as shown below, and the specific IP is self-determined:
network:
ethernets:
ens33:
addresses:
- 192.168.168.168/24 #ubuntu ip The 24 here is fixed and related to the subnet mask
dhcp4: false
gateway4: 192.168.168.2 #Gateway address
nameservers:
addresses:
- 114.114.114.114 #dns server
- 8.8.8.8
- 8.8.4.4
search:
-localdomain
optional: true
version: 2
:wq save and exit
sudo netplan --debug apply
There is a big pit here. If it is $ sudo netplan apply, an error will be reported. I don’t know the reason.
4. Configure ssh password-free login
vim ~/.ssh/authorized_keys
Paste the host's public key (id_rsa.pub) content into it and restart to log in without a password.
If there is no .ssh directory, create one using mkdir.
5. Install dnw
First configure the driver development environment to prepare for compiling the USB driver later.
Check the kernel version:
uname -r
sudo apt install linux-headers-4.15.0-180-generic # Execute according to the specific version
sudo apt install linux-source-4.15.0
dnw needs to be downloaded and compiled by yourself in Linux environment
The warehouse address is as follows, and the installation method is shown in readme
https://github.com/Chemelon/dnw-linux.git
6. Install minicom (or use serial port software directly on the host)
Minicom configuration method reference:
https://blog.csdn.net/qq_38880380/article/details/77662637
7. After all the installations are completed, you can happily view, download, and debug code in vscode.
8. Add common instructions
SSH transfers files from local to server:
scp
scp -r
Exchanging two paths means downloading from the server to the local computer.
Edit the environment variables:
sudo vi ~/.bashrc
Add export PATH= at the end of the path to be added to the environment: $PATH
Then
source ~/.bashrc
Part II:
Installation and use of arm-linux-gdb and openocd
2.1 Installation of openocd
It is relatively simple, and there are many articles on Baidu. You can also install it directly using apt:
sudo apt install openocd
use:
openocd -f interface/jlink.cfg -f target/samsung_s3c2440.cfg
Link Development Board
According to the prompt information, you may need to specify the frequency of jlink. Just add adapter_khz 6000 in jlink.cfg.
If there is no error message, openocd is listening on localhost's 6666, 4444, and 3333 for TCP, Telnet, and GDB connections.
2.2 arm-linux-gdb installation
You can learn about the differences between various versions of gdb on Baidu
from:
https://www.sourceware.org/gdb/download/
Download gdb source code
After decompression, use in the gdb source directory:
./configure --target=arm-linux --disable-werror --with-expat --prefix=/usr/local/arm-gdb -v
Configure gdb version
Then make && sudo make install
If expat is missing then use:
sudo apt-get install libexpat1-dev expat
After successful installation, add in ~/.bashrc
export PATH=$PATH:/usr/local/arm-gdb/bin
Use arm-linux-gdb -v to check whether the installation is successful
Previous article:Understanding of link address and runtime address
Next article:Three ways to add drivers to ARM9 (S3C2440)
Recommended ReadingLatest update time:2024-11-15 15:10
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- USB Issues
- Some useful terms related to antennas
- ST Low Power RF Products FAQ
- MSP430 FRAM Microcontrollers Enable Energy Harvesting
- EEWORLD University ---- 3-Level Buck Converter: How Does It Work?
- [CC1352P Evaluation] Analysis of ROM code calling method
- What exactly is “Passive Internet of Things”?
- Know some DSP memory management
- [Analysis of the topic of the college electronic competition] - 2016 Jiangsu Province TI Cup F "Bit Synchronous Clock Extraction Circuit"
- Problems found when connecting stm32f103vet6 to ferroelectric FM28V020