Software Tools
SAM-BA
The SAM Boot Assistant (
SAM-BA) comes with the
AT91 In-system Programmer (ISP). It allows to program flash media through RS232, USB or
Jtag SAM-ICE link.
SAM-BA only runs on Windows.

Patches are needed for some products: be sure to install
SAM9G15 G25 G35 X25 X35 Patch for SAM-BAŽ 2.10 if you need SAM-BA for those chips.
SAM-BA Linux initiative
A revision of SAM-BA is ported to Linux. It is at the side of the official SAM-BA ISP revision.
| Description | Binary | FAQ applicable |
SAM Boot Assistant (SAM-BA 2.10) Linux port initiative using CDC | sam-ba_2.10.zip | |

You can also use
.tcl scripts from this flavor of SAM-BA. This is useful if you want to run
GettingStarted#DemoArchiveBinaries demos.
SAM-BA Linux uses the USB connection through CDC to communicate with the device.
Tested Linux distributions
This table indicates the distributions on which we have tested SAM-BA.
Since SAM-BA is a 32 bits application, we can assume that it is ok on 32 bits version if it works on 64 bits version.
| 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 alpha 3 (64 bits) | 3.0 |
| Debian |
| Distribution version | Kernel version |
| 6.0 (64 bits) | 2.6.32-5-amd64 |
| 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 |

Note that SAM-BA will certainly work on other distributions as well. Checking following indications will give you clues on how to proceed.
Using SAM-BA with various linux distributions
Ubuntu
# apt-get install linux-image-generic linux-headers-generic
- On 64 bits version install 32 bits libraries:
# apt-get install ia32-libs
- Give sam-ba execute permission if needed:
$ chmod +x sam-ba
- Connect the board
- Create a symlink on
/dev/ttyACM0
# ln -s /dev/ttyACM0 /dev/ttyUSB0
Debian
# apt-get install linux-image-generic linux-headers-generic
- On 64 bits version install 32 bits libraries:
# apt-get install ia32-libs
- Give sam-ba execute permission if needed:
$ chmod +x sam-ba
- Add yourself into dialout group
Edit the
/etc/group file and add your username at the end of the line starting with
dialout.
dialout:x:20:myusername
Logout and login.
- Connect the board
- Create a symlink on
/dev/ttyACM0
# ln -s /dev/ttyACM0 /dev/ttyUSB0
Fedora
- On 64 bits version install 32 bits libraries:
# yum install glibc libstdc++ libX11
# yum install glibc.i686 libstdc++.i686 libX11.i686
The first line update your 64 bits libraries in order to have the same version as 32 bits libraries. If you don't do this, Fedora may complain that you have multilib versions
- Give sam-ba execute permission if needed:
chmod +x sam-ba
- Add yourself into dialout group
Edit the
/etc/group file and add your username at the end of the line starting with
dialout.
dialout:x:18:myusername
Logout and login.
- Connect the board
- Create a symlink on
/dev/ttyACM0
# ln -s /dev/ttyACM0 /dev/ttyUSB0
OpenSuse
- On 64 bits version install some 32 bits libraries:
glibc libstdc++ xorg-x11-libX11
- Give sam-ba execute permission if needed:
chmod +x sam-ba
- Add yourself into dialout group
Edit the
/etc/group file and add your username at the end of the line starting with
dialout.
dialout:x:16:myusername
Logout and login.
- Connect the board
- Create a symlink on
/dev/ttyACM0
# ln -s /dev/ttyACM0 /dev/ttyUSB0
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.
How to use SAM-BA with old kernels (< 2.6.32)?
USB CDC Serial driver mount procedure :
- Login with administrator rights
- Unload usbserial module if it is already running
rmmod usbserial
- Load usbserial kernel module
modprobe usbserial vendor=0x03eb product=0x6124
- Verify that the USB connection is established
lsusb -d 03eb:6124
Bus 004 Device 006: ID 03eb:6124 Atmel Corp
- Know which USB connection is established
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