waf: add defines for use in CrashCatcher Flash dump

This commit is contained in:
bugobliterator 2021-10-23 11:49:52 +05:30 committed by Andrew Tridgell
parent bd08d2d257
commit eee7e6cadf
2 changed files with 2 additions and 1 deletions

View File

@ -680,6 +680,7 @@ class chibios(Board):
# make board name available for USB IDs
env.CHIBIOS_BOARD_NAME = 'HAL_BOARD_NAME="%s"' % self.name
env.HAL_MAX_STACK_FRAME_SIZE = 'HAL_MAX_STACK_FRAME_SIZE=%d' % 1300 # set per Wframe-larger-than, ensure its same
env.CFLAGS += cfg.env.CPU_FLAGS + [
'-Wlogical-op',
'-Wframe-larger-than=1300',

View File

@ -531,7 +531,7 @@ def build(bld):
common_src += [bld.bldnode.find_or_declare('ap_romfs_embedded.h')]
ch_task = bld(
# build libch.a from ChibiOS sources and hwdef.h
rule="BUILDDIR='${BUILDDIR_REL}' CRASHCATCHER='${CC_ROOT_REL}' CHIBIOS='${CH_ROOT_REL}' AP_HAL=${AP_HAL_REL} ${CHIBIOS_BUILD_FLAGS} ${CHIBIOS_BOARD_NAME} '${MAKE}' -j%u lib -f '${BOARD_MK}'" % bld.options.jobs,
rule="BUILDDIR='${BUILDDIR_REL}' CRASHCATCHER='${CC_ROOT_REL}' CHIBIOS='${CH_ROOT_REL}' AP_HAL=${AP_HAL_REL} ${CHIBIOS_BUILD_FLAGS} ${CHIBIOS_BOARD_NAME} ${HAL_MAX_STACK_FRAME_SIZE} '${MAKE}' -j%u lib -f '${BOARD_MK}'" % bld.options.jobs,
group='dynamic_sources',
source=common_src,
target=[bld.bldnode.find_or_declare('modules/ChibiOS/libch.a'), bld.bldnode.find_or_declare('modules/ChibiOS/libcc.a')]