Software Tools

SAM-BA

SAM-BA (SAM Boot Assistant In-system Programmer) can run on:

  • Windows 32-bit and 64-bit
  • Linux x86 and x86_64

SAM-BA is able to program flash media through the following communication links:

  • debug port (DBGU) whether they connect through RS232 or USB-serial links
  • USB device (aka USB gadget)
  • SAM-BA on Linux uses the USB connection through CDC to communicate with the device
  • on Windows systems, JTAG SAM-ICE or J-Link

Note that SAM-BA 2.x is for maintenance only. SAM-BA 3.x is recommended for new projects.

You have relevant FAQ entries to convert SAM-BA scripts from one version of the tool to the other:

  • Convert your SAM-BA 3.1 scripts to SAM-BA 3.2 onwards with the help of ConvertSAMBAScript page
  • Convert your SAM-BA 3.2 scripts to SAM-BA 3.5 onwards with the help of ConvertSAMBAScript page
  • Convert your SAM-BA 3.5 scripts to SAM-BA 3.7 onwards with the help of ConvertSAMBAScript page

Tips & tricks

How to check if my kernel version is compatible with sam-ba?

Connect the board to your computer and type:

$ dmesg
If you have something like that it's ok:
[227274.230016] usb 5-1: new full speed USB device using uhci_hcd and address 5
[227274.395739] cdc_acm 5-1:1.0: This device cannot do calls on its own. It is not a modem.
[227274.395768] cdc_acm 5-1:1.0: ttyACM0: USB ACM device
If you have no log about cdc_acm driver, your kernel may not be up to date.

My kernel version is 2.6.37 or 2.6.38 and I have no ttyACMx node.

This kernel version may contains two drivers for atmel boards: the sam-ba driver and the cdc_acm driver.

Since you have two drivers for the same device, randomly the sam-ba driver or the cdc_acm driver can be used. Both allow you to launch sam-ba tool and to program your board. The only issue it involves is the device node name. If it is the sam-ba driver which is used, you will have a /dev/ttyUSBx node. If it is the cdc_acm which is used, you will have a /dev/ttyACMx. In this case you will have to create a link to /dev/ttyUSBx.

It is mainly the cdc_acm driver which is selected. To know which one has been selected, you can use the dmesg command.

If you see something like this:

[   72.092495] usb 2-1.3: new high speed USB device using ehci_hcd and address 6
[   72.191022] USB Serial support registered for sam-ba
[   72.191169] sam-ba 2-1.3:1.1: sam-ba converter detected
[   72.191364] usb 2-1.3: sam-ba converter now attached to ttyUSB1
[   72.191762] usbcore: registered new interface driver sam-ba
[   72.191765] sam_ba: v1.0: Atmel SAM Boot Assistant (SAM-BA) driver
[   72.519248] cdc_acm 2-1.3:1.0: This device cannot do calls on its own. It is not a modem.
[   72.519258] cdc_acm: probe of 2-1.3:1.0 failed with error -16
[   72.519272] usbcore: registered new interface driver cdc_acm
[   72.519273] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
It is the sam-ba driver which is used and you can see that a /dev/ttyUSB1 node has been created.

In the other case, the cdc_acm driver, you will have:

[  766.492942] usb 2-1.1: new high speed USB device using ehci_hcd and address 8
[  766.585934] cdc_acm 2-1.1:1.0: This device cannot do calls on its own. It is not a modem.
[  766.586033] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
It is the CDC driver which is used and you can see that a /dev/ttyACM0 node has been created.

Checking the usb link between the board and the computer.

lsusb -d 03eb:6124
    Bus 004 Device 006: ID 03eb:6124 Atmel Corp

03eb is the vendor number and 6124 is the product number.

I have issues while running SAM-BA 3 scripts (module SAMBA version x.y is not installed).

If you encounter the following issues while running your SAM-BA 3 scripts, it must mean that your SAM-BA revision and the SAM-BA script used are not aligned.

  • New revision of SAM-BA running an old script :
    sam-ba -v
    SAM-BA Command Line Tool v3.2.0
    Copyright 2015-2017 ATMEL Corporation
    
    sam-ba -x demo_linux_serialflash_usb.qml
    "file:demo_linux_serialflash_usb.qml:1 module \"SAMBA\" version 3.1 is not installed\n"
    
    In such case, we advice you to keep your newer revision of SAM-BA but convert your SAM-BA script to a newer SAM-BA module revision by following the ConvertSAMBAScript FAQ page.

  • Old revision of SAM-BA running an new script :
    sam-ba -v
    SAM-BA Command Line Tool v3.1.4
    Copyright 2015-2016 ATMEL Corporation
    
    sam-ba -x demo_linux_serialflash_usb.qml
    "file:demo_linux_serialflash_usb.qml:1 module \"SAMBA\" version 3.2 is not installed\n""
    
    In such case we advice you to download a newer revision of SAM-BA.

Burn images to SD cards with Etcher

For burning demo images to SD cards, we recommend the handy tool: Ethcher.
Among other great features, it is multi-platform and secured (which meant that it won't trash your HDD for no reason!). Please connect to https://etcher.io for more information and, as this project is Open Source, check the source code here: https://github.com/resin-io/etcher.

Serial terminal configuration

Using a terminal software on your host system, you can connect to the application running on the SoC through the DBGU or a USART serial interface.

Exceptions:

  • sama5d2 revision A, only to access the ROMCode through serial interface and see the RomBOOT message appearing, configure your serial line to 57600.
    Change it back to 115200 for normal operation.
    All components and demo binaries are now configured to work at 115200 8-N-1.

The usual serial communication parameters are 115200 8-N-1 :

Baud rate 115200
Data 8 bits
Parity None
Stop 1 bit
Flow control None

Yocto Project SDK

To ease software development on top or the root filesystems that we provide, we generated Yocto Project SDK that you can use to cross-compile your C/C++ project.

Common specifications of each toolchain listed below:

  • is built for Linux x86 64bits architecture (x86_64)
  • uses glibc C library
  • embeds a version of the QT library and allow to build QT applications (QT replaced with EGT starting with Linux4SAM 2020.04)
  • is built from sources and can be re-built following the documentation provided on this website: PokyBuild#Atmel_Poky_SDK
  • is a self-extracting shell script that installs the toolchain in the /opt directory
  • Download the self-extracting archive below by clicking with right button on the link and using the "Save Link As" contextual menu option

Description Binary Recipe used to
generate the SDK
Distribution used
Yocto Project 4.0.17 - kirkstone (Linux4MICROCHIP 2024.04)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-4.0.17.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60-curiosity-sd-toolchain-4.0.17.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60-curiosity-sd-toolchain-4.0.17.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Cortex-A7 Hard float NEON
(like sama7g5ek for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa7hf-neon-vfpv4-sama7g5ek-sd-toolchain-4.0.17.sh bitbake -c populate_sdk microchip-headless-image poky-atmel

Description Binary Recipe used to
generate the SDK
Distribution used
Yocto Project 4.0.13 - kirkstone (Linux4SAM 2023.10)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-4.0.13.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60-curiosity-sd-toolchain-4.0.13.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60-curiosity-sd-toolchain-4.0.13.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Cortex-A7 Hard float NEON
(like sama7g5ek for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa7hf-neon-vfpv4-sama7g5ek-sd-toolchain-4.0.13.sh bitbake -c populate_sdk microchip-headless-image poky-atmel

Description Binary Recipe used to
generate the SDK
Distribution used
Yocto Project 4.0.9 - kirkstone (Linux4SAM 2023.04)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d2-xplained-toolchain-4.0.9.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60ek-toolchain-4.0.9.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60ek-toolchain-4.0.9.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Cortex-A7 Hard float NEON
(like sama7g5ek for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa7hf-neon-vfpv4-sama7g5ek-sd-toolchain-4.0.9.sh bitbake -c populate_sdk microchip-headless-image poky-atmel

Description Binary Recipe used to
generate the SDK
Distribution used
Yocto Project 4.0.3 - kirkstone (Linux4SAM 2022.10)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-4.0.3.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60ek-sd-toolchain-4.0.3.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60ek-sd-toolchain-4.0.3.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Cortex-A7 Hard float NEON
(like sama7g5ek for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa7hf-neon-vfpv4-sama7g5ek-sd-toolchain-4.0.3.sh bitbake -c populate_sdk microchip-headless-image poky-atmel

Description Binary Recipe used to
generate the SDK
Distribution used
Yocto Project 3.1.15 - dunfell (Linux4SAM 2022.04)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-3.1.15.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60ek-sd-toolchain-3.1.15.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60ek-sd-toolchain-3.1.15.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Cortex-A7 Hard float NEON
(like sama7g5ek for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa7hf-neon-vfpv4-sama7g5ek-sd-toolchain-3.1.15.sh bitbake -c populate_sdk microchip-headless-image poky-atmel

Yocto Project 3.1.12 - dunfell (Linux4SAM 2021.10)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-3.1.9.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
Cortex-A5 Hard float NEON
(like sama5d2 or sama5d4 for instance)
Lightweight toolchain
(with libgpiod and libevnet needed by PTC examples application)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-3.1.9.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60ek-sd-toolchain-3.1.9.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60ek-sd-toolchain-3.1.9.sh bitbake -c populate_sdk microchip-headless-image poky-atmel

Yocto Project 3.1.9 - dunfell (Linux4SAM 2021.04)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-3.1.4.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
Cortex-A5 Hard float NEON
(like sama5d2 or sama5d4 for instance)
Lightweight toolchain
(with libgpiod and libevnet needed by PTC examples application)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa5t2hf-neon-vfpv4-sama5d27-wlsom1-ek-sd-toolchain-3.1.4.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60ek-sd-toolchain-3.1.4.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60ek-sd-toolchain-3.1.4.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Yocto Project 3.1.4 - dunfell (Linux4SAM 2020.10)
Cortex-A5 Hard float NEON with EGT
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d2-xplained-sd-toolchain-3.1.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
Cortex-A5 Hard float NEON
(like sama5d2 or sama5d4 for instance)
Lightweight toolchain
(with libgpiod and libevnet needed by PTC examples application)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa5t2hf-neon-vfpv4-sama5d2-xplained-sd-toolchain-3.1.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Cortex-A5 Hard float with EGT
Lightweight toolchain
(like sama5d3)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-vfp-sama5d3-xplained-sd-toolchain-3.1.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) with EGT - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60ek-sd-toolchain-3.1.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60ek-sd-toolchain-3.1.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Yocto Project 2.7.x - warrior (Linux4SAM 2020.04)
Cortex-A5 Hard float NEON with EGT & QT 5
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-neon-vfpv4-sama5d2-xplained-sd-toolchain-2.7.1.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
Cortex-A5 Hard float NEON
(like sama5d2 or sama5d4 for instance)
Lightweight toolchain
(with libgpiod and libevnet needed by PTC examples application)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-cortexa5t2hf-neon-vfpv4-sama5d2-xplained-sd-toolchain-2.7.2.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Cortex-A5 Hard float with EGT & QT 5
Lightweight toolchain
(like sama5d3)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-cortexa5t2hf-vfp-sama5d3-xplained-sd-toolchain-2.7.2.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) with EGT & QT 5 - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-microchip-graphics-image-armv5e-sam9x60ek-sd-toolchain-2.7.1.sh bitbake -c populate_sdk microchip-graphics-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x60 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-microchip-headless-image-armv5e-sam9x60ek-sd-toolchain-2.7.2.sh bitbake -c populate_sdk microchip-headless-image poky-atmel
Yocto Project 2.6.2 - thud (Linux4SAM 6.2)
Cortex-A5 Hard float NEON with QT 5
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-atmel-qt5-demo-image-cortexa5t2hf-neon-toolchain-2.6.2.sh bitbake -c populate_sdk atmel-qt5-demo-image poky-atmel
Cortex-A5 Hard float NEON
(like sama5d2 or sama5d4 for instance)
Lightweight toolchain
(with libgpiod and libevnet needed by PTC examples application)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-atmel-xplained-lcd-demo-image-cortexa5t2hf-neon-toolchain-2.6.2.sh bitbake -c populate_sdk atmel-xplained-lcd-demo-image poky-atmel
Cortex-A5 Hard float with QT 5
(like sama5d3)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-atmel-qt5-demo-image-cortexa5t2hf-vfp-toolchain-2.6.2.sh bitbake -c populate_sdk atmel-qt5-demo-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x5 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-atmel-xplained-lcd-demo-image-armv5e-toolchain-2.6.2.sh bitbake -c populate_sdk atmel-xplained-lcd-demo-image poky-atmel
Yocto Project 2.5.1 - sumo (Linux4SAM 6.1)
Cortex-A5 Hard float NEON with QT 5
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-atmel-qt5-demo-image-cortexa5hf-neon-toolchain-2.5.1.sh bitbake -c populate_sdk atmel-qt5-demo-image poky-atmel
Cortex-A5 Hard float NEON
(like sama5d2 or sama5d4 for instance)
Lightweight toolchain
(with libgpiod and libevnet needed by PTC examples application)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-atmel-xplained-lcd-demo-image-cortexa5hf-neon-toolchain-2.5.1.sh bitbake -c populate_sdk atmel-xplained-lcd-demo-image poky-atmel
Cortex-A5 Hard float with QT 5
(like sama5d3)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-atmel-qt5-demo-image-cortexa5hf-vfp-toolchain-2.5.1.sh bitbake -c populate_sdk atmel-qt5-demo-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x5 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-atmel-xplained-lcd-demo-image-armv5e-toolchain-2.5.1.sh bitbake -c populate_sdk atmel-xplained-lcd-demo-image poky-atmel
Yocto Project 2.4.2 - rocko (Linux4SAM 6.0)
Cortex-A5 Hard float NEON with QT 5
(like sama5d2 or sama5d4 for instance)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-atmel-qt5-demo-image-cortexa5hf-neon-toolchain-2.4.2.sh bitbake -c populate_sdk atmel-qt5-demo-image poky-atmel
Cortex-A5 Hard float NEON
(like sama5d2 or sama5d4 for instance)
Lightweight toolchain
(with libgpiod and libevnet needed by PTC examples application)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-atmel-xplained-demo-image-cortexa5hf-neon-toolchain-2.4.2.sh bitbake -c populate_sdk atmel-xplained-lcd-demo-image poky-atmel
Cortex-A5 Hard float with QT 5
(like sama5d3)
https://files.linux4sam.org/pub/demo/yocto-qt5-sdk/poky-atmel-glibc-x86_64-atmel-qt5-demo-image-cortexa5hf-vfp-toolchain-2.4.2.sh bitbake -c populate_sdk atmel-qt5-demo-image poky-atmel
ARMv5 (for ARM926) - sam9 family
(like at91sam9x5 for instance)
https://files.linux4sam.org/pub/demo/yocto-sdk/poky-atmel-glibc-x86_64-atmel-xplained-lcd-demo-image-armv5e-toolchain-2.4.2.sh bitbake -c populate_sdk atmel-xplained-lcd-demo-image poky-atmel

Info All toolchains listed above are compiled to run in a x86_64 environment. You can re-build them if you need to run them on another architecture (i686, the x86 32bits variant for example).

Pointing hand For other examples of original Yocto Project toolchains, your can browse the toolchain directory of each Yocto Project release (here 2.4.2 as an example).

In addition to the PokyBuild#Atmel_Poky_SDK chapter, you can use the comprehensive Yocto Project documentation that give details on how to setup a Yocto Project SDK.

Buildroot SDK

To ease software development on top or the root filesystems that we provide, we generated Buildroot SDK that you can use to cross-compile your C/C++ project.

Common specifications of each toolchain listed below:

  • is built for Linux x86 64bits architecture (x86_64)
  • is built from sources and can be re-built issuing a simple 'make sdk' command inside your buildroot directory after you build your image
  • it's an archive that it's created from a specific board defconfig, and includes all the required toolchains for building and libs for linking

Description Binary
Buildroot SDK - 2024.02.1 (Linux4SAM 2024.04)
SAM9X75 Curiosity https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x75_curiosity-graphics-sdk-2024.04.tar.gz
SAMA5D29 Curiosity https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d29_curiosity-graphics-sdk-2024.04.tar.gz
SAM9X60 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60_curiosity-graphics-sdk-2024.04.tar.gz
SAM9X60 Curiosity https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60ek-graphics-sdk-2024.04.tar.gz
SAMA7G5-EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama7g5ek-headless-sdk-2024.04.tar.gz
SAMA5D2-ICP https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d2_icp-headless-sdk-2024.04.tar.gz
SAMA5D27 SOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_som1_ek-optee-graphics-sdk-2024.04.tar.gz
SAMA5D27 WLSOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_wlsom1_ek-graphics-sdk-2024.04.tar.gz

Description Binary
Buildroot SDK - 2023.02.5 (Linux4SAM 2023.10)
SAMA5D29 Curiosity https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d29_curiosity-graphics-sdk-2023.10.tar.gz
SAM9X60 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60_curiosity-graphics-sdk-2023.10.tar.gz
SAM9X60 Curiosity https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60ek-graphics-sdk-2023.10.tar.gz
SAMA7G5-EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama7g5ek-headless-sdk-2023.10.tar.gz
SAMA5D2-ICP https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d2_icp-headless-sdk-2023.10.tar.gz
SAMA5D27 SOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_som1_ek-optee-graphics-sdk-2023.10.tar.gz
SAMA5D27 WLSOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_wlsom1_ek-graphics-sdk-2023.10.tar.gz

Description Binary
Buildroot SDK - 2022.02.5 (Linux4SAM 2023.04)
SAM9X60 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60_curiosity-graphics-sdk-2023.04.tar.gz
SAM9X60 Curiosity https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60ek-graphics-sdk-2023.04.tar.gz
SAMA7G5-EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama7g5ek-headless-sdk-2023.04.tar.gz
SAMA5D2-ICP https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d2_icp-headless-sdk-2023.04.tar.gz
SAMA5D27 SOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_som1_ek-optee-graphics-sdk-2023.04.tar.gz
SAMA5D27 WLSOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_wlsom1_ek-graphics-sdk-2023.04.tar.gz

Description Binary
Buildroot SDK - 2022.02.5 (Linux4SAM 2022.10)
SAM9X60 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60_curiosity-graphics-sdk-2022.10.tar.gz
SAM9X60 Curiosity https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sam9x60ek-graphics-sdk-2022.10.tar.gz
SAMA7G5-EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama7g5ek-headless-sdk-2022.10.tar.gz
SAMA5D2-ICP https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d2_icp-headless-sdk-2022.10.tar.gz
SAMA5D27 SOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_som1_ek-optee-graphics-sdk-2022.10.tar.gz
SAMA5D27 WLSOM1 EK https://files.linux4sam.org/pub/demo/br-sdk/linux4sam-buildroot-sama5d27_wlsom1_ek-graphics-sdk-2022.10.tar.gz

Other ready-made cross-compilation toolchains

These other ready-made cross-compilation toolchains for Linux x86 64bits architecture (x86_64) are built using Buildroot and also address several architectures.

Target architecture Cross-compilation toolchain to choose
ARMv5 (for ARM926) - sam9 family
(like at91sam9x5 for instance)
armv5-eabi
Cortex-A Hard float - sama5 family
(like sama5d3 or sama5d2 for instance)
armv7-eabihf

They can be selected and downloaded on the website: toolchains.bootlin.com (Bootlin, formerly Free Electrons).

Device or resource busy: '/dev/ttyACM0'

When using the serial CDC interface for SAM-BA or terminal console from some Linux hosts, from time to time, you can experience long delays before connecting. You can also experience the following error:

could not open port /dev/ttyACM0: [Errno 16] Device or resource busy: '/dev/ttyACM0'

It usually happens just after having re-booted the board or issuing a reset.

In fact, an USB modem detector the process modem-manager is taking the device as soon as it is appearing. You can find it using the lsof command:

> sudo lsof /dev/ttyACM0
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
modem-man 10256 root   28u   CHR  166,0      0t0 190530 /dev/ttyACM0
>
> ps aux | grep modem
root     10256  0.1  0.0  83408  3420 ?        S    11:57   0:00 /usr/sbin/modem-manager

So, you have several options to solve this problem:

  1. stop the modem-manager process before connecting the USB cable:
    > sudo killall modem-manager
  2. search the corresponding packed installed with your distribution's packet management tool and remove this "modem management" application:
    For example, on Ubuntu distributions:
    > sudo dpkg-query -S  /usr/sbin/modem-manager
    modemmanager: /usr/sbin/modem-manager
    or on more recent Ubuntu distributions:
    > sudo dpkg-query -S /usr/sbin/ModemManager
    modemmanager: /usr/sbin/ModemManager
    then run:
    > sudo apt-get remove modemmanager
  3. edit the udev rules to exclude the serial CDC interfaces from Modem Manager handling:
    Thumbs-up It is the preferred solution.
    For example, on Ubuntu distributions:
    > sudoedit /lib/udev/rules.d/10-microchip-usb-device-blacklist.rules
    Then insert the following lines:
    # Microchip boards CDC interfaces: Not handled by ModemManager
    # SAM-BA CDC interface with SAM-BA monitor
    ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", ENV{ID_MM_DEVICE_IGNORE}="1"
    # EDBG CDC interface
    ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", ENV{ID_MM_DEVICE_IGNORE}="1"
    # SEGGER console interface
    ATTRS{idVendor}=="1366", ENV{ID_MM_DEVICE_IGNORE}="1"
    
    Finally restart udev:
    > sudo service udev restart
    udev stop/waiting
    udev start/running, process 9299

    Warning, important warning: on newer revision of ModemManager, the blacklist udev rules as modified above are not supported anymore if the daemon is configured in strict mode. The discussion is still ongoing on the ModemManager project, but for now, you can change the mode to paranoid.
    This is done editing the file /lib/systemd/system/ModemManager.service like exposed below:
    > sudoedit /lib/systemd/system/ModemManager.service
    [..]
    ExecStart=/usr/sbin/ModemManager --filter-policy=paranoid
    [..]
    > sudo systemctl daemon-reload
    > sudo systemctl restart ModemManager
    More information on this can be found on this ModemManager bug entry
r103 - 04 Jun 2024 - 06:39:05 - DharmaBalasubiramani
 
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM