waf: add flags for F1 controller support and more debug features
This commit is contained in:
parent
4608e90913
commit
6fee72b0c0
@ -307,6 +307,7 @@ class chibios(Board):
|
||||
def configure_env(self, cfg, env):
|
||||
super(chibios, self).configure_env(cfg, env)
|
||||
|
||||
cfg.load('chibios')
|
||||
env.BOARD = self.name
|
||||
|
||||
env.DEFINES.update(
|
||||
@ -321,7 +322,6 @@ class chibios(Board):
|
||||
|
||||
# make board name available for USB IDs
|
||||
env.CHIBIOS_BOARD_NAME = 'HAL_BOARD_NAME="%s"' % self.name
|
||||
|
||||
env.CXXFLAGS += [
|
||||
'-Wlogical-op',
|
||||
'-Wframe-larger-than=1300',
|
||||
@ -364,12 +364,13 @@ class chibios(Board):
|
||||
'-fno-builtin-vprintf',
|
||||
'-fno-builtin-vfprintf',
|
||||
'-fno-builtin-puts',
|
||||
'-mcpu=cortex-m4',
|
||||
'-mno-thumb-interwork',
|
||||
'-mthumb',
|
||||
'-mfpu=fpv4-sp-d16',
|
||||
'-mfloat-abi=hard',
|
||||
'-DCHIBIOS_BOARD_NAME="%s"' % self.name,
|
||||
'--specs=nano.specs',
|
||||
'-specs=nosys.specs'
|
||||
]
|
||||
|
||||
if sys.platform == 'cygwin':
|
||||
@ -377,9 +378,7 @@ class chibios(Board):
|
||||
|
||||
bldnode = cfg.bldnode.make_node(self.name)
|
||||
env.BUILDROOT = bldnode.make_node('').abspath()
|
||||
|
||||
env.LINKFLAGS = [
|
||||
'-mcpu=cortex-m4',
|
||||
'-Os',
|
||||
'-fomit-frame-pointer',
|
||||
'-falign-functions=16',
|
||||
@ -395,22 +394,23 @@ class chibios(Board):
|
||||
'-u_printf_float',
|
||||
'-fno-common',
|
||||
'-nostartfiles',
|
||||
'-mfloat-abi=hard',
|
||||
'-mfpu=fpv4-sp-d16',
|
||||
'-mno-thumb-interwork',
|
||||
'-mthumb',
|
||||
'-specs=nano.specs',
|
||||
'-specs=nosys.specs',
|
||||
'-L%s' % env.BUILDROOT,
|
||||
'-L%s' % cfg.srcnode.make_node('modules/ChibiOS/os/common/startup/ARMCMx/compilers/GCC/ld/').abspath(),
|
||||
'-L%s' % cfg.srcnode.make_node('libraries/AP_HAL_ChibiOS/hwdef/common/').abspath(),
|
||||
'-Wl,--gc-sections,--no-warn-mismatch,--library-path=/ld,--script=ldscript.ld,--defsym=__process_stack_size__=0x400,--defsym=__main_stack_size__=0x400',
|
||||
]
|
||||
|
||||
if cfg.env.DEBUG:
|
||||
env.CFLAGS += [
|
||||
'-g',
|
||||
'-gdwarf-4',
|
||||
'-g3',
|
||||
]
|
||||
env.LINKFLAGS += [
|
||||
'-g',
|
||||
'-gdwarf-4',
|
||||
'-g3',
|
||||
]
|
||||
|
||||
if cfg.env.ENABLE_ASSERTS:
|
||||
|
@ -337,4 +337,4 @@ def build(bld):
|
||||
bld.env.LIBPATH += ['modules/ChibiOS/']
|
||||
wraplist = ['strerror_r', 'fclose', 'freopen', 'fread']
|
||||
for w in wraplist:
|
||||
bld.env.LINKFLAGS += ['-Wl,--wrap,%s' % w]
|
||||
bld.env.LINKFLAGS += ['-Wl,--wrap,%s' % w]
|
Loading…
Reference in New Issue
Block a user