mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
HAL_ChibiOS: allow for a defaults.parm file in hwdef directory
this keeps defaults with the board, where that is appropriate
This commit is contained in:
parent
6e5cbc7c3d
commit
a9edbb6b2d
@ -966,6 +966,13 @@ def build_peripheral_list():
|
||||
|
||||
def write_env_py(filename):
|
||||
'''write out env.py for environment variables to control the build process'''
|
||||
|
||||
# see if board has a defaults.parm file
|
||||
defaults_filename = os.path.join(os.path.dirname(args.hwdef), 'defaults.parm')
|
||||
if os.path.exists(defaults_filename):
|
||||
print("Adding defaults.parm")
|
||||
env_vars['DEFAULT_PARAMETERS'] = os.path.abspath(defaults_filename)
|
||||
|
||||
# CHIBIOS_BUILD_FLAGS is passed to the ChibiOS makefile
|
||||
env_vars['CHIBIOS_BUILD_FLAGS'] = ' '.join(build_flags)
|
||||
pickle.dump(env_vars, open(filename, "wb"))
|
||||
|
Loading…
Reference in New Issue
Block a user