diff --git a/examples/blinky/CMakeLists.txt b/examples/blinky/CMakeLists.txt index 2924c91a..edaf66dd 100644 --- a/examples/blinky/CMakeLists.txt +++ b/examples/blinky/CMakeLists.txt @@ -19,7 +19,7 @@ endif() set(CMAKE_INCLUDE_CURRENT_DIR TRUE) -set(HAL_COMP_LIST RCC GPIO CORTEX) +set(HAL_COMP_LIST RCC GPIO CORTEX FLASH) set(CMSIS_COMP_LIST "") if(BLINKY_F4_EXAMPLE) @@ -55,6 +55,7 @@ if(BLINKY_F4_EXAMPLE) target_link_libraries(stm32-blinky-f4 HAL::STM32::F4::RCC HAL::STM32::F4::GPIO + HAL::STM32::F4::FLASH HAL::STM32::F4::CORTEX CMSIS::STM32::F407VG STM32::NoSys @@ -68,6 +69,7 @@ if(BLINKY_F1_EXAMPLE) target_link_libraries(stm32-blinky-f1 HAL::STM32::F1::RCC HAL::STM32::F1::GPIO + HAL::STM32::F1::FLASH HAL::STM32::F1::CORTEX CMSIS::STM32::F100RB STM32::NoSys @@ -81,6 +83,7 @@ if(BLINKY_L0_EXAMPLE) target_link_libraries(stm32-blinky-l0 HAL::STM32::L0::RCC HAL::STM32::L0::GPIO + HAL::STM32::L0::FLASH HAL::STM32::L0::CORTEX CMSIS::STM32::L053C8 STM32::NoSys diff --git a/examples/blinky/stm32f1xx_hal_conf.h b/examples/blinky/stm32f1xx_hal_conf.h index 1d0488c3..2e69f9a7 100755 --- a/examples/blinky/stm32f1xx_hal_conf.h +++ b/examples/blinky/stm32f1xx_hal_conf.h @@ -33,20 +33,25 @@ extern "C" { /* ########################## Module Selection ############################## */ /** * @brief This is the list of modules to be used in the HAL driver + * + * `stm32-cmake` automatically defines the `HAL_*_MODULE_ENABLED` variables + * when a driver is added to a project using `target_link_libraries`, so they + * don't need to be defined here + * */ #define HAL_MODULE_ENABLED // #define HAL_ADC_MODULE_ENABLED // #define HAL_CAN_MODULE_ENABLED // #define HAL_CAN_LEGACY_MODULE_ENABLED // #define HAL_CEC_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED +// #define HAL_CORTEX_MODULE_ENABLED // #define HAL_CRC_MODULE_ENABLED // #define HAL_DAC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED +// #define HAL_DMA_MODULE_ENABLED // #define HAL_ETH_MODULE_ENABLED // #define HAL_EXTI_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED +// #define HAL_FLASH_MODULE_ENABLED +// #define HAL_GPIO_MODULE_ENABLED // #define HAL_HCD_MODULE_ENABLED // #define HAL_I2C_MODULE_ENABLED // #define HAL_I2S_MODULE_ENABLED @@ -57,7 +62,7 @@ extern "C" { // #define HAL_PCCARD_MODULE_ENABLED // #define HAL_PCD_MODULE_ENABLED // #define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED +// #define HAL_RCC_MODULE_ENABLED // #define HAL_RTC_MODULE_ENABLED // #define HAL_SD_MODULE_ENABLED // #define HAL_SMARTCARD_MODULE_ENABLED diff --git a/examples/blinky/stm32f4xx_hal_conf.h b/examples/blinky/stm32f4xx_hal_conf.h index a934b1cc..44e10197 100755 --- a/examples/blinky/stm32f4xx_hal_conf.h +++ b/examples/blinky/stm32f4xx_hal_conf.h @@ -33,6 +33,11 @@ /* ########################## Module Selection ############################## */ /** * @brief This is the list of modules to be used in the HAL driver + * + * `stm32-cmake` automatically defines the `HAL_*_MODULE_ENABLED` variables + * when a driver is added to a project using `target_link_libraries`, so they + * don't need to be defined here + * */ #define HAL_MODULE_ENABLED // #define HAL_ADC_MODULE_ENABLED @@ -43,17 +48,17 @@ // #define HAL_CRYP_MODULE_ENABLED // #define HAL_DAC_MODULE_ENABLED // #define HAL_DCMI_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED +// #define HAL_DMA_MODULE_ENABLED // #define HAL_DMA2D_MODULE_ENABLED // #define HAL_ETH_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED +// #define HAL_FLASH_MODULE_ENABLED // #define HAL_NAND_MODULE_ENABLED // #define HAL_NOR_MODULE_ENABLED // #define HAL_PCCARD_MODULE_ENABLED // #define HAL_SRAM_MODULE_ENABLED // #define HAL_SDRAM_MODULE_ENABLED // #define HAL_HASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED +// #define HAL_GPIO_MODULE_ENABLED // #define HAL_EXTI_MODULE_ENABLED // #define HAL_I2C_MODULE_ENABLED // #define HAL_SMBUS_MODULE_ENABLED @@ -61,9 +66,9 @@ // #define HAL_IWDG_MODULE_ENABLED // #define HAL_LTDC_MODULE_ENABLED // #define HAL_DSI_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED +// #define HAL_PWR_MODULE_ENABLED // #define HAL_QSPI_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED +// #define HAL_RCC_MODULE_ENABLED // #define HAL_RNG_MODULE_ENABLED // #define HAL_RTC_MODULE_ENABLED // #define HAL_SAI_MODULE_ENABLED @@ -75,7 +80,7 @@ // #define HAL_IRDA_MODULE_ENABLED // #define HAL_SMARTCARD_MODULE_ENABLED // #define HAL_WWDG_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED +// #define HAL_CORTEX_MODULE_ENABLED // #define HAL_PCD_MODULE_ENABLED // #define HAL_HCD_MODULE_ENABLED // #define HAL_FMPI2C_MODULE_ENABLED diff --git a/examples/blinky/stm32l0xx_hal_conf.h b/examples/blinky/stm32l0xx_hal_conf.h index f835cc06..47ad4be4 100755 --- a/examples/blinky/stm32l0xx_hal_conf.h +++ b/examples/blinky/stm32l0xx_hal_conf.h @@ -33,6 +33,11 @@ /* ########################## Module Selection ############################## */ /** * @brief This is the list of modules to be used in the HAL driver + * + * `stm32-cmake` automatically defines the `HAL_*_MODULE_ENABLED` variables + * when a driver is added to a project using `target_link_libraries`, so they + * don't need to be defined here + * */ #define HAL_MODULE_ENABLED // #define HAL_ADC_MODULE_ENABLED @@ -40,18 +45,18 @@ // #define HAL_CRC_MODULE_ENABLED // #define HAL_CRYP_MODULE_ENABLED // #define HAL_DAC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED +// #define HAL_DMA_MODULE_ENABLED // #define HAL_EXTI_MODULE_ENABLED // #define HAL_FIREWALL_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED +// #define HAL_FLASH_MODULE_ENABLED +// #define HAL_GPIO_MODULE_ENABLED // #define HAL_I2C_MODULE_ENABLED // #define HAL_I2S_MODULE_ENABLED // #define HAL_IWDG_MODULE_ENABLED // #define HAL_LCD_MODULE_ENABLED // #define HAL_LPTIM_MODULE_ENABLED // #define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED +// #define HAL_RCC_MODULE_ENABLED // #define HAL_RNG_MODULE_ENABLED // #define HAL_RTC_MODULE_ENABLED // #define HAL_SPI_MODULE_ENABLED @@ -63,7 +68,7 @@ // #define HAL_SMARTCARD_MODULE_ENABLED // #define HAL_SMBUS_MODULE_ENABLED // #define HAL_WWDG_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED +// #define HAL_CORTEX_MODULE_ENABLED // #define HAL_PCD_MODULE_ENABLED /* ########################## Oscillator Values adaptation ####################*/