How to transfer files between Tiny4412 and PC:
There are currently four main ways to download the compiled executable file to the target board:
The first method: transfer files to the development board via FTP (recommended)
The second method: copy to a medium (such as a USB drive)
The third method: transfer files to the development board through the serial port
Fourth: Start with nfs file system as the root file system
The following are introduced separately:
1. Use ftp to transfer files (recommended):
Note: Use FTP to log in to the target board and upload the compiled program; then modify the executable properties of the program on the target board after uploading and execute it.
First, execute on the PC as follows:
ftp 192.168.48.151
Username: plg
Password: plg
Set the file transfer format: bin
Send hello file: put hello
Log out: by
Then, execute on the target board side as follows:
Go to the receiving directory: cd /home/plg/
ls
Add executable permissions: chmod +x hello
Run the test: ./hello
2. First copy the compiled executable program to the USB drive, then insert the USB drive into the target board and mount it, and then copy the program to the executable directory/bin of the target board:
①. Copy the program to the USB drive
Insert the USB drive into the USB port of the PC and execute the following command to copy the program to the USB drive:
#mount /dev/sda1 /mnt ; mount the USB drive
#cp hello /mnt ; copy the compiled program to the USB drive
#umount /mnt ; Unmount the USB drive
②. Copy the program from the USB drive to the target board and execute it
Insert the USB drive into the USB Host interface of the development board. The USB drive will be automatically mounted to the /udisk directory. Execute the following command to run the hello program.
#cd /udisk
#./hello; execute the hello program
Note: If you forcibly unplug the USB drive at this time, you need to return to the root directory and execute umount /udisk to prepare for automatic mounting next time.
3. Transfer files to the development board via the serial port:
In Chapter 5.3.5, we learned how to transfer files to the development board through the serial port. You can also use the same method to transfer the hello executable program. The specific steps will not be described in detail here. Remember to change the file attributes to executable after the transfer is completed so that it can run normally.
#chmod +x hello
Note: Some users use USB to serial port cables. Because the performance of some adapters is not very good, sometimes "transmission timeout" or failure to transmit to the development board may occur. Therefore, we recommend using FTP to transmit to the development board.
4. Start with nfs file system as the root file system:
①. Refer to the blog post " Tiny4412 Friendly Arm ARM Development Board Static IP Settings (Restart Valid) " to set the IP of the development board to static;
Refer to the blog post " How to install NFS service and its configuration in Ubuntu " to start Ubuntu's nfs service
②.Ubuntu installs nfs service:
sudo apt-get install nfs-kernel-server
Ubuntu nfs restart service
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-kernel-server restart
View nfs server on Ubuntu:
sudo /etc/init.d/nfs-kernel-server start //Check whether nfs is started
③.Add permissions:
sudo vi /etc/exports
Add to:
/home/book/workspace/tiny4412_project/rootfs_qtopia_qt4 *(insecure,rw,async,no_root_squash)
/home/book/workspace/tiny4412_project/new_fs_tiny4412 *(insecure,rw,sync,no_subtree_check,no_root_squash)
sudo chown book:book /home/book/workspace/tiny4412_project/rootfs_qtopia_qt4/ -R
sudo chown book:book /home/book/workspace/tiny4412_project/new_fs_tiny4412/ -R
chmod 777 /home/book/workspace/tiny4412_project/rootfs_qtopia_qt4
chmod 777 /home/book/workspace/tiny4412_project/new_fs_tiny4412
④.Try to hang it on yourself on Ubuntu:
//Mount the file system provided by the manufacturer
sudo mount -t nfs -o nolock,vers=2 192.168.48.104:/home/book/workspace/tiny4412_project/rootfs_qtopia_qt4 /mnt
//Mount your own file system
sudo mount -t nfs -o nolock,vers=2 192.168.48.104:/home/book/workspace/tiny4412_project/new_fs_tiny4412 /mnt
sudo umount /mnt
⑤. Manually mount nfs on the tiny4412 development board:
//Mount the file system provided by the manufacturer
mount -t nfs -o nolock,vers=2 192.168.48.104:/home/book/workspace/tiny4412_project/rootfs_qtopia_qt4 /mnt
//Mount your own file system
mount -t nfs -o nolock,vers=2 192.168.48.104:/home/book/workspace/tiny4412_project/new_fs_tiny4412 /mnt
⑥. The tiny4412 development board nfs is started as the root file system (self-made file system):
Reference: " Start u-boot from SD card and burn bare board and system " and " Use fastboot tool to download uboot, linux and file system of tiny4412 ". After compiling and burning uboot, linux and filesystem, use eMMC to start the development board and set the ip address of the development board when linux starts. Then set the uboot parameter bootargs and use nfs to start the root file system:
Modify the command line:
default:
set bootargs root=/dev/mmcblk0p2 init=/linuxrc console=ttySAC0,115200 lcd=S70 ctp=2
to:
seten bootargs noinitrd root=/dev/nfs nfsroot=192.168.48.104:/home/book/workspace/tiny4412_project/new_fs_tiny4412 ip=192.168.48.100:192.168.48.104:192.168.48.255:255.255.25 5.0::eth0:off init=/ linuxrc console=ttySAC0,115200 lcd=S70 ctp=2
Note: Tiny4412 uses a USB network card, which is not supported by the current uboot. Therefore, it is not possible to start uboot with nfs as the root file system. You can refer to the following "Driver Test and Development Environment" to set up automatic mounting of the nfs file system after Linux starts.
DTB Device Tree video tutorial: Taking Renesas Cortex-A15 as an example:
http://www.hexiongjun.com/?s=Device+Tree
Tiny4412 bare metal program summary address:
http://www.100ask.org/bbs/forum.php?mod=viewthread&tid=11778&highlight=tiny4412
iTOP-4412 implements NFS network file system startup (including installing Ubuntu NFS service, compiling and configuring the kernel)
http://www.oschina.net/question/2371345_2158782
================================================== ================
Drive test to build development environment:
Since the startup failed when using nfs as the file system, mount the server's /home/book/workspace/tiny4412_project/driver/mountfile directory to the development board's mnt directory after the kernel starts:
Modify the file on the development board: vi /etc/init.d/rcS
Add below the modification of the development board startup IP address:
mount -t nfs -o nolock,vers=2 192.168.48.104:/home/book/workspace/tiny4412_project/driver/mountfile /mnt
Note: After adding permissions to the mountfile directory in Ubuntu, you need to restart the virtual machine. Restarting the development board will automatically mount the Ubuntu mountfile directory in the development board/mnt directory.
Previous article:Exynos4412 bare metal program DDR3 initialization process
Next article:Exynos4412 bare metal program DDR working principle and timing (Part 3)
Recommended ReadingLatest update time:2024-11-17 02:51
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- MSP430F149 IO port
- MKL26 accelerator debug error, which god can help me take a look
- Old Iron
- How are embedded operating systems layered?
- What are the losses in transformers? Explain eddy current, hysteresis, leakage flux, etc.
- DSP Implementation of Square Root Operation
- [CB5654 Intelligent Voice Development Board Evaluation] CDK development environment construction, re-flashing YoC Intelligent Voice SDK
- Problems with si4010
- [GD32L233C-START Review] Development Board Power Consumption Test
- Release an IoT core board, Tiny OS open source system