[1] Environment Construction
Install the cross-compilation toolchain (arm-linux-gcc4.4.3)
See Bolg for details.
Cross-compilation basics
arm-linux-gcc common commands
1. Check the search path of header files and library files:
arm-linux-gcc -print-libgcc-file-name
2.arm-linux-gcc common commands
arm-linux-gcc -g -c led.S
//-c is for assembly-only operation -g adds debugging information
arm-linux-ld -Tled.lds -o led.elf led.o
//Perform link operation
arm-linux-readelf -a led.elf
//View the elf file header information
arm-linux-objdump -D -S led.elf
//Perform disassembly operations
arm-linux-objcopy -O binary led.elf led.bin
//Convert to binary file
Makefile Basics
basic structure
target: prerequisites
command
Using variables
- Definition: obj=func1.o func2.o
- Use: $(obj)
Special variables
- $^: represents all dependent files
- $@: represents the target
- $< : represents the first dependent file
General rules (examples)
%.o : %.c
arm-linux-gcc -o %@ -g -c %^
Linker script
SECTIONS {
. = 0x30008000;
. = ALGN(4);
.text :
{
start.o(.text)
*(.text)
}
. = ALGN(4);
.data :
{
*(.data)
}
bss_start=.
. = ALGN(4);
.bss :
{
*(.bss)
}
}
Set the starting link address
. = 0x30008000;
Set 4-byte alignment
. = ALGN(4);
Using variables
bss_start=.
Code snippet header file
start.o(.text)
*(.text)
Eclipse Integrated Development Environment
- arm-linux-gcc
- arm-linux-gdb
- JLink_Linux
- eclipse
Note: Environment variables are configured in /etc/profile.
Previous article:[ARM bare metal program][8]ARM processor startup process (S3C2440)
Next article:[ARM bare metal program][2] TQ2440, ADS1.2, JLINK to establish an integrated development environment
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Europe's three largest chip giants re-examine their supply chains
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- The agency predicts that my country's public electric vehicle charging piles will reach 3.6 million this year, accounting for nearly 70% of the world
- U.S. senators urge NHTSA to issue new vehicle safety rules
- Giants step up investment, accelerating the application of solid-state batteries
- Guangzhou Auto Show: End-to-end competition accelerates, autonomous driving fully impacts luxury...
- Internal Hardware Resources of PIC Microcontroller 16F84 (Part 3)
- Recommend a fast source code style conversion tool AStyle
- Precautions for using LCD segment display
- Development board chip coin auction, one every day! Today's auction development board: GOKIT Gizwits Intelligent Hardware Development Board
- Analog Electronic Circuit Learning Tutorial
- Talk about the future of Wi-Fi 6 and predict who will lead the wireless connection
- C6000 Cache (cache) part of the working status description
- Regarding the calculation of the closed-loop coefficient of the phase-locked loop, I need help from the experts.
- This circuit doesn't seem to work!
- Analysis of Linear Frequency Modulation Characteristics of Synthetic Aperture Radar Echo Signal