TSoM eMMC Programming Guide

From Terasic Wiki

(Difference between revisions)
Jump to: navigation, search
(1.1 Re-flash linux image to emmc memory)
(1.1 Re-flash linux image to emmc memory)
Line 32: Line 32:
#Enter the command "'''mmc rescan'''" to rescan the device.
#Enter the command "'''mmc rescan'''" to rescan the device.
#Enter the command "'''mmc write $loadaddr 0 0x510e0'''" to program image file to the eMMC device.
#Enter the command "'''mmc write $loadaddr 0 0x510e0'''" to program image file to the eMMC device.
-
#:Note: 0x510e0 is the image size, the unit is block, each block is 512bytes. The size of the image file is 169984000 bytes , i.e. 169984000/ 512=332000 . 332000 converted to hexadecimal is 0x510e0.
+
#:Note: The number "0x510e0" represents the image size, the unit is "block", each block has 512 bytes size. The size of the image file here is 169984000 bytes , i.e. 169984000/ 512=332000 (block) . 332000 converted to hexadecimal is 0x510e0.
[[TSoM_Document|Back]]
[[TSoM_Document|Back]]

Revision as of 09:41, 17 May 2019

This guide will show you how to program the Linux image into the eMMC device on the TSoM module and explain how to update device tree and zImage in the eMMC device.

1.1 Re-flash linux image to emmc memory

  1. Prepare a Micro SD card (minimum 4GB capacity) for Linux boot.
  2. Download the image file form the link below and use the tool such as "Win32 Disk Imager" to write the linux image file(tsom_linux_console.zip) into the Mircro SD card.
    http://mail.terasic.com.tw/~johnny/release/tsom/tsom_linux_console.zip
  3. Download the eMMC image file from the link below and extract it, then copy the image file(tsom_emmc_168M.img) to the fat partition of sdcard
    http://mail.terasic.com.tw/~johnny/release/tsom/tsom_emmc_168M.img.zip
    TSOM PTEEMC-000.jpg
  4. Insert the Micro SD card into the TSoM evaluation kit.
  5. Make sure MSEL[4:0] is set to FPPx32 mode, so the FPGA can be configured by HPS.
    Please install the 1K ohm resistors in the red resistor position in the figure below.
    TSOM PTE-020.jpg
    Confirm that the red resistor position in the figure below DOES NOT have any resistors installed.
    TSOM PTE-021.jpg
  6. Make sure that SW1 on the TSoM is cut to the "ON" position, which represents the HPS boot from the SD Card.
    TSOM PTEEMC-001.jpg
  7. Connect the PC and TSoM evaluation kit via mini USB cable and connect the Power adapter to power on the board.
    TSOM PTEEMC-004.jpg
  8. Use the terminal emulation program such as Putty on the operating system to connect to Linux running on TSoM
    TSOM PTEEMC-003.jpg
    .
  9. Press the CPU reset button on the TSoM module and wait for the "Hit any key to stop autoboot :5" to appear in the Putty window. Press any key to enter uboot.
    TSOM PTEEMC-004.png
  10. Enter the command "fatls mmc 0:1" to view the contents of the sdcard fat partition.
    TSOM PTEEMC-005.png
  11. Enter the command "fatload mmc 0:1 $loadaddr tsom_emmc_168M.img" to load the .img file into the DDR3.
    TSOM PTEEMC-006.png
  12. Switch SW1 to "OFF" position to switch to eMMC boot mode.
    TSOM PTEEMC-002.jpg
  13. Enter the command "mmc rescan" to rescan the device.
  14. Enter the command "mmc write $loadaddr 0 0x510e0" to program image file to the eMMC device.
    Note: The number "0x510e0" represents the image size, the unit is "block", each block has 512 bytes size. The size of the image file here is 169984000 bytes , i.e. 169984000/ 512=332000 (block) . 332000 converted to hexadecimal is 0x510e0.

Back

Personal tools