diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat index bed7aa1f5d..fd85c55423 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat @@ -6,7 +6,7 @@ include ../fmuv3/hwdef.dat define HAL_CHIBIOS_ARCH_CUBEBLACK 1 -env OPTIMIZE -O3 +env OPTIMIZE -O2 # USB setup USB_VENDOR 0x2DAE # ONLY FOR USE BY HEX! NOBODY ELSE diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat index 202bbce4fa..f1a87f994e 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat @@ -19,7 +19,7 @@ APJ_BOARD_ID 140 FLASH_SIZE_KB 2048 # with 2M flash we can afford to optimize for speed -env OPTIMIZE -O3 +env OPTIMIZE -O2 FLASH_RESERVE_START_KB 128 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat index 764dfee053..a662282aee 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat @@ -5,7 +5,7 @@ include ../fmuv3/hwdef.dat -env OPTIMIZE -O3 +env OPTIMIZE -O2 SPIDEV icm20948_ext SPI4 DEVID1 MPU_EXT_CS MODE3 4*MHZ 8*MHZ SPIDEV icm20602_ext SPI4 DEVID3 GYRO_EXT_CS MODE3 4*MHZ 8*MHZ diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat index 88a2177109..e96c666bed 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat @@ -33,7 +33,8 @@ define STM32_PLLQ_VALUE 9 APJ_BOARD_ID 120 # with 2M flash we can afford to optimize for speed -env OPTIMIZE -O3 +env OPTIMIZE -O2 + # on some boards you will need to also set the various PLL values. See # the defaults in common/mcuconf.h, and use the define mechanism # explained later in this file to override values suitable for your diff --git a/libraries/AP_HAL_ChibiOS/hwdef/DrotekP3Pro/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/DrotekP3Pro/hwdef.dat index f023acaec9..8f28cb65d0 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/DrotekP3Pro/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/DrotekP3Pro/hwdef.dat @@ -23,7 +23,7 @@ STM32_ST_USE_TIMER 5 # flash size FLASH_SIZE_KB 2048 -env OPTIMIZE -O3 +env OPTIMIZE -O2 # serial port for stdout, disabled so console is on USB #STDOUT_SERIAL SD7 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat index c8b148a233..6f7c2a91e7 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat @@ -19,7 +19,7 @@ APJ_BOARD_ID 139 FLASH_SIZE_KB 2048 # with 2M flash we can afford to optimize for speed -env OPTIMIZE -O3 +env OPTIMIZE -O2 # 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 ce2460f707..99a179efd3 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/fmuv4/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/fmuv4/hwdef.dat @@ -21,7 +21,7 @@ STM32_ST_USE_TIMER 5 # flash size FLASH_SIZE_KB 2048 -env OPTIMIZE -O3 +env OPTIMIZE -O2 # serial port for stdout disabled, use USB console # STDOUT_SERIAL SD7 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat index 562991ed34..c6892fe10c 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat @@ -30,7 +30,7 @@ STM32_VDD 330U # flash size FLASH_SIZE_KB 2048 -env OPTIMIZE -O3 +env OPTIMIZE -O2 # order of UARTs (and USB) UART_ORDER OTG1 USART1 USART2 USART3 UART4 USART6 UART7 OTG2 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/mRoControlZeroF7/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/mRoControlZeroF7/hwdef.dat index 54d5a77a4f..df1abdfc59 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/mRoControlZeroF7/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/mRoControlZeroF7/hwdef.dat @@ -23,7 +23,7 @@ STM32_VDD 330U FLASH_SIZE_KB 2048 # with 2M flash we can afford to optimize for speed -env OPTIMIZE -O3 +env OPTIMIZE -O2 # start on 4th sector (1st sector for bootloader, 2 for extra storage) FLASH_RESERVE_START_KB 96 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/mRoX21-777/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/mRoX21-777/hwdef.dat index 199004a73b..ac064ec191 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/mRoX21-777/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/mRoX21-777/hwdef.dat @@ -62,7 +62,7 @@ STM32_ST_USE_TIMER 5 # flash size FLASH_SIZE_KB 2048 -env OPTIMIZE -O3 +env OPTIMIZE -O2 # now define which UART is used for printf(). We rarely use printf() # in ChibiOS, so this is really only for debugging very early startup diff --git a/libraries/AP_HAL_ChibiOS/hwdef/mRoX21/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/mRoX21/hwdef.dat index bee6c4c80a..096de31542 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/mRoX21/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/mRoX21/hwdef.dat @@ -3,6 +3,6 @@ include ../fmuv3/hwdef.dat -env OPTIMIZE -O3 +env OPTIMIZE -O2 define BOARD_TYPE_DEFAULT 20