Kconfig: Add build system integration and test application#12773
Kconfig: Add build system integration and test application#12773kaspar030 merged 3 commits intoRIOT-OS:masterfrom
Conversation
|
I'm getting an error compiling |
05f30cb to
3dc4960
Compare
The good old 'it works on my machine' :-) . This should be more portable now. |
|
This compiles now just fine. With an empty |
Nice! Thanks for confirming.
After re-enabling msg2 it shows up again (together with msg1), right? If that is the case then it is correct. msg1 and msg2 are independent. The idea was to show with msg1 how configuration options would be handled in modules. When you enable "Configure message 1" ( In short, msg1 is meant to be always on, you can only modify the text itself. |
No, it doesn't. I think just doing "make" doesn't rebuild properly. Like this:
I usually always build with "make clean all", but IIRC this will clean |
I can confirm that "bin/native/generated/merged.config" contains |
Is |
no, not present there. |
Ok, so the header file is being generated correctly. I don't see why the binary would not be updated as
I can't reproduce the issue. I followed the steps and after disabling msg2 the |
If I disable ccache ( |
I don't understand why. |
|
I think the issue is that ccache transform absolute path's to relative paths within the dependency file, which make doesn't seem to match properly. So probably, with ccache, the automatic dependencies were broken before. With ccache, always rebuilding with "clean" isn't nearly as slow as depending on make's dependency resolution, so noone realized. Problem is that the kconfig user configuration sits in "bin/" (and gets cleared with "make clean"), so as of now, it's either kconfig or ccache. |
Hm, but touching riotbuild.h properly causes a rebuild independent of ccache enabled or not. |
I now enabled ccache and can confirm that the binary is not being updated. I managed to get the application re-compiled by manually adding the |
|
@kaspar030 I added |
d394deb to
ccf1829
Compare
|
I rebased to current master, now that #12695 is merged. |
9dd0681 to
fa8e6f5
Compare
fa8e6f5 to
74affef
Compare
|
BTW you can limit what murdock builds by adding a "REMOVEME" commit that sets e.g., "APPS=examples/hello-world" and/or "BOARDS=samr21-xpro" in |
|
I can easily trigger the issue locally with |
de5cc74 to
85f5e0e
Compare
|
Nice! Thanks @kaspar030, that worked! |
|
Murdock is happy now! @kaspar030 anything else that is missing? |
- The autoconf.h header file, generated with the current Kconfig configurations, is added as a build dependency. - autoconf.h depends on the proper tool (genconfig) and a Kconfig.dep which contains the dependencies for the given application and board, this is generated from $(USEMODULE). - The menuconfig target is added, to allow the configuration of modules using the Kconfig system.
85f5e0e to
1977b86
Compare
Nope, LGTM. |
|
@leandrolanzieri A short question. At the moment, it is possible to define menu items in Enabling the The background for my question is that a lot of configurations are done in RIOT using pseudomodules. Now, where we have a menu driven way for configuration, it would be nice to be able to enable or disable also modules. |
|
@leandrolanzieri One further question. I'm working on exposing ESP configurations with Kconfig. In all your PRs, you use Is this the desired behavior? It feels a little strange from the user's perspective. It suggests that this enables the module. Are there any design rules or coding conventions, or could I also use |
Not at the moment, but that's part of the plan for the second phase of migration (to resolve dependencies via Kconfig). The problem is that modules should be resolved by the time the Kconfig configurator is called. If we enable modules via Kconfig that may result in new modules being enabled, so the input Kconfig had may no longer be valid.
Thanks for working on this!
This is the intended behavior. During this phase of migration we are making the configuration of modules via Kconfig optional (that's why prompts say 'Configure ', and help strings also mention this). In the future though, the idea is that it actually enables the module as you suggest. I wrote some documentation in #13040, there you can find more background and some conventions. |
|
@leandrolanzieri Thanks for the explanation.
OK, then I will do it in same way.
I will have look on it later this week. |
Contribution description
This PR adds the Kconfig integration with the build system, for the first phase of migration, as discussed in the mailing list and the last maintainers assembly.
It makes use of the tool introduced in #12695. This also adds a small test application to see this in action. The
$(BINDIR)/generated/autoconf.hheader file is used to pass the configuration parameters to applications.Testing procedure
Currently only the test application (
tests/kconfig) is exposing configuration options:make all test -C tests/kconfigto use the default configuration provided in theapp.configfile. Test should pass.app.config, by adding anuser.configfile or by runningmake menuconfig -C tests/kconfig, if you want an interface.$(BINDIR)/generated.Issues/PRs references
Depends on #12695