Skip to content

Build-time configuration header #5092

@jnohlgard

Description

@jnohlgard

The command lines for the compilation are getting quite long with all the modules listed on the command line.
An alternate solution would be to introduce a build-time generated header that will contain defines for all enabled modules and other defines currently given on the command line. The drawback is that this configuration header must be included by all headers and c files in the tree..

We can actually implement it using the -include GCC command line option.

something like $(BINDIR)/riot-build.h:

#define COREIF_NG 1
#define CPU_ARCH_CORTEX_M4
#define CPU_MODEL_K60DN512VLL10
#define RIOT_BOARD BOARD_MULLE
...
#define MODULE_AT86RF212B
#define MODULE_AT86RF2XX
#define MODULE_GNRC_NETAPI
...

Metadata

Metadata

Assignees

Labels

Area: build systemArea: Build systemDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PR

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions