Dual Build
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Dual Build
Giovanni wrote:Probably two makefiles.
Giovanni
yes that would be an option, but how would one instigate the usage of two makefiles ????
could you not pass a build define to one make file and then this is conditionally checked and either one or another scatter file is used ?
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Dual Build
The two makefiles can include different scatter file and set preprocessor switches.
Giovanni
Giovanni
Re: Dual Build
Giovanni wrote:The two makefiles can include different scatter file and set preprocessor switches.
Giovanni
Ok but how does one implement this in chibistudio, all i want to achieve is
press build button, and out pops two binarys
PS im no expert on setting up Eclipse, hence the guidance
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Dual Build
Make a makefile that makes the other two makefiles 
For example:
- Makefile
- Makefile_this
- Makefile_that
Eclipse would on "see" the first one.
The problem that I can see is that both would create "build" and ".dep" directories, so you may need to put the makefiles in different directories.
Giovanni
For example:
- Makefile
- Makefile_this
- Makefile_that
Eclipse would on "see" the first one.
The problem that I can see is that both would create "build" and ".dep" directories, so you may need to put the makefiles in different directories.
Giovanni
Re: Dual Build
I've had a quick play with this, including two separate makefiles into the main makefile as suggested.
Giving each build a different project name generates differently named sets of binaries etc in the build directory.
The problem (as Giovanni suggested) is the single dependency directory. And putting the two build makefiles in separate subdirectories didn't solve that - the depndencies were still put into the '.dep' directory. Related to this is the fact that the build is only started once the complete makefile structure has been read. What's really needed is to run the two build makefiles sequentially, rather than as a single operation.
Giving each build a different project name generates differently named sets of binaries etc in the build directory.
The problem (as Giovanni suggested) is the single dependency directory. And putting the two build makefiles in separate subdirectories didn't solve that - the depndencies were still put into the '.dep' directory. Related to this is the fact that the build is only started once the complete makefile structure has been read. What's really needed is to run the two build makefiles sequentially, rather than as a single operation.
Re: Dual Build
The other potential problem is that each source file is only compiled once. Not a problem with similar processors (I was working with 32F051 and 32F091), but could be if the two processors have different instruction sets, or need different compiler options.