3.3 Install the Demo Image on the SAMA5D2 Xplained eMMC

Prerequisite:
  • Power up the SAMA5D2 Xplained Ultra board by connecting a micro USB cable at J23.
  • Connect the FTDI cable to the Debug connector (J1).
    Note: Do not use J14 connector to receive debug messages.
  • Download the SAM-BA® 3.2.1 for Linux software from github.com/atmelcorp/sam-ba/releases/tag/v3.2.0.
  • Close the jumper JP9, press the Reset button and open the jumper.
  • Create a emmc-usb.qml file and add the following:
    import SAMBA 3.2
    import SAMBA.Connection.Serial 3.2
    import SAMBA.Device.SAMA5D2 3.2
    
    SerialConnection {
    device: SAMA5D2Xplained {
    }
    
    onConnectionOpened: {
    // initialize SD/MMC applet
    initializeApplet("sdmmc")
    
    // write file
    applet.write(0, "sdcard.img", false)
    
    // initialize boot config applet
    initializeApplet("bootconfig")
    
    // Use BUREG0 as boot configuration word
    applet.writeBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0"))
    
    // Enable external boot only on SDMMC0
    applet.writeBootCfg(BootCfg.BUREG0,
    BCW.fromText("EXT_MEM_BOOT,UART1_IOSET1,JTAG_IOSET1," +
    "SDMMC0,SDMMC1_DISABLED,NFC_DISABLED," +
    "SPI1_DISABLED,SPI0_DISABLED," + "QSPI1_DISABLED,QSPI0_DISABLED"))
    }
    }
  • Place the emmc-usb.qml file in the same directory as the sdcard.img is located. Run the emmc-usb.qml script, using the following command:
    $sudo su
    $ <path>sam-ba -x emmc-usb.qml
    Note: This process takes several minutes to complete. The sdcard.img is installed on the SAMA5D2 Xplained eMMC and after the flashing is complete, debug messages are sent via J1 port through FTDI cable.