Hi,
Just a note, I made makefiles "smarter", now they look into chconf.h and halconf.h and only enabled modules are compiled. This should speed up a lot the build process. This was becoming a problem because the HAL is growing larger and it is problematic compile all of it each time.
The feature is experimental and not enabled by default, if you want to give it a try please put "USE_SMART_BUILD = yes" into your makefile. The only assumption is that halconf.h, chconf.h and Makefile must be in the same directory (it is always this way for all provided projects).
At some point I will update all makefiles to enable it as default.
Giovanni
[INFO] Implemented "Smart Build" mode
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] Implemented "Smart Build" mode
Hi Giovanni.
I do not think it is a good idea.
1) *.mk became obscured.
2) now you actually have to maintain 2 versions (old and new) of *.mk files (even if it is single file).
3) speedup on real life projects is close to negligible because of lots of other source files.
Using ccache for speedup is much more effective (especially on *.cpp sources).
UPDATE:
"USE_SMART_BUILD=no" broken because DAC driver moved to its personal directory.
I do not think it is a good idea.
1) *.mk became obscured.
2) now you actually have to maintain 2 versions (old and new) of *.mk files (even if it is single file).
3) speedup on real life projects is close to negligible because of lots of other source files.
Using ccache for speedup is much more effective (especially on *.cpp sources).
UPDATE:
"USE_SMART_BUILD=no" broken because DAC driver moved to its personal directory.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] Implemented "Smart Build" mode
I don't understand, old .mk files work exactly as before.
Giovanni
Giovanni
Re: [INFO] Implemented "Smart Build" mode
For example:
1) open testhal/STM32/STM32F0xx/ADC
2) set USE_SMART_BUILD = no
3) try to build it
My system throws following error "make: *** No rule to make target 'dac_lld.c', needed by 'build/obj/dac_lld.o'."
1) open testhal/STM32/STM32F0xx/ADC
2) set USE_SMART_BUILD = no
3) try to build it
My system throws following error "make: *** No rule to make target 'dac_lld.c', needed by 'build/obj/dac_lld.o'."
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] Implemented "Smart Build" mode
Just as an aside, I see this showing up the new makefiles from my port to Chibios 3.x - it initially threw me when it broke my project.
I used to store the halconf.h, chconf.h etc in a config specific folder along with other project config files - took me a while to work out why my projects would no longer compile.
So given the option is present as a default now, would it be possible to update the chibios .mk files to allow a path to be specified (#define CHIBIOS_CONFIG_PATH) or something simliar so that we are not forced to move our files into a predefined structure, but still benefit from the optimised build ?
Thanks for your consideration
Simon
I used to store the halconf.h, chconf.h etc in a config specific folder along with other project config files - took me a while to work out why my projects would no longer compile.
So given the option is present as a default now, would it be possible to update the chibios .mk files to allow a path to be specified (#define CHIBIOS_CONFIG_PATH) or something simliar so that we are not forced to move our files into a predefined structure, but still benefit from the optimised build ?
Thanks for your consideration
Simon
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] Implemented "Smart Build" mode
Hi,
I have to find a way that does not require changes in all Makefiles if possible, I will consider this.
Giovanni
I have to find a way that does not require changes in all Makefiles if possible, I will consider this.
Giovanni
Re: [INFO] Implemented "Smart Build" mode
I'd like to use the "smart build" mode but is assumes that halconf.h, etc. are in the current working directory. Any way around this?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] Implemented "Smart Build" mode
Hi,
The solution would be creating custom .mk files or adding yet another variable with a path and change all makefiles.
Giovanni
The solution would be creating custom .mk files or adding yet another variable with a path and change all makefiles.
Giovanni
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 27 guests