zephyr/scripts
Ulf Magnusson 213a88f7ff Kconfig: Support macro expansion within symbol names
Update Kconfiglib to upstream revision 2be02fac78527 to add support for
expanding macros within symbol names, extending the existing Kconfig
preprocessor
(https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt). Some minor optimizations are included as
well.

This makes it possible to add Kconfig templates to avoid code
repetition, e.g. like below:

Kconfig.log_template:

    choice
    	prompt "Max compiled-in log level for $(module-str)"

    config $(module)_LOG_LEVEL_OFF
    	bool "Off"

    config $(module)_LOG_LEVEL_ERR
    	bool "Error"

    config $(module)_LOG_LEVEL_WRN
    	bool "Warning"

    config $(module)_LOG_LEVEL_INF
    	bool "Info"

    config $(module)_LOG_LEVEL_DBG
    	bool "Debug"

    endchoice

    config $(module)_LOG_LEVEL
    	int
    	default 0 if $(module)_LOG_LEVEL_OFF
    	default 1 if $(module)_LOG_LEVEL_ERR
    	default 2 if $(module)_LOG_LEVEL_WRN
    	default 3 if $(module)_LOG_LEVEL_INF
    	default 4 if $(module)_LOG_LEVEL_DBG

Using the template:

    module = FOO
    module-str = foo
    source "Kconfig.log_template"

    ...

    module = BAR
    module-str = bar
    source "Kconfig.log_template"

This feature might create harder-to-read Kconfig files if abused, so it
should probably be used sparingly.

Fixes: #9761

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-11 16:08:38 +02:00
..
checkpatch
ci check-compliance: Fix undef. Kconfig symbol check for external projects 2018-08-18 10:38:52 +02:00
cmake
coccinelle kernel: Fix bitwise operators with unsigned operators 2018-08-16 19:47:41 -07:00
cross_compiler
dts scripts: dts: extract: Fix handling of irq prop being a list of lists 2018-09-06 09:46:03 -05:00
footprint
gitlint
kconfig Kconfig: Support macro expansion within symbol names 2018-09-11 16:08:38 +02:00
meta/west scripts: west: sync with upstream 2018-07-30 17:56:21 -04:00
sanity_chk sanitycheck: update release data 2018-09-09 21:07:19 -04:00
support scripts: make runner a west subpackage 2018-05-19 07:01:39 +03:00
.gitignore
check_host_is_ok.py
check_link_map.py
checkpatch.pl
checkstack.pl
dir_is_writeable.py
elf_helper.py Fix struct offsets (DWARF v2 compatibility) 2018-05-25 16:49:42 +02:00
file2hex.py
filter-known-issues.py scripts: filter-known-issues: Add extra newline 2018-07-12 23:11:46 -04:00
gen_alignment_script.py
gen_app_partitions.py userspace: app_shared_mem: Fixed incorrect implementation. 2018-08-14 05:22:54 -07:00
gen_gdt.py
gen_idt.py gen_isr_tables: Delete the dead code accompanying .intList.num_isrs 2018-06-25 12:54:49 -07:00
gen_kobject_list.py userspace: add net_context as a kernel object 2018-08-13 07:19:39 -07:00
gen_mmu_x86.py
gen_offset_header.py
gen_priv_stacks.py
gen_syscall_header.py
gen_syscalls.py syscalls: Define the syscall id's with '#define' instead of enum 2018-08-13 16:43:40 -07:00
parse_syscalls.py userspace: adjust syscall generation scripts 2018-07-24 14:39:38 -04:00
process_gperf.py
qemu-machine-hack.py
requirements.txt doc: add ability to generate PDF 2018-08-29 18:16:56 -04:00
sanitycheck sanitycheck: capture delayed faults 2018-08-30 15:05:30 -04:00
spelling.txt
subfolder_list.py cmake: Using symlinks on unix like os'es for dependencies 2018-06-19 17:00:27 +02:00
tags.sh
waitpid
west scripts: create meta-tool package, "west" 2018-05-19 07:01:39 +03:00
west-win.py scripts: create meta-tool package, "west" 2018-05-19 07:01:39 +03:00