Exynos4412 bare metal program: DDR working principle and timing (Part 2)

Publisher:码字狂徒Latest update time:2018-10-14 Source: eefocusKeywords:Exynos4412 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Keywords:Exynos4412 Reference address:Exynos4412 bare metal program: DDR working principle and timing (Part 2)

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

Star shut down DDR3 production line within 2 years. Capacity limitation supports price rise
According to the semiconductor industry, Samsung Electronics has stopped the production of DDR2 memory and plans to stop the production of DDR3 chips in the next two years. According to Electronic Times, sources said that Samsung Electronics, as the largest supplier of 4Gb DDR3 memory, decided to stop investing in the
[Mobile phone portable]
Research and design of DDR memory bar control based on FPGA
1 How memory modules work DDR memory bar is composed of multiple DDR SDKAM chips interconnected. DDR SDRAM is the abbreviation of double data rate synchronous dynamic random access memory. DDR SDRAM uses a double data rate interface, that is, data needs to be sampled at the positive or negative edge of the
[Embedded]
Research and design of DDR memory bar control based on FPGA
Higher and faster come with stronger requirements to meet the challenges of DDR5 memory verification and debugging
Practical sharing | Higher and faster with stronger requirements, meet the challenges of DDR5 memory verification and debugging The world is experiencing an unprecedented era of explosive data growth, a trend that is expected to accelerate as new technologies are implemented on a wider scale
[Test Measurement]
Higher and faster come with stronger requirements to meet the challenges of DDR5 memory verification and debugging
DDR Test Technology and Tools
DDR is a double data rate SDRAM memory, which is now the mainstream memory technology for most computer systems and server products, and is constantly penetrating into embedded system applications. However, with the adoption of big-name smartphones such as the iPhone, DDR memory has become one of the directions of s
[Test Measurement]
DDR Test Technology and Tools
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号