mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-03 17:54:15 +00:00
This commit is useful if there is a need to generate a file that can be included into the application at build time. The file can also be compressed automatically when embedding it. Files to be generated are listed in generate_inc_file generate_inc_gz_file variables. How to use this commit in your application: 1. Add this to your application Makefile SRC = $(ZEPHYR_BASE)/<your-app-dir>/src include $(ZEPHYR_BASE)/scripts/Makefile.gen 2. Add needed binary/other embedded files into src/Makefile to "generate_inc_file" or "generate_inc_gz_file" variables: # List of files that are used to generate a file that can be # included into .c file. generate_inc_file += \ echo-apps-cert.der \ echo-apps-key.der \ file.bin generate_inc_gz_file += \ index.html include $(ZEPHYR_BASE)/scripts/Makefile.gen 3. In the application, do something with the embedded file static const unsigned char inc_file[] = { #include "file.bin.inc" }; static const unsigned char gz_inc_file[] = { #include "index.html.gz.inc" }; The generated files in ${SRC}/*.inc are automatically removed when you do "make pristine" Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> |
||
---|---|---|
.. | ||
basic | ||
checkpatch | ||
ci | ||
cross_compiler | ||
dts | ||
footprint | ||
gitlint | ||
kconfig | ||
sanity_chk | ||
support | ||
.gitignore | ||
check_link_map.py | ||
checkpatch.pl | ||
checkstack.pl | ||
file2hex.py | ||
filter-known-issues.py | ||
gcc-version.sh | ||
gen_gdt.py | ||
gen_idt.py | ||
gen_kobject_list.py | ||
gen_mmu.py | ||
gen_offset_header.py | ||
headerdep.pl | ||
Kbuild.include | ||
make-ll | ||
Makefile | ||
Makefile.build | ||
Makefile.clean | ||
Makefile.extrawarn | ||
Makefile.gen | ||
Makefile.headersinst | ||
Makefile.help | ||
Makefile.host | ||
Makefile.lib | ||
Makefile.modbuiltin | ||
Makefile.qemu | ||
Makefile.toolchain.espressif | ||
Makefile.toolchain.gccarmemb | ||
Makefile.toolchain.issm | ||
Makefile.toolchain.riscv32 | ||
Makefile.toolchain.xcc | ||
Makefile.toolchain.xtools | ||
Makefile.toolchain.zephyr | ||
Makefile.xt-run | ||
Makefile.xtsc-run | ||
mkmakefile | ||
mksysmap | ||
process_gperf.py | ||
qemu-machine-hack.py | ||
requirements.txt | ||
sanitycheck | ||
spelling.txt | ||
tags.sh | ||
timestamp | ||
uncrustify.cfg | ||
vercomp | ||
waitpid |