Description | Binary | FAQ applicable | |
---|---|---|---|
SAM-BA 2 | SAM-BA In-system Programmer![]() |
Maintenance only. SAM-BA 3.x recommended for new projects Use at91sama5d4x-ek as the board entry for sama5d4 Xplained (SAM-BA 2.14 & 2.15) |
|
SAM-BA 3 | SAM-BA page on Microchip web site![]() SAM-BA 3.x releases ![]() |
Convert your SAM-BA 3.1 scripts to SAM-BA 3.2 onwards with the help of ConvertSAMBAScript page |
Ubuntu | ||
---|---|---|
![]() |
Distribution version | Kernel version |
10.04 (64 bits) | 2.6.32-33-generic (2.6.32-33.70) | |
10.10 (32 bits) | 2.6.35.30-generic (2.6.35-30.56) | |
10.10 (64 bits) | 2.6.35.30-generic (2.6.35-30.56) | |
11.04 (64 bits) | 2.6.38-10-generic (2.6.38-10.25) | |
11.10 (64 bits) | 3.0.0 | |
12.04 (64 bits) | 3.2.0 | |
12.10 (64 bits) | 3.5.0 | |
13.04 (64 bits) | 3.8.0 | |
13.10 (64 bits) | 3.12.4 | |
14.04 (64 bits) | 3.13 | |
16.04 (64 bits) | 4.4 | |
17.04 (64 bits) | 4.10 | |
18.04 (64 bits) | 4.15 | |
19.04 (64 bits) | 5.0 | |
Debian | ||
![]() |
Distribution version | Kernel version |
6.0 (64 bits) | 2.6.32-5-amd64 | |
sid (64 bits) | 4.0.0-2-amd64 ~ 4.9.30 | |
Fedora | ||
![]() |
Distribution version | Kernel version |
14 (32 bits) | 2.6.35.6-45.fc14.i686 | |
14 (64 bits) | 2.6.35.6-45.fc14.x86_64 | |
15 (64 bits) | 2.6.38.6-26.rc1.fc15.x86_64 | |
OpenSuse | ||
![]() |
Distribution version | Kernel version |
11.3 (64 bits) | 2.6.34.10-0.2-desktop | |
11.4 (64 bits) | 2.6.37.1-1.2-desktop |
$ chmod +x sam-ba $ chmod +x sam-ba_64
/etc/group
file and add your username at the end of the line starting with dialout
.
dialout:x:20:myusernameLogout and login.
sam-ba
variant that fits your distribution:
$ sam-baor for a 64 bit distribution:
$ sam-ba_64
sam-ba
binary by sam-ba_64
:
$ mv sam-ba sam-ba_32 $ ln -s sam-ba_64 sam-ba
$ dmesgIf 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.
/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.
lsusb -d 03eb:6124 Bus 004 Device 006: ID 03eb:6124 Atmel Corp03eb is the vendor number and 6124 is the product number.
rmmod usbserial
modprobe usbserial vendor=0x03eb product=0x6124
lsusb -d 03eb:6124 Bus 004 Device 006: ID 03eb:6124 Atmel Corp
dmesg
...
kernel: usb 4-2: new full speed USB device using uhci_hcd and address 5
kernel: usb 4-2: configuration #1 chosen from 1 choice
kernel: usbserial_generic 4-2:1.0: generic converter detected
kernel: usbserial_generic: probe of 4-2:1.0 failed with error -5
kernel: usbserial_generic 4-2:1.1: generic converter detected
kernel: usb 4-2: generic converter now attached to ttyUSBx
=> you will have to use /dev/ttyUSBx instead of \usb\ARM0 to connect to your board
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.
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.
RomBOOT
message appearing, configure your serial line to 57600.115200 8-N-1
.
115200 8-N-1
:
Baud rate | 115200 |
Data | 8 bits |
Parity | None |
Stop | 1 bit |
Flow control | None |
/opt
directory
Description | Binary | Recipe used to generate the SDK |
Distribution used |
Yocto Project 3.1 - dunfell | |||
---|---|---|---|
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 | |||
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 | |||
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 | |||
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 | |||
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 |
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![]() |
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-managerSo, you have several options to solve this problem:
modem-manager
process before connecting the USB cable:> sudo killall modem-manager
> sudo dpkg-query -S /usr/sbin/modem-manager modemmanager: /usr/sbin/modem-manageror on more recent Ubuntu distributions:
> sudo dpkg-query -S /usr/sbin/ModemManager modemmanager: /usr/sbin/ModemManagerthen run:
> sudo apt-get remove modemmanager
> sudoedit /lib/udev/rules.d/10-microchip-usb-device-blacklist.rulesThen 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
strict
mode. The discussion is still ongoing on the ModemManager project, but for now, you can change the mode to paranoid
. /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 ModemManagerMore information on this can be found on this ModemManager bug entry
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.
Atmel® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
ARM® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.