fb: cfb: add font existence check at link time

Inject assert statement to linker script to check font existence.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
TOKITA Hiroshi 2023-03-04 11:47:55 +09:00 committed by Fabio Baltieri
parent b42331476d
commit 916b5ce799
2 changed files with 3 additions and 0 deletions

View file

@ -3,3 +3,5 @@
zephyr_sources_ifdef(CONFIG_CHARACTER_FRAMEBUFFER cfb.c)
zephyr_sources_ifdef(CONFIG_CHARACTER_FRAMEBUFFER_USE_DEFAULT_FONTS cfb_fonts.c)
zephyr_sources_ifdef(CONFIG_CHARACTER_FRAMEBUFFER_SHELL cfb_shell.c)
zephyr_linker_sources_ifdef(CONFIG_CHARACTER_FRAMEBUFFER DATA_SECTIONS check_cfb_fonts.ld)

View file

@ -0,0 +1 @@
ASSERT(SIZEOF(cfb_font_area) != 0, "cfb_font not defined.")