From 9a4bdb864b910e3f13b2008a7af0824e50106a6c Mon Sep 17 00:00:00 2001 From: Janco <35377494+jancotipsarevic@users.noreply.github.com> Date: Wed, 12 Apr 2023 04:58:57 +0200 Subject: [PATCH] Add STM32F103xD and xG entries in CMakeLists.txt (#155) * Add STM32F103xD, STM32F103xG series and fix STM32F103xE startup file * Add system_clock.c file for STM32F103xD series * Add STM32F103xD and STM32F103xG to targets.json * Update CMakeLists.txt to add STM32F103xD and STM32F103xG series add_subdirectory(TARGET_STM32F103xD EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F103xG EXCLUDE_FROM_ALL) * Add remaps for STM32F1 timers as in original mbed-os Added extra remaps for timers 9 to 14 for STM32F1 needed in STM32F103xG series #define AFIO_REMAP_TIM9_ENABLE 17 #define AFIO_REMAP_TIM10_ENABLE 18 #define AFIO_REMAP_TIM11_ENABLE 19 #define AFIO_REMAP_TIM13_ENABLE 20 #define AFIO_REMAP_TIM14_ENABLE 21 --------- Co-authored-by: Perez --- targets/TARGET_STM/PeripheralPins.h | 5 +++++ targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/targets/TARGET_STM/PeripheralPins.h b/targets/TARGET_STM/PeripheralPins.h index 56303f8bab..d74f6094b6 100644 --- a/targets/TARGET_STM/PeripheralPins.h +++ b/targets/TARGET_STM/PeripheralPins.h @@ -52,6 +52,11 @@ #define AFIO_REMAP_TIM2_PARTIAL_1 14 #define AFIO_REMAP_TIM2_PARTIAL_2 15 #define AFIO_REMAP_TIM4_ENABLE 16 +#define AFIO_REMAP_TIM9_ENABLE 17 +#define AFIO_REMAP_TIM10_ENABLE 18 +#define AFIO_REMAP_TIM11_ENABLE 19 +#define AFIO_REMAP_TIM13_ENABLE 20 +#define AFIO_REMAP_TIM14_ENABLE 21 #endif diff --git a/targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt index 19c5773984..e8337e0c69 100644 --- a/targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt @@ -4,7 +4,9 @@ add_subdirectory(TARGET_STM32F103x8 EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F103xB EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F103xC EXCLUDE_FROM_ALL) +add_subdirectory(TARGET_STM32F103xD EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F103xE EXCLUDE_FROM_ALL) +add_subdirectory(TARGET_STM32F103xG EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_library(mbed-stm32f1 INTERFACE)