HAL_ChibiOS: fixed L4 mcu type detection
This commit is contained in:
parent
df5b2f7911
commit
3f33457404
@ -762,21 +762,14 @@ def get_flash_pages_sizes():
|
||||
return [ 128 ] * (get_config('FLASH_SIZE_KB', type=int)//128)
|
||||
elif mcu_series.startswith('STM32F100') or mcu_series.startswith('STM32F103'):
|
||||
return [ 1 ] * get_config('FLASH_SIZE_KB', type=int)
|
||||
elif mcu_series.startswith('STM32L4') and mcu_type.startswith('STM32L4R'):
|
||||
# STM32L4PLUS
|
||||
return [ 4 ] * (get_config('FLASH_SIZE_KB', type=int)//4)
|
||||
elif (mcu_series.startswith('STM32F105') or
|
||||
mcu_series.startswith('STM32F3') or
|
||||
mcu_series.startswith('STM32G4')):
|
||||
mcu_series.startswith('STM32G4') or
|
||||
mcu_series.startswith('STM32L4')):
|
||||
return [ 2 ] * (get_config('FLASH_SIZE_KB', type=int)//2)
|
||||
elif mcu_series.startswith('STM32L4'):
|
||||
defines = get_mcu_config('DEFINES', False)
|
||||
if defines is not None:
|
||||
if 'STM32L4PLUS' in defines.keys():
|
||||
# STM32L4PLUS
|
||||
return [ 4 ] * (get_config('FLASH_SIZE_KB', type=int)//4)
|
||||
else:
|
||||
# STM32L4
|
||||
return [ 2 ] * (get_config('FLASH_SIZE_KB', type=int)//2)
|
||||
else:
|
||||
return [ 2 ] * (get_config('FLASH_SIZE_KB', type=int)//2)
|
||||
else:
|
||||
raise Exception("Unsupported flash size MCU %s" % mcu_series)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user