From fdd2e93f7edeb514e31c7a473a71bcdcffeff215 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Nov 2019 18:25:34 +1100 Subject: [PATCH] HAL_ChibiOS: disable debug port on f103 to save memory --- libraries/AP_HAL_ChibiOS/hwdef/f103-GPS/hwdef.dat | 4 ++++ .../AP_HAL_ChibiOS/hwdef/f103-periph/hwdef.dat | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/f103-GPS/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/f103-GPS/hwdef.dat index 5f45c4e7d8..0a59e0ff45 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/f103-GPS/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/f103-GPS/hwdef.dat @@ -12,6 +12,10 @@ COMPASS RM3100 SPI:rm3100 false ROTATION_NONE # and support all external compass types define HAL_PROBE_EXTERNAL_I2C_COMPASSES +# increase TX size for RTCM +undef HAL_UART_MIN_TX_SIZE +define HAL_UART_MIN_TX_SIZE 256 + # GPS+MAG define HAL_PERIPH_ENABLE_GPS define HAL_PERIPH_ENABLE_MAG diff --git a/libraries/AP_HAL_ChibiOS/hwdef/f103-periph/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/f103-periph/hwdef.dat index 6fc2a1fef1..8593eaaf8b 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/f103-periph/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/f103-periph/hwdef.dat @@ -31,7 +31,7 @@ FLASH_SIZE_KB 128 STM32_VDD 330U # order of UARTs -UART_ORDER USART2 USART1 +UART_ORDER EMPTY USART1 # a LED to flash PA4 LED OUTPUT LOW @@ -40,9 +40,9 @@ PA4 LED OUTPUT LOW PA9 USART1_TX USART1 SPEED_HIGH NODMA PA10 USART1_RX USART1 SPEED_HIGH NODMA -# USART2 for debug -PA2 USART2_TX USART2 SPEED_HIGH NODMA -PA3 USART2_RX USART2 SPEED_HIGH NODMA +# USART2 for debug (disabled) +# PA2 USART2_TX USART2 SPEED_HIGH NODMA +# PA3 USART2_RX USART2 SPEED_HIGH NODMA define HAL_UART_NODMA @@ -97,10 +97,13 @@ PA12 CAN_TX CAN define HAL_USE_CAN TRUE define STM32_CAN_USE_CAN1 TRUE +# reduce memory overheads +define HAL_CAN_POOL_SIZE 2500 + define HAL_USE_I2C TRUE define STM32_I2C_USE_I2C1 TRUE -define HAL_UART_MIN_TX_SIZE 256 +define HAL_UART_MIN_TX_SIZE 128 define HAL_UART_MIN_RX_SIZE 128 define HAL_UART_STACK_SIZE 256