I'm new to STM32 and trying to bring up the STM32L053-DISCO project in STM32CubeIDE. It mostly comiles fine, but has an issue with the HAL defines, such as below:#define __HAL_RCC_GPIOA_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ ...
So why can't the original code work? It is example code from ST. I would expect the example code to be able to cleanly compile without issue. Is it possibly because a different compiler may have been used? There aren't any compiler dependencies liste...
This is where the original function call is from (BUTTONx_GPIO_CLK_ENABLE(Button). It is from the BSP files for the STM32L053-DISCO eval board.void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode){ GPIO_InitTypeDef GPIO_InitStruct; ...
One function call upp from this is:#define __GPIOA_CLK_ENABLE __HAL_RCC_GPIOA_CLK_ENABLEand before that, this:#define KEY_BUTTON_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE()and before that, this:#define BUTTONx_GPIO_CLK_ENABLE(__INDEX__) (KEY_BUTTON...