Does not compile for STM32F1 in VisualStudio+Platformio
ShaggyDog18 opened this issue · 1 comments
Does not compile for STM32F1-BluePill in VisualStudio+Platformio because definitions used in low_power.h:
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000) &&
defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY)
are not defined in Platformio for STM32DUINO environment for STM32F1-BluePill board. Same for STM32RTC library used in LowPower library:
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000) &&
defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
Here is the list of defines for STM32F1-BluePill, defined in c_cpp_properties.json :
"PLATFORMIO=50100",
"STM32F1",
"STM32F103xB",
"ARDUINO_BLUEPILL_F103C8",
"STM32F1xx",
"ARDUINO=10808",
"ARDUINO_ARCH_STM32",
"ARDUINO_BLUEPILL_F103C8",
"BOARD_NAME="BLUEPILL_F103C8"",
"HAL_UART_MODULE_ENABLED"
@ShaggyDog18
Several issue like this has been raised because PIO provides the master of the branch instead of the last official released and tagged version of the library.
As the core version integrated with PIO is 1.9.0 this is normal it is failing. So use the latest release 1.0.3.
Note that we do not support PIO only Arduino IDE.