1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

40 Commits

Author SHA1 Message Date
MrKevinWeiss
d6dbf1cd86
makefiles/kconfig.mk: Remove TEST_KCONFIG dep modelling 2024-03-27 10:28:14 +01:00
MrKevinWeiss
ddfe1f6aff
boards: Use BOARD.config pattern for kconfig
Many simple kconfig configurations are added to boards and brought in with the board name.

This makes a common import of these configs so one only requires adding a BOARD.config without having to alter the makefile.
2022-02-14 13:10:09 +01:00
NikLeberg
a411841322 buildsystem: implement EXTERNAL_PKG_DIRS feature 2022-02-01 18:06:54 +00:00
Francisco Molina
80f63ba1fa makefiles.kconfig.mk: use EXTERNAL_MODULE_DIRS in Kconfig resolution
Using EXTERNAL_MODULE_PATHS works fine when only using Kconfig for
configuratio, but when using it for dependencies this value is not
set since it depends on Kconfig. Instead use EXTERNAL_MODULE_DIRS
and filter matching on Kconfig files.
2022-02-01 10:22:20 +01:00
Leandro Lanzieri
df7ce1c647
makefiles/kconfig: use two lists for boards and CPUs default configs
This introduces KCONFIG_BOARD_CONFIG and KCONFIG_CPU_CONFIG variable for
boards and CPUs (including common directories) to add default
configuration files to be merged. The current approach, as it uses
Makefile.features, would include boards first, not allowing them to
override CPU configurations.
2021-12-13 12:33:21 +01:00
MrKevinWeiss
ecb0b17910
makefiles/kconfig: Prevent pkg-prepare for info-packages
As the packages need to be downloaded before they can be included in menuconfig it becomes a bit pointless.
This also messes around with make info-packages, adding unwanted output
2021-11-26 09:26:25 +01:00
MrKevinWeiss
636c6c4cdb
cpu/cortexm: Use DEVELHELP to add stack guard 2021-09-08 12:40:30 +02:00
Kevin "Tristate Tom" Weiss
73e32207df
Merge pull request #16052 from miri64/dist/enh/genconfig-env
makefiles/kconfig.mk: generate config file from RIOT_CONFIG_% environment variables
2021-09-08 11:00:59 +02:00
Jose Alamos
dc482cffff
makefiles/kconfig.mk: force SHOULD_USE_KCONFIG if config file is present
Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2021-07-14 01:16:48 +02:00
Martine Lenders
28931da0ed
makefiles/kconfig.mk: generate config file from RIOT_CONFIG_% vars 2021-06-25 14:04:39 +02:00
Francisco
8cb8bba4e7
Merge pull request #16104 from maribu/external_modules
build system: Rework EXTERNAL_MODULE_DIRS
2021-05-07 23:27:17 +02:00
Marian Buschsieweke
6ac8aba955
build system: rework EXTERNAL_MODULE_DIRS
Previously, external modules had to be individually added to both
EXTERNAL_MODULE_DIRS and USEMODULE. If those where not in sync, this
resulted in build errors.

With this commit, search folders for external modules are added to
EXTERNAL_MODULE_DIRS instead. So lets say the file system structure is
like this

```
└── /path/to/external/modules
    ├── mod_a
    │   ├── Makefile
    │   ├── Makefile.dep
    │   ├── Makefile.include
    │   ├── foo.c
    │   └── include
    │       └── external_module.h
    └── mod_b
        ├── Makefile
        └── bar.c

```

One now adds `/path/to/external/modules` to EXTERNAL_MODULES and only
with `USEMODULE += mod_a` the corresponding module, dependencies and
include settings are actually used. Hence, it is possible to configure
`EXTERNAL_MODULE_DIRS` from `~/.profile` or `~/.bashrc` once and never
needs to worry about them again.
2021-05-07 21:29:05 +02:00
b2148cc34b
makefiles/kconfig: add pkg-prepare as menuconfig dependency 2021-04-28 11:19:24 +02:00
Martine Lenders
d4828ee7d9
Kconfig: make app.config and app.config.test mutually exclusive 2021-02-25 10:50:39 +01:00
Leandro Lanzieri
d5fc632ef4
Merge pull request #16053 from fjmolinas/pr_kconfig_external_modules
Kconfig: source EXTERNAL_MODULES configurations
2021-02-24 08:56:56 +01:00
Francisco Molina
582e3a3153
Kconfig: source EXTERNAL_MODULES configurations 2021-02-23 19:16:33 +01:00
Leandro Lanzieri
017fc36c7b
makefiles/kconfig: include out.config only when running Kconfig 2021-02-22 16:15:46 +01:00
Leandro Lanzieri
5e0ce392d1
makefiles/kconfig: run kconfig always when menuconfig is called 2020-11-06 15:58:01 +01:00
Leandro Lanzieri
59dee592cd
tests/periph_*: add Kconfig configuration files 2020-11-06 15:58:00 +01:00
Leandro Lanzieri
e815863aa9
tools/genconfig: add invalid configurations checks 2020-11-05 09:04:07 +01:00
Cenk Gündoğan
f05ac07f19
Merge pull request #15217 from leandrolanzieri/pr/kconfig/allow_merge_configs
makefiles/kconfig: always allow to use KCONFIG_ADD_CONFIG
2020-10-13 15:11:09 +02:00
Leandro Lanzieri
4d7ea1b50a
makefiles/kconfig: always allow to use KCONFIG_ADD_CONFIG 2020-10-13 09:53:00 +02:00
Leandro Lanzieri
34d84ad8c6
makefile: add check for ERROR_ Kconfig symbols
This adds a check in the build process to verify that no ERROR_ Kconfig
symbols are set. These symbols indicate invalid conditions in the
Kconfig configuration.
2020-10-09 18:01:33 +02:00
Leandro Lanzieri
4fbbb94bff
makefiles/kconfig: fix dependencies for out.config target
Kconfig.dep depends on FORCE, so it is always generated when compiling
with Kconfig under normal conditions. Whan TEST_KCONFIG=1 is set, this
file is no longer a dependency for out.config. So when cleaning the
'bin' directory, out.config has no direct dependencies that force its
rebuilding (the generated directory is order only). This causes the file
not to be produced when calling `TEST_KCONFIG=1 make clean all`.

This PR changes the dependency on the 'generated' directory to a direct
dependency when `CLEAN` is set and leaves it as order-only when not.
This allows to generate out.config only when needed by not depending on
FORCE.
2020-09-23 09:49:44 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
Leandro Lanzieri
180ee6efc9
makefiles: introduce KCONFIG_ADD_CONFIG variable
This holds a list of .config files to be merged. For more details see
kconfig.mk.
2020-08-12 12:22:42 +02:00
Leandro Lanzieri
01454188e8
Makefile.include: introduce TEST_KCONFIG switch
This switch allows to test the module dependency modelling during the
Kconfig migration. When set, it will use the symbols prefixed with
CONFIG_MOD_ defined by Kconfig as the list of modules to compile.
2020-08-12 12:22:41 +02:00
Cenk Gündoğan
132b7328e3
make: kconfig: use fixdep to enable incremental compilation 2020-08-11 09:47:32 +02:00
Leandro Lanzieri
4803793418
makefiles/kconfig: refactor targets and remove merged.config
Instead of the merged.config file, menuconfig operates directly on
out.config, which also is the destination of the merge of multiple
configuration sources.

Also, this introduces the autoconf.h.d file to track the Kconfig
dependencies and re-trigger the build of the header when any of the
Kconfig files change.
2020-08-07 18:17:38 +02:00
Leandro Lanzieri
cf779a7241
makefiles/kconfig.mk: Remove duplicate calls to merge_config 2020-08-03 12:26:05 +02:00
Leandro Lanzieri
6a5c7744cb
makefiles/kconfig.mk: include KCONFIG_OUT_CONFIG always
This allows to include KCONFIG_OUT_CONFIG file in Makefile
unconditionally, which means that `make clean all` is allowed when using
Kconfig.

For this, the recipe for `clean` is guarded with `MAKE_RESTARTS` so
the BINDIR folder is not removed once Make restarts scanning the files.
2020-07-31 13:55:33 +02:00
Cenk Gündoğan
53eb1efe1b kconfig: make sync-deps flag accessible 2020-07-29 15:33:07 +02:00
Leandro Lanzieri
4ae944bac2
makefiles/kconfig: Output out.config with generated configuration
'merged.config' may not always be present (e.g. when no files to merge
are present). In order to always have an up-to-date configuration file
'out.config' will be generated mirroring the content of 'autoconf.h'.
This is the file that the build system will include to read the current
configuration symbols.
2020-04-08 17:37:05 +02:00
Leandro Lanzieri
f716cb1d39 makefiles/kconfig: Allow to override SHOULD_RUN_KCONFIG 2020-01-30 17:42:42 +01:00
Francisco
330d9dffc6
Merge pull request #12977 from leandrolanzieri/pr/makefiles/kconfig_only_when_needed
makefiles/kconfig: Only run Kconfig if it could generate configurations
2020-01-14 11:28:34 +01:00
Leandro Lanzieri
e88254e52a makefiles/kconfig: Escape comment in autoconf.h for Windows
In Windows setups using MSYS environment variables which start with a
slash get the 'root path' added. This adds a second slash to the content
of KCONFIG_AUTOHEADER_HEADER, so the first one is escaped when building
on those platforms.
2020-01-05 20:45:14 +01:00
Leandro Lanzieri
707ad8d083 makefiles/kconfig: Include configuration symbols
If the generated configuration file is present include it. That way one
can check if certain symbols are being configured using Kconfig.
2019-12-19 15:35:21 +01:00
Leandro Lanzieri
9c8b7a064b makefiles/kconfig: Only run Kconfig if could generate configurations
This adds a check to decide if Kconfig should run on a build. It will
run if any of the following conditions is true:
- A file with '.config' extension is present in the application folder
- A 'Kconfig' file is present in the application folder
- A previous configuration file is present (e.g. from a previous call to
  menuconfig)
- menuconfig is being called

This assumes that Kconfig will not generate any default configurations
just from the Kconfig files outside the application folder (i.e. module
configuration via Kconfig is disabled by default). Should this change,
the check would not longer be valid, and Kconfig would have to run on
every build.
2019-12-18 09:46:43 +01:00
Leandro Lanzieri
b674710ae5 makefiles/kconfig: Add symbols for used packages 2019-12-13 15:21:16 +01:00
Leandro Lanzieri
1655001d85 makefiles: Add Kconfig related targets and dependencies
- 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.
2019-12-04 15:23:51 +01:00