One, cross-compilation tool chain installation and testing
Installation method
1. GCC uses arm-linux-gcc-4.3.2, unzip the package, the path is set to the root directory (Ubuntu requires sudo)
Tar xzvf arm-linux-gcc-4.3.2.tar.gz-c/
modifying environment variables
(For RHEL6)
Vim/root/.bashrc
Add to
Expert path= $PATH:/usr/local/arm/4.3.2/bin
After saving and exiting, execute the surce command to reload
Source/root/.bashrc
(for Ubuntu 14.04)
sudo vim/ect/profile
Add to
Expert path= $PATH:/usr/local/arm/4.3.2/bin
After saving and exiting, execute the surce command to reload
Source/ect/profile
A library of cross-compilation toolchain (such as libc.so.6) is typically stored in
In the/usr/local/arm/4.3.2/arm-none-linux-gnueabi/lib directory
2. Compiling bare metal Programs
Put three pre-prepared files (led.lds LEDs. S Makefile) put in a folder, compile
Arm-linux-gcc-g-O led.o-c led. S//Compile not link arm-linux-ld-tled.lds-o led.elf LED.O//production via linker. Elf file Arm-linux-objcopy-o Binar Y led.elf led.bin//Convert. elf files to. bin files
Write the generated. bin file to the NAND flash of the Development Board for testing
1.1 Connect the Development Board and Serial line, flash switch to the Norflash end, turn on the power, PC side through the CRT Operation Development Board
1.2 Development Board Connect USB cable PC,CRT uboot Directory Select the first item
Download U-boot or other bootloader to Nand Flash
1.3 After entering the download mode, start the TQ download program and burn the bin file to NAND flash.
1.4 After successful write, disconnect the USB port, power off the Development Board, turn on the NAND flash side, turn on the power, the LED light is lit
This article is from the "Home Life" blog, please be sure to keep this source http://elvin1122.blog.51cto.com/9889796/1838638
1-1 Bare Metal Tool installation