1. Assembly language preparation ----- Installation of editor RealView MDK Keil uVision 4.14
1. First, double-click the welcome interface of Keil u Vision 4.14
2. After next, the interface for accepting the installation is displayed.
3. After next, the custom installation directory interface
4. After next, fill in the user information interface
5. After next, the interface of successful installation is displayed.
6. After finishing, you can successfully install MDK ARM V4,14
7. After finish, a short installation interface will be displayed
8. Create a new project ------- new --------u Vision project Create hello.uvproj project in the hello world folder
9. Choose a CPU for the project. I chose Samsung's s3c2410A.
10. Attention!!! Attention!!! This is a simple assembly program, so there is no need to add startup code. Otherwise, the following error will appear when compiling:
hello.axf: Error: L6411E: No compatible library exists with a definition of startup symbol __main.
11. Select the development tool project---manage---components
12. After OK, create the assembler source file file---new test.s (assembler source file) test.sct (scatter loading file) DebugInRam.ini (debugging script file) file
And set the compilation and connection control options. Configure the Target interface (project---option for target), and add the test.s file to the project. Project-------right click----Add---group -----add files to
13. Basic Configuration ----- Linker
14. Basic Configuration--Debug ----
15. Compile and connect the project projiect ---> Build target (F7 shortcut key) Debug the project Debug ----startstop Debug Session (Ctrl + F5 shortcut key)
Remark:
test.s file
addr equ 0x31000100
preserve8
area reset,code,readonly
entry
arm
start ldr r0,=addr
mov r1,#10
mov r2,#20
add r1,r1,r2
str r1,[r0]
b start
end
test.sct file
LR_ROM1 0x30000000
{
ER_ROM1 0x3000000 0x1000000
{
*.o(RESET,+First)
*(InRoot$$Sections)
.ANY(+RO)
}
RW_RAM1 0x31000000 0x01000000
{
.ANY(+RW+ZI)
}
RW_IRAM 0x40000000 0x00001000
{
.ANY(+RW+ZI)
}
}
DebugInRam.ini File
FUNC void Setup(void)
{
PC=0x030000000
}
map 0x00000000,0x00200000 read write exec
map 0x30000000,0x34000000 read write exec
Setup();
I still don't understand the Scatter file. It should be related to the address space allocation of a specific practical development board. I'm looking into it.
Previous article:ARM commonly used pseudo instructions
Next article:Linux Embedded ARM-Linux Basics
- Popular Resources
- Popular amplifiers
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
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University Hall----Mentor PADS VX2 four-layer router
- LLC formula derivation, loop compensation transfer function derivation calculation and simulation
- EEWORLD University Hall ---- Introduction to Deep Learning
- [FreeRTOS check-in station 4 opens] Inter-task communication, closing time is August 23
- After the PWM frequency of STM32 reaches 500KHZ, can it be increased or decreased by 1KHZ?
- [Technical Discussion] How to troubleshoot electromagnetic interference in wireless communications?
- Urgent recruitment
- First day of work in the Year of the Ox
- Micron ships 232-layer NAND, expanding the boundaries of 3D NAND technology——Win gifts by passing levels now!
- The Present and Future of Finger Vein Recognition Technology (Electronics Industry Procurement)