SAM9X60-EK -- Booting from SD Memory Card


In this topic, you will configure and program the SAM9X60-EK evaluation kit to boot from an external SD Memory Card. You will write a pre-built image to an SD Memory Card using the SAM-BA® In-System Programmer (ISP). The image will contain the second-stage bootloader at91bootstrap, third-stage bootloader u-boot-at91, u-boot environment, the Flattened Image Tree (FIT) (containing the Linux® kernel and Device Tree), and Root File System (RFS).



Familiar with the features of the SAM9X60-EK evaluation kit:

Familiar with the operation of the SAM-BA ISP:

Setup Console Serial Communications with the SAM9X60-EK:

Knowledge of the Boot Process



For this topic, you will be using the SAM9X60-EK. You will also need two USB Micro-B cables. One cable will connect the Host PC to the target console to view the SAM-BA Monitor log message. The second cable will connect the Host PC to the target USBA port (J7) so that the SAM-BA Host can communicate with the SAM-BA Monitor.

Bootable Memory


The SAM9X60-EK has an SD Memory Card slot (J4) where you will insert your SD Memory Card after flashing an image to it. In this training topic, you will use the SAM-BA ISP to write the image to the SD Memory Card.


In this section, you will load the SAM-BA Host Application (if you have not already done so) and setup Console and SAM-BA Host to Monitor communications.


Setup SAM9X60-EK Console Serial Communications

To view the SAM-BA Monitor log messages, setup console serial communications following the instructions in the topic: SAM9X60-EK Console Serial Communications

You have two choices in connecting to a serial port on the SAM9X60-EK:

  • The first is using a USB cable to connect to the J-LINK-OB port (J22). This method has the added benefit of powering the SAM9X60-EK.
  • The second is using a USB-to-TTL converter to connect to the Universal Asynchronous Receiver Transmitter (UART) Debug port (J24). To power the SAM9X60-EK, you will need to:
    • Use an external 5 VDC power supply connected to J1 (coaxial power jack), or
    • Use a USB cable connect to the USBA port (J7).

Operation of the J-Link Debugger will be displayed by a green LED (D9).



If it is not already installed, install the SAM-BA Host Application.

SAM-BA ISP should be added to the system PATH variable.

$ export PATH=$PATH:<path_to_sam-ba>

This will enable you to access the SAM-BA ISP from anywhere on your system.


Setup the SAM-BA Host to Monitor Serial Communications


To communicate with SAM-BA Monitor on the target, you must have installed the SAM-BA Host on a Linux PC (Step 2 above), and connect a USB Micro-B cable from the host PC to the USBA port (J7) on the SAM9X60-EK as shown in the figure below.


You may power the SAM9X60-EK one of two ways:

  1. Using an external 5 VDC power supply connected to J1 (coaxial power jack), or
  2. Using a USB cable connect to the USBA port (J7).


Ensure there is no SD Memory Card inserted in slot J4.


Close the DIS_BOOT (J13) jumper.

Closing this jumper prevents booting from external memories such as QSPI and NAND Flash.


Press the Reset button (SW3).

Observe ROMBoot on the Console (terminal emulator) indicating the SAM-BA Monitor is running.

Write Image to SD Memory Card

In this section, you will download a demonstration image from the Linux4sam website and write the image to an SD Memory Card using the SAM-BA ISP.


Download the SAM9X60-EK demonstration image from the Linux4SAM website.

The latest demonstration images for the SAM9X60-EK are available on the Linux4SAM website.

There you will find three sets of images created from one of three Build Systems:

  • The Yocto Project
  • Buildroot
  • OpenWRT

Any of the images can be used for this step. If you are undecided, choose the linux4sam-buildroot-sam9x60ek-headless file and extract the image.


Insert a SD Memory Card into slot (J4).

The SD Memory Card size should be 1 GB or greater.



Write the demo image to SD Memory Card.

Execute the following command in the command window (command line interface):

$ sam-ba -p serial -b sam9x60-ek -a sdmmc -c write:linux4sam-buildroot-sam9x60ek-headless-2020.04.img
Opening serial port 'ttyACM0'
Connection opened.
Detected memory size is 7948206080 bytes.
Page size is 512 bytes.
Buffer is 9728 bytes (19 pages) at address 0x0030a840.
Executing command 'wrie:linux4sam-buildroot-sam9x60ek-headless-2020.04.img'
Wrote 9728 bytes at address 0x00000000 (0.00%)
Wrote 9728 bytes at address 0x00002600 (0.00%)
Wrote 9728 bytes at address 0x410fe000 (100.00%)
Wrote 8192 bytes at address 0x410fe000 (100.00%)
Connection closed.

Boot from SD Memory Card

Check that:

  • Console serial communications are working properly.
  • The SD Memory Card is inserted into slot J4.
  • Ensure the DIS_BOOT jumper (J13) is CLOSED. This will prevent the MPU from booting from QSPI or NAND Flash memory.

The Disable Boot mechanism of Jumper J13 does not disable booting from the SD Memory Card. The user must remove the SD Memory Card to prevent booting from it.


With all preparations completed, press the Reset button (SW3).



  • The Linux boot log on the Console (terminal emulator).
  • At the end of the boot sequence, a command line prompt will appear.
    • Login as "root".
    • There is no password required.
  • The Linux operating system heartbeat is displayed on RGB LED (LD1) as a flashing blue light.

Congratulations! You have booted an embedded Linux system on the SAM9X60-EK evaluation kit using an SD Memory Card as external mass memory.


In this training topic, you prepared a Host PC to run the SAM-BA ISP, connected the Host PC to the SAM9X60-EK evaluation kit (the Target), and flashed a demonstration image to an SD Memory Card using the SAM-BA ISP. Finally, you booted the Linux operating system on the SAM9X60-EK.

What’s Next?

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.