Explorar el Código

Added HAL support for MP1

Julien JEMINE hace 3 años
padre
commit
18555217bd
Se han modificado 3 ficheros con 3 adiciones y 1 borrados
  1. 1 0
      cmake/FindHAL.cmake
  2. 1 1
      cmake/stm32/mp1.cmake
  3. 1 0
      tests/hal/CMakeLists.txt

+ 1 - 0
cmake/FindHAL.cmake

@@ -378,6 +378,7 @@ foreach(COMP ${HAL_FIND_COMPONENTS_FAMILIES})
                                                     STM32::${FAMILY}${CORE_C} 
                                                     CMSIS::STM32::${FAMILY}${CORE_C})
         target_include_directories(HAL::STM32::${FAMILY}${CORE_C} INTERFACE "${HAL_${FAMILY}${CORE_U}_INCLUDE}")
+        target_compile_definitions(HAL::STM32::${FAMILY}${CORE_C} INTERFACE USE_HAL_DRIVER)
         target_sources(HAL::STM32::${FAMILY}${CORE_C} INTERFACE "${HAL_${FAMILY}${CORE_U}_SOURCE}")
     endif()
     

+ 1 - 1
cmake/stm32/mp1.cmake

@@ -22,5 +22,5 @@ stm32_util_create_family_targets(MP1 M4)
 
 target_compile_options(STM32::MP1::M4 INTERFACE -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard)
 target_link_options(STM32::MP1::M4 INTERFACE -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard)
-target_compile_definitions(STM32::MP1::M4 INTERFACE -DCORE_CM4)
+target_compile_definitions(STM32::MP1::M4 INTERFACE CORE_CM4)
 

+ 1 - 0
tests/hal/CMakeLists.txt

@@ -31,6 +31,7 @@ foreach(FAMILY ${TEST_FAMILIES})
     endif()
     
     add_executable(hal-test-${FAMILY} ${SOURCES})
+    target_compile_definitions(hal-test-${FAMILY} PRIVATE USE_FULL_LL_DRIVER)
     
     foreach(DRIVER ${HAL_DRIVERS_${FAMILY}})
         string(TOUPPER ${DRIVER} DRIVER)