Hi
I'm trying to create a release build but I have the problem that I can't seem to get zephyr to build without debug data included. I would really appriciate some help with this as I can't seem to figure it out.
I'm sure there must be some config option I'm setting wrong somewhere that is causing them to be included, but I can't figure which...
I have tried setting the compile flags explicitly in CMakeList.txt, but that just caused them to be prepended to the C_FLAGS variable below.
I've set the following config options explicitly:
CONFIG_SPEED_OPTIMIZATIONS=y
CONFIG_COMPILER_OPT="-Wall"
From what I can tell all other relevant options are 'n' selected by default, e.g CONFIG_DEBUG
Despite this the '-g' flag is included when compiling, causing our image size to be too large.
E.g
from ./build_output/zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/flags.make
C_FLAGS = -O2 -imacros [censored]/build_output/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros /home/wj/.local/opt/ncs/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/lll/sigma/projects/holmbergs/git/buckle=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/lll/.local/opt/ncs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/lll/.local/opt/ncs=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc