diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeH7/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeH7/hwdef.dat index e1366716c9..b7181b20e9 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeH7/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeH7/hwdef.dat @@ -12,6 +12,9 @@ APJ_BOARD_ID 139 FLASH_SIZE_KB 2048 +# with 2M flash we can afford to optimize for speed +env OPTIMIZE -O3 + FLASH_RESERVE_START_KB 128 # board voltage diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk4Pro/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk4Pro/hwdef.dat index 9946809aa5..83cd8c4b49 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk4Pro/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk4Pro/hwdef.dat @@ -12,6 +12,9 @@ APJ_BOARD_ID 139 FLASH_SIZE_KB 2048 +# with 2M flash we can afford to optimize for speed +env OPTIMIZE -O3 + # bootloader takes first sector FLASH_RESERVE_START_KB 128 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/fmuv4/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/fmuv4/hwdef.dat index 94151a010a..7ece626539 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/fmuv4/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/fmuv4/hwdef.dat @@ -21,6 +21,8 @@ STM32_ST_USE_TIMER 5 # flash size FLASH_SIZE_KB 2048 +env OPTIMIZE -O3 + # serial port for stdout disabled, use USB console # STDOUT_SERIAL SD7 # STDOUT_BAUDRATE 57600 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat index 28cecd08f7..2d7a7ff76b 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat @@ -30,6 +30,8 @@ STM32_VDD 330U # flash size FLASH_SIZE_KB 2048 +env OPTIMIZE -O3 + # order of UARTs (and USB) UART_ORDER OTG1 USART1 USART2 USART3 UART4 USART6 UART7