From 8dcb973dad9c552e78fa01d203d21d0aa8800784 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Wed, 19 Aug 2020 23:39:43 +0530 Subject: [PATCH] HAL_ChibiOS: fix SWD config in f3 boards --- libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef-bl.dat | 7 ++++--- libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef.dat | 4 ++++ libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F303xC.py | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef-bl.dat index 456686e5d1690..9a636248c3a01 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef-bl.dat @@ -45,9 +45,6 @@ define STM32_SERIAL_USE_USART1 TRUE define STM32_SERIAL_USE_USART2 TRUE define STM32_SERIAL_USE_USART3 FALSE -PA13 SWDIO-JTMS SWD -PA14 SWCLK-JTCK SWD - define HAL_NO_GPIO_IRQ define CH_CFG_ST_TIMEDELTA 0 #define CH_CFG_USE_DYNAMIC FALSE @@ -79,6 +76,10 @@ PA12 CAN_TX CAN define HAL_USE_CAN TRUE define STM32_CAN_USE_CAN1 TRUE +# debugger support +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + # make bl baudrate match debug baudrate for easier debugging define BOOTLOADER_BAUDRATE 57600 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef.dat index 6482fed0db61e..d832abba613b9 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/f303-periph/hwdef.dat @@ -90,6 +90,10 @@ PA12 CAN_TX CAN define HAL_USE_CAN TRUE define STM32_CAN_USE_CAN1 TRUE +# debugger support +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + define HAL_USE_I2C TRUE define STM32_I2C_USE_I2C1 TRUE diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F303xC.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F303xC.py index 2cc82581df505..ec02bd8955bdc 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F303xC.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F303xC.py @@ -125,14 +125,14 @@ "PA12:USB_DP" : 14, "PA13:EVENTOUT" : 15, "PA13:IR_OUT" : 5, - "PA13:SWDIO-JTMS" : 0, + "PA13:JTMS-SWDIO" : 0, "PA13:TIM16_CH1N" : 1, "PA13:TIM4_CH3" : 10, "PA13:TSC_G4_IO3" : 3, "PA13:USART3_CTS" : 7, "PA14:EVENTOUT" : 15, "PA14:I2C1_SDA" : 4, - "PA14:SWCLK-JTCK" : 0, + "PA14:JTCK-SWCLK" : 0, "PA14:TIM1_BKIN" : 6, "PA14:TIM8_CH2" : 5, "PA14:TSC_G4_IO4" : 3,