Go Down

Topic: Adding custom (Zero based) boards to the Arduino IDE (Read 6470 times) previous topic - next topic


Thanks MartinL for your great walkthrough.

I'm also in the middle of designing a  custom board around the SAMD21, replacing the Atmega328P due to need of more Flash/RAM. After reading through all info pertaining to this topic there is still a missing piece in the puzzle I need help with: as you have done already the Falcon projects with "virgin" SAMD21 processors, can you point me in the right direction how to burn the bootloader to such a custom board?

Thanks !!!


Sep 18, 2017, 03:27 pm Last Edit: Sep 18, 2017, 03:31 pm by MartinL
Hi Protonerd,

To burn the bootloader on to the SAMD21, you need to connect a programmer such as the Atmel-ICE, (I use the  Atmel-ICE Basic kit), to a 2x5 way, 1.27mm pitch, SWD connector on your board. (On the Falcon boards it's the small pin header located on the top right hand side, shown in the image on the previous page).

To program:

1. Connect your programmer to your custom board, via the SWD connector.
2. Plug in your custom board's USB into your PC.
3. Plug in you programmer's USB into your PC.
4. In the Arduino IDE Tools->Board menu, select your custom board.
5. In the Arduino IDE Tools->Programmer menu, select the "Atmel-SAM-ICE" programmer.
6. Again in the Arduino IDE Tools menu, select "Burn Bootloader".

After you've successfully burned the the bootloader, you can remove the programmer and thereafter program to board directly using the native USB port.


Thanks a lot, I will have a look at the programmers.

I also found one page which describes how to do it with another SAMD21 based board with breakout debug signals:

What do you think about it? Could it work that way? Can such a board replace an expensive programmer?


Can such a board replace an expensive programmer?
I just noticed that the cost of the Atmel-ICE Basic has doubled. (I paid about £35 for mine a couple of years ago).

The cheapest option might be to buy the ATATMEL-ICE-PCBA. It's just the bare Atmel-ICE ciruit board, although you'd have to make up your own SWD ribbon cable and supply the USB cable.


Another related question (sorry to bother you!), if you made a custom PCB for your flight controller, can you tell me where did you get the scematic/footprint model of the SAMD21 series? I'm using Altium, I had no problem finding the libraries for the AVR's, but I fail to sind the same for the SAMD21. The ones I found so far have the M3 cortex designs only...


Hi Protonerd,

Nowadays I use Kicad and just make the footprints myself. In Kicad is relatively simple, I don't have any experience of Altium though.

I took the footprint specification from the package information in the SAMD21 datasheet. The SAMD21 series are available in TQFP, QFN and BGA packages

The SAMD21G is a standard 48-lead, 0.5mm pitch, 7mm x 7mm TQFP, or a 48-lead, 0.5mm pitch, 7mm x 7mm very thin QFN.

The larger SAMD21J, 64-pin version is also available and is completely compatible with the Arduino IDE as well. (Although it requires minor modifications to the Arduino Zero's "variant.cpp" and "boards.txt" files to account for the extra pins).

Go Up