I'm trying to flash the samd21j18a microchip from Linux but I'am unable to do so. I've compiled toggle Led example from Atmel Framework. I tried to flash it using bossac tool and I received the following error message:

No device found on ttyACM0

The device /dev/ttyACM0 exists and I tried to run it under superuser to avoid problems with lack of permissions.

When I used the proprietary SAM-BA programmer it got stuck while connecting. I tried to flash it from Atmel Studio on Windows. It worked fine however it required an update of embedded debugger firmware to 2.10 version. After booting back to Linux and attempting to flash it again I received a different error message. Here is the whole output of bossac:

honza@honza-MS-7823:~/Downloads/BOSSA-1.6.1-arduino$ sudo '/home/honza/Downloads/BOSSA-1.6.1-arduino/bin/bossac' --info --port ttyACM0 --erase --write --verify --reset --debug -U false .pioenvs/samd21_xpro/firmware.bin
Send auto-baud
Set binary mode
Unsupported Cortex-M4 architecture
No device found on ttyACM0

And the proprietary SAM-BA programmer also fails on the following message:

Invalid chip ID

It seems to be returning ID of Cortex M4 based chip even though it's Cortex M0+ based one.

I don't want to use Atmel Studio because I'm used to JetBrains IDEs and Linux environment.

I'm new to electronics and I'm kind of lost.

Thanks in advance

  • \$\begingroup\$ github.com/dwelch67/atsamd_samples as the answer below states these chips do not have a built in bootlolader, you can add one, but it is too easy to erase, so not worth relying on. SWD is easy to come by though, $10 for something with an st-link on it. \$\endgroup\$
    – old_timer
    Jun 6, 2016 at 13:56

1 Answer 1


bossa is trying to connect over a serial port to the bootloader on the chip - which the D series chips do not ship with. You should probably work on getting openocd working with the edbg embedded debugger using cmsis - this will also get you debugging support, and not just flashing code.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.