diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F732xx.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F732xx.py index 90296e9f2b..f510de7bd9 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F732xx.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F732xx.py @@ -12,9 +12,6 @@ build = { # MCU parameters mcu = { - # location of MCU serial number - 'UDID_START' : 0x1FF07A10, - # ram map, as list of (address, size-kb, flags) # flags of 1 means DMA-capable # flags of 2 means faster memory for CPU intensive work diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 24a0f9a294..49f65919cd 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -779,7 +779,11 @@ def write_mcu_config(f): f.write('#define HAL_RAM_RESERVE_START 0x%08x\n' % ram_reserve_start) f.write('\n// CPU serial number (12 bytes)\n') - f.write('#define UDID_START 0x%08x\n\n' % get_mcu_config('UDID_START', True)) + udid_start = get_mcu_config('UDID_START') + if udid_start is None: + f.write('#define UDID_START UID_BASE\n\n') + else: + f.write('#define UDID_START 0x%08x\n\n' % udid_start) f.write('\n// APJ board ID (for bootloaders)\n') f.write('#define APJ_BOARD_ID %s\n' % get_config('APJ_BOARD_ID'))