Sama5D4 EK

Last modified by Microchip on 2025/08/04 11:46

SoC Features

The SAMA5D4 MPU is ideal for any high-performance, secure, and cost-sensitive industrial application. High-speed computing needs are supported by ARM Neon and 128kB L2 cache which increases the overall system performance. The SAMA5D4 is an ideal fit for low-cost user interface applications that require video playback. The high-grade security features allows you to protect any system against counterfeiting and software theft, and allows you to securely store and transfer data.

sama5d4.png

Kit Information

Kit Overview

SAMA5D4-EK
SAMA5D4-EK with 7 inch LCD display

Access the console

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.Boards._board-sections-test.common-serial.WebHome]]. Click on this message for details.

Access the console on DBGU serial port

The DBGU serial console can be accessed from two connectors. One is from the RS-232 connector (marked as DBGU J24), another is from micro-A USB connector that gives access to the on-board serial-USB converter (marked as J22 OB-JLink).

The JP19 and JP20 jumpers are used to select which port is used to access DBGU serial console.

Using RS-232 connector (DBGU J24)

  • Open JP21 to enable DBGU
  • Choose (1-2) for JP19 and JP20 jumper settings
  • Connect a DB9 serial cable to the J24 connector
  • Now open your favorite terminal emulator with appropriate settings

Using the micro-A USB connector (J22 OB-JLink)

You can also access the serial console through the on-board serial-USB converter. In fact, the Cortex-M3 chip underneath the Evaluation Kit acts as a serial-to-USB converter and is loaded with a firmware that is able to speak USB-CDC.

  • For Microsoft Windows users: Install the J-Link CDC USB driver. No need to install a driver on any regular Linux distribution.
  • Open JP21 to enable DBGU
  • Open JP10 to enable CDC for OB-JLINK
  • Choose (2-3) for JP19 and JP20 jumper settings
  • Connect the USB cable to the board (J22 OB-JLink)
    • For Microsoft Windows users: identify the USB connection that is established
      JLink CDC UART Port should appear in Device Manager. The COMxx number will be used to configure the terminal emulator.
      JLink CDC UART Port
    • For Linux users: identify the USB connection by monitoring the last lines of dmesg command. The /dev/ttyACMx number will be used to configure the terminal emulator.
  • Now open your favorite terminal emulator with appropriate settings

Demo

Demo archives

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.demo-archive.archive4_7.sama5d4ek.WebHome]]. Click on this message for details.

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.faq.demo-sd.WebHome]]. Click on this message for details.

Build From source code

Setup ARM Cross Compiler

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.cross-compiler.13-2-rel1.WebHome]]. Click on this message for details.

Build AT91Bootstrap from sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.at91bootstrap.build-at91bootstrap-all-top.WebHome]]. Click on this message for details.

Assuming you are at the AT91Bootstrap root directory, you will find a board/sama5d4ek folder which contains several default configuration files:

sama5d4ekdf_uboot_secure_defconfig
sama5d4eknf_uboot_secure_defconfig
sama5d4eksd_uboot_secure_defconfig
Information

Tips: nf means to read nandflash, df means to read serial flash, sd means to read mmc card.

Information

Tips: linux means to load linux kernel to RAM, android means to load android kernel to RAM, uboot means to load u-boot to RAM, dt means to load dtb to RAM.

You can configure AT91Bootstrap to load U-Boot binary from NAND flash by doing:

$ make mrproper
$ make sama5d4eknf_uboot_secure_defconfig

If the configuring process is successful, the .config file can be found at AT91Bootstrap root directory.

build/binaries/at91bootstrap.bin.

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.at91bootstrap.build-at91bootstrap-all-bottom.WebHome]]. Click on this message for details.

Build U-Boot from sources

Getting U-Boot sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.u-boot.uboot-get-source.WebHome]]. Click on this message for details.

Cross-compiling U-Boot

Before compiling the U-Boot, you need setup cross compile toolchain in the section.

Warning

Latest versions of U-boot (2018.07 and newer) have a minimum requirement of 6.0 version of the GCC toolchain. We always recommend to use the latest versions.

Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the Configuration chapter in U-Boot reference manual.

Information

Go to the configs/ to find the exact target when invoking make.

The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.

   # To put environment variables in serial flash:
  sama5d4ek_spiflash_defconfig
  # To put environment variables in nandflash (default):
  sama5d4ek_nandflash_defconfig
  # To put environment variables in SD/MMC card:
  sama5d4ek_mmc_defconfig

Here are the building steps for the SAMA5D4EK board:

# You can change the config according to your needs.
make sama5d4ek_nandflash_defconfig
make

The result of these operations is a fresh U-Boot binary called u-boot.bin corresponding to the binary ELF file u-boot.

  • u-boot.bin is the file you should store on the board
  • u-boot is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.

Build Kernel from sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.components.linuxkernel.linuxkernel-6-12.build-linux-top.WebHome]]. Click on this message for details.

Now we Configure and Build kernel for sama5d4ek board:

$ make ARCH=arm sama5_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.components.linuxkernel.linuxkernel-6-12.build-linux-bottom.WebHome]]. Click on this message for details.

Build Yocto Project rootfs from sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.faq.oebuild.oe-build.WebHome]]. Click on this message for details.

Recent FAQ