6 Updating Binary and System Image into the Target Board

This section describes how to update or flash the system image. The pre-build images include pre-build driver and firmware binaries, which are available at GitHub.

The SAM-BA® tool is used to flash the binaries into the target board.
Note: Ensure that the SAM-BA tool is installed in the host machine before updating the system image. The scripts in the demo package use 3.2.x when user selects in step 5 of the following procedure.

For additional information, refer to the following:

To start flashing, perform the following steps:
  1. Download the pre-built images from github.com/linux4wilc/wilc_demo.
  2. Unzip the downloaded file.
  3. Once the new image is built as described in Chapter 2, Building Linux for SAMA5D4 Xplained Ultra Board, these files must be copied from the buildroot-at91\output\images directory to the directory where the demo_linux_nandflash_usb.qml file is available.
    Figure 6-1. List of Files in buildroot\output\images Location
  4. Add the jumper at JP7 and connect to the host PC via the USB port at J11. Ensure that the host machine completes the USB serial port connection and then remove the jumper at JP7. The following figure shows the SAMA5D4 adapter connections.
    Figure 6-2. SAMA5D4 Adapter Connections
  5. Execute the demo_linux_nandflash.bat (for Windows®) file or the demo_linux_nandflash.sh (for Linux) file.
    Note:
    • By default, the demo_linux_nandflash.sh file has sam-ba binary for 32-bit operating system. For 64-bit operating system, change the sam-ba to sam-ba_64 in the same file.
    • Execute the script in the super user mode. If sam-ba 3.2 is installed, use demo_linux_nandflash_3_2.bat or demo_linux_nandflash_3_2.sh instead.
    The output log can be viewed via J1 serial port.
    Open the serial terminal on PC via the COM port, with the following configurations:
    • 115200 baud rate
    • 8-bit data
    • No parity
    • One stop bit
    • No flow control
  6. Successful download of the system image into the board is indicated by a log file, which opens automatically. This log file contains all the download process history.