Difference between revisions of "NAND Programming"

From LORIX One - Wiki

Jump to: navigation, search
Line 1: Line 1:
 
==Setup==
 
==Setup==
 
===Download===
 
===Download===
The SAM-BA tool is availlable at [http://lorixone.io/devel/tools/sam-ba lorixone.io/devel/tools/sam-ba], choose the right archive according to your host OS and decompress it.
+
The SAM-BA tool is availlable at [https://lorixone.io/devel/tools/sam-ba lorixone.io/devel/tools/sam-ba], choose the right archive according to your host OS and decompress it.
 
 
The sam-ba binary is ready to use and need [http://lorixone.io/devel/tools/sam-ba/nandflash-usb-lorixone.qml a config file] containing the serial port (over USB) to use and the various image file to program.
 
 
 
  
 +
The sam-ba binary is ready to use and need [http://lorixone.io/devel/tools/sam-ba/nandflash-usb-lorixone.qml a config file] containing the serial port (over USB) to use and the various image file to program. You can find the latest image files generated by Wifx under our image archives repository [https://lorixone.io/yocto/images/2.1.2/nand/ lorixone.io/yocto/images/2.1.2/nand/].
  
 
===Extract and configure the workspace===
 
===Extract and configure the workspace===
Line 34: Line 32:
  
 
====Windows:====
 
====Windows:====
 +
 
  .\sam-ba_3.1.4\sam-ba.exe -x .\nandflash-usb-lorixone.qml
 
  .\sam-ba_3.1.4\sam-ba.exe -x .\nandflash-usb-lorixone.qml
 
====Linux====
 
====Linux====
 +
 
  ./sam-ba_3.1.4/sam-ba -x ./nandflash-usb-lorixone.qml
 
  ./sam-ba_3.1.4/sam-ba -x ./nandflash-usb-lorixone.qml
  
 
The progress percentage will be updated in real time and the status displayed clearly. When programmation is complete, the gateway can simply be restarted using the reset button with one press.
 
The progress percentage will be updated in real time and the status displayed clearly. When programmation is complete, the gateway can simply be restarted using the reset button with one press.

Revision as of 20:19, 20 September 2017

Setup

Download

The SAM-BA tool is availlable at lorixone.io/devel/tools/sam-ba, choose the right archive according to your host OS and decompress it.

The sam-ba binary is ready to use and need a config file containing the serial port (over USB) to use and the various image file to program. You can find the latest image files generated by Wifx under our image archives repository lorixone.io/yocto/images/2.1.2/nand/.

Extract and configure the workspace

Create a root directory and extract the sam-ba source archive in it. Create at the same level a directory named sources which will contain the image binaries to be programmed. Add in the root directory the config file as well nandflash-usb-lorixone.qml.


You should finally have something like that:

\---root
    |   nandflash-usb-lorixone.qml
    |    +---sources     |       at91-sama5d4_lorix_one.dtb     |       at91bootstrap.bin    
|       rootfs.ubi    
|       u-boot.bin    
|       zImage    
|
    \---sam-ba_3.1.4        
|   [...]        
|   sam-ba.exe      
[...]

The sources directory contains for example the binaries generated with Yocto. 


Flashing

Programming mode

First of all, we need to put the gateway in programmtion mode. To do that, and as explained in the user manual (§5.1), you have to press shortly 3 times on the reset button and keep pressed the third time for at least 3 secondes (until the LED status flashes):

programmation mode reset button procedure


Programmation

Connect the gateway to your PC with an USB A-miniB cable, power it and launch the programmation using the following command from the root directory:

Windows:

.\sam-ba_3.1.4\sam-ba.exe -x .\nandflash-usb-lorixone.qml

Linux

./sam-ba_3.1.4/sam-ba -x ./nandflash-usb-lorixone.qml

The progress percentage will be updated in real time and the status displayed clearly. When programmation is complete, the gateway can simply be restarted using the reset button with one press.