ARM development environment construction under WinXP
XP version: 2002 Service Pack 3
Tools used:
Eclipse as a compile/debug IDE;
Mingw as Linux compilation environment;
ARM-EABI as a cross-compilation environment;
Jlink as debugger;
Main reference articles:
《Build andDebug U-Boot in Eclipse Helios On Window XP.pdf》
"Using Sourcery CodeBench to compile u-boot.doc based on am3359 in Windows environment"
To modify the package version in Mingw, please refer to the website http://sourceforge.net/projects/mingw/files/Installer/mingw-get/ (I haven't tried it)
Note: If there is anything unclear about the environment setup, you can refer to the two articles above to see how it is done.
Software used:
MinGW:mingw-get-setup.exe
ARM-EABI:arm-2011.03-42-arm-none-eabi-i686-mingw32.tar.bz2
JRE:jre-7u51-windows-i586.4008071178.exe
Eclipse:eclipse-cpp-kepler-SR1-win32.zip zylincdt4.18.1
Mini2440 Development Board Resources
ARM:S3C2440A
Nor Flash:SST39VF1601 ---2MB
Network chip: DM9000EP
SDRAM: HY57V561620FTP-H 133MHZ 2 * 32MB SDRAM
NandFlash: K9F1208U0B:64MB
Uboot version: 2011.03
Download the required version from the uboot official website http://ftp.denx.de/pub/u-boot/: u-boot-2011.03.tar.bz2.
This article provides two methods for setting up the environment. Method A is to download and install from the Internet, and Method B is to use the downloaded tools directly, but it is also a complicated step. If there is anything that is not explained in place, you can refer to Method A and B. The reference of the above article is also indispensable.
Method A:
First compile it in the Mingw command line window.
1. Install Mingw.
Download mingw-get-setup.exe from the official website http://sourceforge.net/projects/mingw/files/.
mingw-get-setup.exe is an installation management software. You can choose the installation path yourself. The name of the management software after installation is "MinGW Installation Manager". Select all Packages in Basic Setup (currently only BasicSetup has been installed and no problems have been found), and then Apply Changes. The corresponding path of MinGWInstallation Manager is: MinGWlibexecmingw-get guimain.exe
Create an msys.bat file according to the 5th and 6th pages of Build and Debug U-Boot in Eclipse Helios On Window XP.pdf. Then double-click to open it and enter the Mingw command line window. Enter gcc –v, as shown below. If you cannot check the gcc version, you can refer to the "Installation Environment" section in Method B.
2.ARM-EABI
Download the ARM cross-compilation tool from https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription?@template=lite.
Select either .exe or .bz2
The current version is: 2013.11-24-V4.8.1
3. uboot
Download the required version from the uboot official website http://ftp.denx.de/pub/u-boot/ u-boot-2011.03.tar.bz2, and then unzip the bz2 file through the Mingw command window.
4. Compile on the Mingw command window.
Before compiling, the junction mentioned in the reference article and the strip mentioned in the other article were not used, but the compilation was successful.
Refer to the "Setting up the MinGW environment" and "Compiling mini2440" sections in Method B.
The following errors have occurred. Three changes were made to the URL, but only two were found here.
The arm version above is still the previous 4.5.2, which has been changed to 4.8.1 later, but this just explains an error.
If the Mingw command line window above compiles successfully, you can compile it in the Eclipse environment. Before installing Eclipse, you must first install jre.
5. Install jre.
Type Java Runtime Environment on Baidu, the first one is, download and install.
6. Install Eclipse.
Download from Eclipse official website http://www.eclipse.org/downloads/.
The 32-bit version is downloaded here, you can just unzip it and no installation is required.
7. Install zylincdt.
Download zylincdt, you can also install it online. Here is the direct download and installation.
At first, I downloaded 4.16.1 from http://repo.or.cz/w/zylincdt.git, and always got errors when installing it through Eclipse->help->Install Newsoftware.
Then I checked the Automatically checkbox in Eclipse->window->Preferences->Install/Update (it should have nothing to do with this).
And by downloading zylincdt4.18.1 from http://opensource.zylin.com/zylincdt/, the first installation also failed, and I installed it again, and there was no error message during the installation.
Note: Downloading 4.18.1 from http://repo.or.cz/w/zylincdt.git should be able to install successfully.
8. Compile settings
Create a uboot project and modify the environment variables. Then compile it and it will work. The contents of Junction and strip have not been modified, but it has been compiled. I don't know if there are any problems. I can only wait until the next step of debugging and verification.
Regarding how to open the uboot project in Eclipse, please refer to "Using Sourcery CodeBench to compile u-boot.doc based on am3359 in the window environment", and there are also shortcuts for make distclean and config. As shown in the figure below:
In the following step, make sure that the Value in PATH contains only the three newly added paths. Otherwise, an error will be reported.
Among them, T:bin;T:msys1.0bin;D:ProgramARM_CROSSarm-2013.11-24-V4-8-1bin is the path of MinGW and ARM EABI, which depends on the installation path of the local PC.
Build command:
Make CROSS_COMPILE=${CROSS_COMPILE}
Notice:
When using arm-linux-gdb to debug and arm-linux-gcc to compile uboot, it is found that the program execution order is chaotic, not sequential, and some variables cannot be printed out. The reason for this problem is that -Os is used by default to optimize the compilation when uboot is compiled, so this optimization needs to be turned off.
Clear optimization options:
In the top-level directory's config.mk, change OPTFLAGS= -Os#-fomit-frame-pointer to OPTFLAGS= -O0#-fomit-frame-pointer, and run make clean -> make xxxx_config->make all again. You can change it back when you don't need to debug and generate bin files.
9. Debug Settings
Change RunàDebug Configuration to the following figure:
The initialization code used above is as follows:
# connect to the J-Link gdb server
target remote localhost:2331
# Set JTAG speed to 30 kHz
monitor endian little
monitor speed 30
# Reset the target
monitor reset
monitor sleep 10
#
# CPU core initialization (to be done byuser)
#
# Set the processor mode
monitor reg cpsr = 0xd3
#config MMU Configure MMU
#flush v3/v4 cache
monitor cp15 7, 7, 0, 0 = 0x0
#/* flush v4 TLB coprocessor*/
monitor cp15 8, 7, 0, 0 = 0x0
#disable MMU stuff and caches
monitor cp15 1, 0, 0, 0 =0x1002
#Peri port setup
monitor cp15 15, 2, 0, 4 = 0x70000013
#disable watchdog kangear Disable watchdog
monitor MemU32 0x53000000 = 0x00000000
monitor sleep 10
#disable interrupt kangear disable interrupt
monitor MemU32 0x4A000008 = 0xffffffff
monitor MemU32 0x4A00001C = 0x7fff
#set clock
#initialize system clocks --- locktimeregister
monitor MemU32 0x4C000000 = 0xFF000000
#initialize system clocks --- clock-divnregister
monitor MemU32 0x4C000014 = 0x5#CLKDVIN_400_148
#initialize system clocks --- mpll register
monitor MemU32 0x4C000004 = 0x7f021#default clock
#config sdram
monitor MemU32 0x53000000 0x00000000
monitor MemU32 0x4A000008 0xFFFFFFFF
monitor MemU32 0x4A00001C 0x000007FF
monitor MemU32 0x53000000 0x00000000
monitor MemU32 0x56000050 0x000055AA
monitor MemU32 0x4C000014 0x00000007
monitor MemU32 0x4C000000 0x00FFFFFF
monitor MemU32 0x4C000004 0x00061012
monitor MemU32 0x4C000008 0x00040042
monitor MemU32 0x48000000 0x22111120
monitor MemU32 0x48000004 0x00002F50
monitor MemU32 0x48000008 0x00000700
monitor MemU32 0x4800000C 0x00000700
monitor MemU32 0x48000010 0x00000700
monitor MemU32 0x48000014 0x00000700
monitor MemU32 0x48000018 0x0007FFFC
monitor MemU32 0x4800001C 0x00018005
monitor MemU32 0x48000020 0x00018005
monitor MemU32 0x48000024 0x008E0459
monitor MemU32 0x48000028 0x00000031
monitor MemU32 0x4800002C 0x00000030
monitor MemU32 0x48000030 0x00000030
# Setup GDB for faster downloads
#set remote memory-write-packet-size 1024
monitor speed auto
break _start
load
Clear the contents of Source. If you start debugging without clearing the contents at the beginning, the start.S file found during debugging will be incorrect.
Method B:
The reference materials and software used in method B can be found at the 360 cloud disk address http://yunpan.360.cn/, in the "ARM Environment Software" directory, please do not delete it.
1. Installation environment
Unzip MinGW and install arm-2013.11-24-arm-none-eabi.exe.
Add F:ARM-ENVMinGWbin;F:ARM-ENVMinGWmsys1.0bin to the system environment variables, as shown below. Replace F:ARM-ENVMinGWbin;F:ARM-ENVMinGWmsys1.0bin with your own directory. Then log out of the machine.
Double-click msys.bat in the MinGW directory. If it cannot be opened, modify it according to the figure below.
Enter gcc –v in the command line, as shown below.
2. Set up the MinGW environment
Enter the directory where the uboot source code is located, enter tar jxvf u-boot-2011.03.tar.bz2 to decompress the uboot source code to the current directory. Enter the decompressed uboot source code directory.
Then enter in the command line:
PATH=/bin:$PATH
PATH=/F/ARM-ENV/Sourcery_CodeBench_Lite_for_ARM_EABI/bin:$PATH
Then enter arm-none-eabi-gcc –v to see the version information. /F/ARM-ENV/Sourcery_CodeBench_Lite_for_ARM_EABI/bin is the installation path of the arm cross tool.
enter:
exportPATH
CROSS_COMPILE=arm-none-eabi-
exportCROSS_COMPILE
Then type make distclean
Test smdk2410, enter make smdk2410_config
You can also configure it correctly. Then you can make it, but there will be errors when making it. It is better to make 2440 directly, so you need to add the configuration of mini2440.
3. Compile mini2440
Add mini2440 related information to the boards.cfg file in the root directory of uboot.
Reference: http://www.linuxidc.com/Linux/2011-08/40553.htm
Copy the smdk2410 folder under boardsamung to the mini2440 folder, and change the smdk2410.c in the mini2440 folder to mini2440.c, and change the smdk2410.o in the makefile in this directory to mini2440.o.
Previous article:Detailed explanation of porting u-boot-2011.03 to Mini2440 under Windows (2)
Next article:Ucos porting related to 2440 (ARM9)
- 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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- 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
- Is MOV an assembly instruction? The book I am reading now is called 51 Single-Chip Microcomputer C Language Application Development Trinity Practical Explanation. . .
- How to read circuit diagrams.pdf
- [Instrument Sharing] How to use an oscilloscope to monitor the waveform of a low-frequency signal? Adjusting these three keys is enough
- How does the MK60 serial port receive a string of indefinite length?
- Microchip live broadcast at 10:30 this morning | ADAS platform trusted root, learn technology and win gifts!
- Low-cost, high-precision digital control solution for battery testing equipment
- Random errors in XINTF read and write of F28335
- STM32L431 strange assignment problem?
- Emulating I2C communication using GPIO on C2000
- High-speed and high-quality image rotation based on FPGA.pdf