I have a project written for a specific custom board, but a large portion of it is something I'd like to share with a project for another custom board. Let's call the shared portion "Core" and the unshared portions "App1" and "App2". I'd like any changes to Core to automatically propagate to App1 and App2. I use git for revision control, and a submodule seems like it would be perfect for this, with Core as a submodule of both App1 and App2. Unfortunately, I'm not sure how to do this while still preserving the directory structure Atmel Studio expects. Most of Core is things like ASF generated files (some of which have been modified), and its contents would span many of the folders in the project directory. This may expand to more than 2 projects in the future, so simply keeping it as a single project with the differences between App1 and App2 #defined in config files isn't a viable option for me.
Has anyone else found a good solution for a situation like this?
I can think of a couple ways to do it, but neither are really ideal:
1. Re-structure the project so that all of Core is in a single directory and make that the submodule - not great because it breaks the ability to add new ASF/Start modules
2. Use symlinks in the App1 and App2 projects to point to Core - Could get messy and wouldn't work like a true submodule
I'll be reading up on submodules and related tonight since I'm not really familiar with them yet, and I may be making some bad assumptions here. I'm sure this is not a new issue though, just new for me.