HAL_ChibiOS: fixed F765 build

This commit is contained in:
Andrew Tridgell 2019-02-02 21:37:48 +11:00
parent ceb0ec70f9
commit 1b06b0f41c
1 changed files with 4 additions and 1 deletions

View File

@ -483,7 +483,10 @@ def write_mcu_config(f):
'''write MCU config defines'''
f.write('// MCU type (ChibiOS define)\n')
f.write('#define %s_MCUCONF\n' % get_config('MCU'))
f.write('#define %s\n\n' % get_config('MCU', 1))
mcu_subtype = get_config('MCU', 1)
if mcu_subtype.endswith('xx'):
f.write('#define %s_MCUCONF\n\n' % mcu_subtype[:-2])
f.write('#define %s\n\n' % mcu_subtype)
f.write('// crystal frequency\n')
f.write('#define STM32_HSECLK %sU\n\n' % get_config('OSCILLATOR_HZ'))
f.write('// UART used for stdout (printf)\n')