Konstantin K. Oblaukhov 5 лет назад
Родитель
Сommit
905349f189
4 измененных файлов с 24 добавлено и 2 удалено
  1. 1 1
      cmake/FindCMSIS.cmake
  2. 1 0
      cmake/stm32/common.cmake
  3. 21 0
      cmake/stm32/g0.cmake
  4. 1 1
      tests/cmsis/CMakeLists.txt

+ 1 - 1
cmake/FindCMSIS.cmake

@@ -1,5 +1,5 @@
 if(NOT CMSIS_FIND_COMPONENTS)
-    set(CMSIS_FIND_COMPONENTS STM32F0 STM32F1 STM32F4)
+    set(CMSIS_FIND_COMPONENTS STM32F0 STM32G0 STM32F1 STM32F4)
 endif()
 
 include(stm32/devices)

+ 1 - 0
cmake/stm32/common.cmake

@@ -131,6 +131,7 @@ endif()
 
 include(stm32/utilities)
 include(stm32/f0)
+include(stm32/g0)
 include(stm32/f1)
 include(stm32/f4)
 

+ 21 - 0
cmake/stm32/g0.cmake

@@ -0,0 +1,21 @@
+set(STM32_G0_TYPES 
+    G030xx G031xx G041xx G070xx G071xx G081xx   
+)
+set(STM32_G0_TYPE_MATCH 
+    "G030.." "G031.." "G041.." "G070.." "G071.." "G081.." 
+)
+set(STM32_G0_RAM_SIZES 
+     8K  8K  8K 36K 36K 36K
+)
+set(STM32_G0_CCRAM_SIZES 
+     0K  0K  0K  0K  0K  0K
+)
+
+stm32_util_create_family_targets(G0)
+
+target_compile_options(STM32::G0 INTERFACE 
+    -mcpu=cortex-m0plus
+)
+target_link_options(STM32::G0 INTERFACE 
+    -mcpu=cortex-m0plus
+)

+ 1 - 1
tests/cmsis/CMakeLists.txt

@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.8)
 set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/stm32_gcc.cmake)
 
 if(NOT TEST_FAMILIES)
-    set(TEST_FAMILIES F0 F1 F4)
+    set(TEST_FAMILIES F0 G0 F1 F4)
 endif()
 
 project(cmsis-test C ASM)