At work a colleague developed a custom board in the time of chip shortage™ and had to use a 20 MHz oscillator in place of a 16 MHz requiring a custom board configuration. The solution after searching the often misleading Arduino forums was to hack it into the global
This is neither portable nor does it interact well with updates of the Core. Fortunately, there are very good, not misleading forum posts!
A (hopefully more than just slightly) better solution is to use the
hardware/ directory in the
Sketchbook folder and to reference the standard Arduino configurations (using the
- Let’s name the board
gsinosince my colleague and I work at GSI.
- Then let’s create a folder structure
- … write a basic
If the created folder contains only this
board.txt file, the menu entry in the IDE for this board will be “Tools/Board/gsi-avr/GSino Board”. If you want it a little prettier, create a
Voilà! If you need to take this to another computer or share it with a friend, just zip the relevant parts of the
$SKETCHBOOK/hardware/ folder and unpack it in its new location.
And there you have a slightly more portable and cleaner solution to writing your own hardware platform.
*) This was done on Arduino IDE version 1.8.19 and should work for quite a while (probably after version 1.5.x). AFAIK, this should work similarly with the new 2.0 IDE. But I did not test this.