10 Program the files into the target

  1. Install the SAM-BA software version 3.8.1(a) on your PC:
    • Download and install SAM-BA from:

      www.linux4sam.org/bin/view/Linux4SAM/SoftwareTools#SAM_BA

    • Connect one end of the FTDI USB-to-TTL serial cable to the PC and the other end to connector J11 of the SAM9X60 curiosity board. Ensure that the cable black wire is connected to pin 1 (GND) on jumper J11. Open the serial terminal and establish a connection with the baud rate set to 115200.
    Note:
    1. The examples and command lines provided in this document are extracts from SAM-BA software version 3.8.1, but the user can use a later version. In such a case, information in this document may vary slightly.
  2. By default, the SAM9X60 boot sequence tries to boot from NAND Flash. To learn about the boot process and first stage boot configuration, refer to the section “Boot Strategies” in the SAM9X60 data sheet (see Reference Documents).
  3. Before powering up the board, remove jumper J4 (NAND_BOOT) to disable booting from NAND Flash.
  4. Power up the board by connecting one end of the micro-B USB cable to board jumper J1 and the other end to the PC.
  5. Press the START button and then the RESET button on the board.
  6. When "RomBOOT" is displayed on the serial terminal, connect the J4 (NAND BOOT) jumper.
  7. Flash the files into the NAND Flash memory:
    1. In the terminal, navigate to the buildroot-mchp/output/Images directory:

      $ cd buildroot-mchp/output/Images

    2. Erase the NAND Flash memory:

      $ sam-ba -p serial - b sam9x60-curiosity -a nandflash -c erase

    3. Write the bootstrap into the NAND Flash memory:

      sam-ba -p serial -b sam9x60-curiosity -a nandflash -c writeboot: at91bootstrap.bin

    4. Write u-boot into the NAND Flash memory:

      sam-ba -p serial -b sam9x60-curiosity -a nandflash -c write:u-boot.bin:0x00040000

    5. Write the device tree into the NAND Flash memory:

      sam-ba -p serial -b sam9x60-curiosity -a nandflash -c write:at91-sam9x60_curiosity.dtb:0x00180000

    6. Write the kernel into the NAND Flash memory:

      sam-ba -p serial -b sam9x60-curiosity -a nandflash -c write:zImage:0x00200000

    7. Write rootfs into the NAND Flash memory:

      sam-ba -p serial -b sam9x60-curiosity -a nandflash -c write:rootfs.ubi:0x00800000

    8. Reset the board by pressing the reset (RESET) button.

    Refer to the following screenshots: