Skip to content

Commit

Permalink
AP_HAL_ChibiOS: avoid use of global signed_fw in ChibiOSHWdef object
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Sep 3, 2024
1 parent 53b7262 commit 40e367e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ def write_mcu_config(self, f):
if flash_size == 0:
flash_size = self.get_config('FLASH_SIZE_KB', type=int)
flash_length = min(flash_size, self.get_config('FLASH_BOOTLOADER_LOAD_KB', type=int))
if not self.env_vars['EXT_FLASH_SIZE_MB'] and not args.signed_fw and flash_length < 128:
if not self.env_vars['EXT_FLASH_SIZE_MB'] and not self.signed_fw and flash_length < 128:
f.write('''
#ifndef CH_CFG_USE_MEMCORE
#define CH_CFG_USE_MEMCORE FALSE
Expand Down Expand Up @@ -1472,7 +1472,7 @@ def write_USB_config(self, f):
if self.is_bootloader_fw():
default_product += "-BL"
product_string = self.get_config("USB_STRING_PRODUCT", default="\"%s\"" % default_product)
if self.is_bootloader_fw() and args.signed_fw:
if self.is_bootloader_fw() and self.signed_fw:
product_string = product_string.replace("-BL", "-Secure-BL-v10")
f.write('#define HAL_USB_STRING_PRODUCT %s\n' % product_string)

Expand Down Expand Up @@ -2610,7 +2610,7 @@ def write_hwdef_header(self, outfilename):
''')

if args.signed_fw:
if self.signed_fw:
f.write('''
#define AP_SIGNED_FIRMWARE 1
''')
Expand Down

0 comments on commit 40e367e

Please sign in to comment.