I have an (ATMega1284p) "solution" that consists of two major components:
a) The firmware application itself
b) A bootloader specific to the application
I have two hardware boards that are targeted by this application. The newer board contains I2C devices that the earlier board does not have as well as other circuit changes (ports, etc.).
I have code that can detect which hardware it is running on.
I have enough application Flash so that the application can determine which board it has been loaded to and execute the appropriate code depending on the hardware it is running on (application contains support for both boards). I want to keep this as one image because it makes distribution easier.
I do not have enough bootloader Flash to support a single image with support for both hardware platforms.
I would like to setup two Atmel Studio projects for the two bootloader images that share identical source files but have different symbols "defined" in the project properties to allow #if directives in the source to select the appropriate support code for the hardware in use and generate the appropriate hex/elf image ... one for each platform. Distribution is not an issue because I load the bootloader specific to the board before sending it out.
I know that I could do it by building one bootloader, changing the 'target' and symbol and building again but I want all three images (application, bootloader a, bootloader b) generated when the 'solution' is built.
Is there a way to do this?