Skip to content

Commit

Permalink
Tools: specify location of nosys and nano specs for ccache to look at
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Oct 16, 2024
1 parent 775fab5 commit eed0f53
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,14 @@ def configure_env(self, cfg, env):
'AP_HAL_ChibiOS',
]

# get location of nano.specs and nosys.specs
cfg.msg("Toolchain Location", cfg.env.AR)
# location of nosys.specs relative to the toolchain
env.NOSYS_SPECS = os.path.dirname(cfg.env.AR[0]) + '/../arm-none-eabi/lib/nosys.specs'
cfg.msg("ARM GCC nosys.specs", env.NOSYS_SPECS)
env.NANO_SPECS = os.path.dirname(cfg.env.AR[0]) + '/../arm-none-eabi/lib/nano.specs'
cfg.msg("ARM GCC nano.specs", env.NANO_SPECS)

# 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
Expand Down Expand Up @@ -1139,8 +1147,8 @@ def configure_env(self, cfg, env):
'-fno-builtin-puts',
'-mno-thumb-interwork',
'-mthumb',
'--specs=nano.specs',
'--specs=nosys.specs',
'--specs=%s' % env.NANO_SPECS,
'--specs=%s' % env.NOSYS_SPECS,
'-D__USE_CMSIS',
'-Werror=deprecated-declarations',
'-DNDEBUG=1'
Expand Down Expand Up @@ -1183,8 +1191,8 @@ def configure_env(self, cfg, env):
'-nostartfiles',
'-mno-thumb-interwork',
'-mthumb',
'--specs=nano.specs',
'--specs=nosys.specs',
'--specs=%s' % env.NANO_SPECS,
'--specs=%s' % env.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(),
Expand Down

0 comments on commit eed0f53

Please sign in to comment.