Tianqian 2440 Linux development environment construction

Publisher:FreeSpirit123Latest update time:2024-08-01 Source: cnblogs Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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


Reference address:Tianqian 2440 Linux development environment construction

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

get_user and put_user in linux kernel
Kernel version: 2.6.14 CPU platform: arm   When exchanging data between kernel space and user space, get_user and put_user are two dual-purpose functions. Compared with copy_to_user and copy_from_user (which will be analyzed in another blog), these two functions are mainly used to complete the copying tasks of som
[Microcontroller]
OK6410A Development Board (VIII) 38 linux-5.11 OK6410A Why do we need so many memory managers?
Can't I just use memblock in the end? Is it not possible to skip memblock and directly set buddy? The difference between memblock and buddy Why is buddy the basis of memory manager and other managers? Why do we need to create slab and vmalloc after creating buddy? What are the characteristics of these memory man
[Microcontroller]
Building an AVR development environment under Linux
Environment: ubuntu12.04+atmega128A+JTAG ICE There are already many tutorials on the Internet, and it is naturally easier to follow the path that others have taken, but I still want to summarize it briefly, after all, there are still some differences. (1) Install the toolchain sudo apt-get install binutils-avr a
[Microcontroller]
The whole process of porting Linux2.4.18 core to s3c2410
1. Download the core and corresponding patches: Linux kernel: linux-2.4.18.tar.bz2 patch: patch-2.4.18-rmk7.gz patch-2.4.18-rmk7-swl8.gz patch-2.4.18-rmk7-swl8-cy2.gz patch-2.4.18-rmk7-swl8-cy2-lc3.gz   2. Decompression:    # tar xzvf linux-2.4.18.tar.gz    # gunzip patch-2.4.18-rmk7.gz    # gunzip patch-2.4.18-rmk7-s
[Microcontroller]
Linux Bluetooth Series -- Porting of ARM-Linux Bluetooth Tools
1. Kernel modification ------------------------------------------------------------ Make the Bluetooth core into a module. And configure as follows, Bluetooth subsystem support  --- L2CAP protocol support SCO links support RFCOMM protocol support
[Microcontroller]
linux2.6.32.2 mini2440 platform transplantation--ADC driver transplantation
1.2.1 About the ADC and touch screen interface of S3C2440 The Linux-2.6.32.2 kernel does not provide an ADC driver that supports S3C2440, so we designed one ourselves. This driver is relatively simple and is a character device. In the S3C2440 chip, the AD input and touch screen interface use a common A/D converter,
[Microcontroller]
linux2.6.32.2 mini2440 platform transplantation--ADC driver transplantation
About S3C2440 RTC real-time clock driver configuration and modification under Linux
  The support for S3C2440 RTC under Linux is very complete. We only need to make simple modifications to use RTC        1. vi arch/arm/mach-s3c2440/mach-smdk2440.c        static struct platform_device *smdk2440_devices __initdata = {        &s3c_device_usb,        &s3c_device_lcd,        &s3c_device_wdt,    
[Microcontroller]
From Linux to RISC-V: Only through collaboration and sharing can the true value of open source be revealed
As the industry's first truly open source processor architecture, RISC-V has attracted much attention since its launch. For the industry, the impact it has brought to the industry and the ecosystem is probably no less than the launch of Linux. Picture: Almost all the world's first-tier semiconductor manufacturers h
[Semiconductor design/manufacturing]
From Linux to RISC-V: Only through collaboration and sharing can the true value of open source be revealed
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号