Creating a supplemental boards.txt file for breadboard 168's and 328's

I have created a test rig for 168 and 328 chips and have verified that it is working. Now I want to set-up my Arduino IDE to allow me to program those boards with a variety of configurations (Internal oscillator, 1MHz, 8MHz, etc...)

I plan on programming the chips with ISP, so I don't need a bootloader for each of these configurations, but when I looked at the core for ATtiny's I noticed that the "empty" bootloaders contained a fair bit of information. How do I set-up the boards file to program the fuses I need and consequently what needs to be in the bootloader.file=empty4.hex file to get that to work?

My goal is to test a Arduino library and sketch under a variety of different configurations. I will use 168's, 328P's, and plain 328's

Make additions to the Boards.txt file. Copy an existing configuration - The Arduino one makes a one to copy. Change the name in the description and at the start of each line and then also edit the ARVDude.conf with an appropriate entry. Look at both those files and itr should make sense.

How do I create a blank bootloader hex file? I want to use burn bootloader to program fuses, but I don't want to actually use a bootloader--I will be programming the device via isp.

Attached to this post should be file with everything you need to get started. Just expand the contents into the sketch folder.

breadboard.7z (1.14 KB)

This is how I create the empty images...

• Open the boards.txt file

• Comment-out these two lines (.build.core line and .build.variant line)...

# atmega328Pbb1.build.core=arduino:arduino
# atmega328Pbb1.build.variant=arduino:standard

• Remove the comment from this line...

atmega328Pbb1.build.core=empty

• Close and save boards.txt

• If it is running close and restart the Arduino IDE

• The stuff in the cores/empty directory is now the current core. The only thing of interest is in main.cpp which consists of this...

int main(void)
{
for (;;);
return 0;
}

• In the Arduino IDE, select the board of interest (the board that was just switched to the empty core)

• Verify

• Navigate to the TEMP directory and locate the dot-hex file. That is the empty image.

• Copy and rename the empty image to the bootloaders/empty directory.

• Open the boards.txt file

• Comment-out this line...

# atmega328Pbb1.build.core=empty

• Restore these lines...

atmega328Pbb1.build.core=arduino:arduino
atmega328Pbb1.build.variant=arduino:standard

• Ensure this points to the correct directory (empty)...

atmega328Pbb1.bootloader.path=empty

• Set this to the name of the empty image...

atmega328Pbb1.bootloader.file=empty328Pat1.hex

• Close and save boards.txt

• If it is running close and restart the Arduino IDE

It is a lot of fiddly steps but the build settings are correct (e.g. the processor speed) so a mostly-empty-image could easily be created. For example, you may want the "empty" image to slowly flash an LED. That way you would know the empty image is loaded and it is safe to fiddle with the wiring.