Adding a custom board to the Arduino IDE I would like to know what is the procedure for adding a custom board to the Arduino IDE?

My custom board is similar to the Arduino Zero. Instead of using the ATSAMD21G18, my board is based around the ATSAMC21G18. I also have the Atmel/Microchip SAMC21 Xplained development board.

I have found some open source code where the author has adapted/forked the Arduino SAMD21 code and made it work for the SAMC21 Xplained board (here). The author has stuck to the Arduino hardware folder structure and has added the SAMC21 Xplained to the board.txt file.

As a test, when I install the Arduino SAMD21 from the Arduino Board Manager, I noticed that it installed the hardware files in the following directory:

 %LOCALAPPDATA%\Arduino15\packages\arduino\hardware\samd\1.6.19\


I have read that to add hardware files to the board manager I need to create a .json file with the appropriate details. More information here. However, as far as I can tell, this requires me to zip the SAMC21 hardware files into a tarball and provide a URL to that tarball. I also need to generate and insert a SHA in the .json file. 

Am I on the right path with the .json file?

Or should I just download the SAMC21 hardware files and place them in the %LOCALAPPDATA%\Arduino15\packages\arduino\hardware\samd\ folder next to the 1.6.19 folder?

My last resort would be to just copy the files into the existing SAMD21 hardware folder?



I have looked into the following Arduino SE questions but they do not answer the question satisfactorily.


upload.tool not used in custom boards.txt?
Arduino Due custom platform for school and library installation (I would prefer not to use the Arduino IDE in portable mode.)
The simplest clean way to add your board using an existing core is to add the variant to your sketches folder's hardware subfolder. Only boards.txt and files for the board variant are added.

In your sketches folder create a 'hardware' folder. In this folder create a folder with the name of your boards package and a subfolder with the architecture name and a subfolder for variant and a name of the variant. for example hardware/my_boards/samd/variants/samc21x

In your variant folder (variants/samc21x) put the files for your variant based on variant files of the closet variant in the referenced hardware package. In your case perhaps a mkrzero would be a good example.

In your package's root (hardware/my_boards/samd/) add boards.txt file with entries for your board.

For boards.txt take the options for a similar board in referenced package. Change the names and settings and prefix build.core value with the name of the vendor of the referenced package. For arduino/samd it would be arduino:. For example samc21x.build.core=arduino:arduino

My custom and customized boards definitions https://github.com/jandrassy/my_boards