Making a Hardware Profile for Arduino

Can someone point me in the right direction to the instructions on how to create a new hardware profile for the Arduino IDE?

I made my own hardware with an Atmel168 but I used a different pin out and I'd like to be able to give the user the choice to select my hardware profile from the IDE.

I have also written a boot loader that also is unique for this hardware. I'd like to integrate that into the menu of the IDE as well.

Any help would be greatly appreciated.

Thanks.

I went through this process recently for my own custom Arduino-based board, and similarly couldn't find much real documentation on the subject. If all you are changing is DIGITAL pin numbers and bootloader stuff, there are only a couple files to modify. If you need to change other things for your board, like the CPU speed (other than a couple Arduino 'standards' e.g. 8, 16 or 20MHz) or analog pin numbers, it's a bit more work.

This page has an overview of the process, but it's a bit out of date.

For a basic variant, make a copy of the Arduino core folder (installed in a subfolder where your Arduino IDE is located e.g. arduino_IDE_folder\hardware\arduino), rename the folder to the name of your project, and move it to the 'Hardware' directory inside your personal Sketch folder (for Windows, this is usually something like C:\Documents and settings\yourname\My Documents\Arduino\hardware or C:\Users\yourname\Documents\Arduino\hardware) . Note, it is also possible to patch your board directly into the copy where the Arduino IDE is located, but there it risks being overwritten when a new IDE/core version is installed.

Go to your renamed copy. Inside here are two text files, "boards.txt" and "programmers.txt", and a handful of subfolders containing the core itself, bootloader files and pin mappings. MOST of the changes you need are in boards.txt. It contains a bunch of lines like:

someboard.name = Arduino Someboard w/ ATMega 168
someboard.someparameter = ...

Follow the instructions of the link above to change these as needed, e.g. with the correct name/baudrate/programmer for your bootloader, CPU speed, etc. As of 1.0, board-specific pin map data is stored in the 'variants' subfolder; in the example above the 'someboard' board would have its pin map in \variants\someboard\pins_arduino.h. Modify the pin mappings as needed for your board. Modify/replace the contents of the 'bootloaders' folder with your own bootloader files.

Assuming all went well ,when you close and re-open the Arduino IDE, your newly defined board should be listed.

If your board's differences go beyond digital pin mappings...
When doing this for my project, I wrote up a wiki page showing the locations of board-specific settings that I've found so far in the 1.0 and pre-1.0 cores. MOST of the changes will be centered in pins_arduino.h, but there are a few things like hard-coded CPU speeds (for e.g. delayMicroseconds()) and analog pin numbers scattered around the core.

You may also wish to review the configuration files (zip'd):
http://hlt.media.mit.edu/?p=1229