@@ -14,7 +14,7 @@ SRCREV = "673d014f3861ad81cc5ab06d2884a314a610799b"
PROVIDES += "virtual/control-processor-firmware"
-SCP_BUILD_RELEASE ?= "1"
+CMAKE_BUILD_TYPE ?= "RelWithDebInfo"
SCP_PLATFORM ?= "invalid"
SCP_COMPILER ?= "arm-none-eabi"
SCP_LOG_LEVEL ?= "WARN"
@@ -29,8 +29,6 @@ DEPENDS = "virtual/arm-none-eabi-gcc-native \
# For now we only build with GCC, so stop meta-clang trying to get involved
TOOLCHAIN = "gcc"
-SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'Release', 'Debug', d)}"
-
inherit deploy
B = "${WORKDIR}/build"
@@ -39,13 +37,16 @@ S = "${WORKDIR}/git"
# Allow platform specific copying of only scp or both scp & mcp, default to both
FW_TARGETS ?= "scp mcp"
FW_INSTALL ?= "ramfw romfw"
+
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE ?= "invalid"
+export CFLAGS = "${DEBUG_PREFIX_MAP}"
+export ASMFLAGS = "${DEBUG_PREFIX_MAP}"
+
LDFLAGS[unexport] = "1"
-CFLAGS[unexport] = "1"
-EXTRA_OECMAKE = "-D CMAKE_BUILD_TYPE=${SCP_BUILD_STR} \
+EXTRA_OECMAKE = "-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-D SCP_LOG_LEVEL=${SCP_LOG_LEVEL} \
-D SCP_PLATFORM_FEATURE_SET=${SCP_PLATFORM_FEATURE_SET} \
-D DISABLE_CPPCHECK=1 \
Instead of a SCP_BUILD_RELEASE boolean, add CMAKE_BUILD_TYPE and default to RelWithDebInfo which gives us release (optimised) builds with debug symbols in the matching .elf files. To ensure that buildpaths don't leak into the debug symbols, pass the debug prefix maps via CFLAGS and ASMFLAGS. Signed-off-by: Ross Burton <ross.burton@arm.com> --- .../recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)