With only a single OK6410 board, a 8G SD card, no associated JTAG debugger, and no integrated development environment available, how do bare metal development work? The Manual for query development shows that the 6410 chip supports booting from the SD card, so bare metal development starts with the SD card.
1. Construction of development environment
First build the virtual machine platform, install the Linux development environment centos6.5, the installation process is not mentioned here.
2, cross-compilation environment installation
Enter centos6.5, create a new Gnutools directory under the/home directory, andarm-linux-gcc-4.3.2.tgz (information on the Development Board)Copy files toCentOSof the/home/gnutoolsdirectory under. In theCentos6.5To create a new terminal, enter the following command to install the crossCompiler:
#cd/home/gnutools(Enter/gnutoolsDirectory)
#tar ZXVF arm-linux-gcc-4.3.2.tgz
compiler software extract to current folder, Add the cross compiler path to the system environment variable and you can enter arm-linx-gcc Life order to compile the program.
:vi. Bashrc
Add /home/guntools/usr/local/arm/4.3.2/bin to $path variable
Save, exit.
Reboot the system and execute Enter as shown:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/4A/wKioL1b72OXzfwslAAXHSriKqeI454.jpg "title=" Untitled. jpg "alt=" wkiol1b72oxzfwslaaxhsrikqei454.jpg "/>
3, OK6410 SD card starts
OK6410 The fixed-size contents of the SD card fixed position are copied into internal SRAM after power-up, and after the copy is completed, the code is executed from internal SRAM, and the details about the SD card start-up readers can reference <<s3c6410_internal_rom_ Booting.pdf>>
OK6410 start the process as shown in:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/4F/wKiom1b7266zAMvfAAH2R_uC3d8210.jpg "title=" Untitled 1.jpg "alt=" Wkiom1b7266zamvfaah2r_uc3d8210.jpg "/>
4. SD Card Write location
How is the written code written to the SD card and where is it written to the SD card? As you can tell, the code is written to the BL1 storage location, then the hardware power will copy the BL1 to
Internal RAM (stepping stone) executes. View the resources <<s3c6410_internal_rom_booting.pdf>>, as shown in:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/4B/wKioL1b73mGCehinAAECJxnp5X4486.jpg "title=" Untitled 2.jpg "alt=" Wkiol1b73mgcehinaaecjxnp5x4486.jpg "/>
As can be seen: the SDHC card BL1 is in: total_sector-reserved-sigature-bl1= 1042th sector
5, code write BL1 location
Insert the SD card into the Linux environment input Fdisk-l/dev/sdb as shown:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/4B/wKioL1b74FnhtqUYAAHoh19Z0I0022.jpg "title=" Untitled 3.jpg "alt=" Wkiol1b74fnhtquyaahoh19z0i0022.jpg "/>
Calculate BL1 's Location: bl1=total_sector-reserved-sigature-bl1=7744782336/512-1042=15125486
Then write the code to the SD card, where the LED light is illuminated as an example, as shown in:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/4F/wKiom1b74WjTCdiTAADlE-3iwMo748.jpg "title=" Untitled 4.jpg "alt=" Wkiom1b74wjtcditaadle-3iwmo748.jpg "/>
6, set OK6410 start mode
Make a good SD card into the slot of the Development Board SD. Switch on the Power
The dial switch is set to SD card boot. As shown in the following:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/4F/wKiom1b74mOyShvIAAJ2Uzlesoc810.jpg "title=" Untitled 5.jpg "alt=" Wkiom1b74moyshviaaj2uzlesoc810.jpg "/>
Conclusion: The code is executed in SRAM, and the LED light is lit.
This article is from the "Gavin" blog, make sure to keep this source http://gavin2.blog.51cto.com/1703264/1758615
s3c6410 Bare Metal development based on SD card