Hi, good morning, I have a compilation error what I add Flash functions such as HAL_FLASH_Unloc() ... I don't understand why, maybe I miss a setting in the project. The microcontroller is ESP32G070xx. Can anyone help me? Thank you very much Julian
#include "stm32g0xx_hal.h"
HAL_FLASH_Unlock();
FLASH_Erase_Sector( FLASH_SECTOR_11,VOLTAGE_RANGE_1 );
HAL_FLASH_Lock();
ERROR:
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g070xx.h:531:31: error: expected declaration specifiers or '...' before '(' token
531 | #define AHBPERIPH_BASE (PERIPH_BASE + 0x00020000UL)
| ^
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g070xx.h:569:32: note: in expansion of macro 'AHBPERIPH_BASE'
569 | #define CRC_BASE (AHBPERIPH_BASE + 0x00003000UL)
| ^~~~~~~~~~~~~~
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g070xx.h:641:46: note: in expansion of macro 'CRC_BASE'
641 | #define CRC ((CRC_TypeDef *) CRC_BASE)
| ^~~~~~~~
../Core/Src/upgrade_manager.h:10:44: note: in expansion of macro 'CRC'
10 | char Upgrade_Manager_Close_File( uint16_t* CRC );
| ^~~