A few years back, I created my own custom board in the Arduino IDE, so that I could make use of the Calibrated Internal RC Oscillator in the ATMega328p. Doing that was fairly simple. I just created a new bootloader, and modified the boards.txt file so that I would have a Nano board with different fuses and a lower oscillator and clock speed.
Roll forward to 2021. I started a new project and tried to reuse my old custom board files. But there's a problem. The Arduino IDE developers decided to throw the old method of managing boards away, and create an entirely new system.
I found some guidance online, but it's for windoze, and the files don't seem to match those that are in a Linux Ubuntu installation.
So, how do I create a new board in Arduino when using Linux/Ubuntu? It should be quite simple. I just want a Nano with updated fuses and a lower oscillator/clock speed.
Unfortunately I think that guide assumes that you will be using the same bootloader as a regular Arduino board. I can't do that. The upload speed would be too high for a 1Mhz clock.
I'm close to giving up the whole idea of creating my own board in Arduino 1.8.16, and doing one of the following:
- Use AVRDUDE on command line with my USBasp
- Use an older version of the Arduino IDE
In any case, the IDE developers may just change it all again in a few weeks/months/years, and then I wasted some more time.
did you visit the my_boards repository linked in the answer? I have multiple customized bootloaders there. it is very simple to setup the necessary folders and files.
Thanks for your reply. I couldn't work out how to direct the Arduino IDE to my custom board.
I opened File>Preferences in the Arduino IDE, and tried to add a path to the 'Additional Boards Manager URLs'. I closed the IDE and restarted, but I can't see my custom board.
I just don't know how to structure the folders or place the files correctly so that the IDE can see them.
OK, after reading a little of this page, I think I may be getting somewhere.
But where do I put the bootloader hex file?
see my my_boards git repository. it is exactly what I have in my Arduino/hardware/my_boards folder
Thanks. I succeeded in getting my 1Mhz bootloader uploaded into an ATMega328p.
However, when I tried to use a serial programmer with the new bootloader, I hit a new problem:
Error while detecting libraries included by /tmp/arduino_build_891258/sketch/Blink.ino.cpp
avr-g++: error: device-specs/specs-ATmega328P: No such file or directory
Any idea what might cause these errors? They don't happen when using the regular Arduino setup.
I've fixed it. My mistake was to set the mcu as 'ATmega328p' instead of 'atmega328p'.
I now have a blink program running on a bare bones Arduino, using the internal RC oscillator at a clock speed of 1Mhz, with no 16Mhz resonator/crystal.
for that you could use MiniCore by McuDude
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.