2021-04-14 02:47 AM
#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 );
| ^~~
Solved! Go to Solution.
2021-04-20 08:21 AM
Hello @JMigl.1 ,
Let me first welcome you to the STM32 Community =)
Regarding your reported issue, I think you should check the contents of the header files and your declarations.
I advise you to refer to the STM32CubeG0 MCU package and look at the source files to see how to use them.
You can start from a working example to have more idea about implementation, initialization code and related functions. Then make required updates according to your needs.
Please mark my answer as best by clicking on the "Select as Best" button if it helped :smiling_face_with_smiling_eyes:.
Imen
2021-04-20 08:21 AM
Hello @JMigl.1 ,
Let me first welcome you to the STM32 Community =)
Regarding your reported issue, I think you should check the contents of the header files and your declarations.
I advise you to refer to the STM32CubeG0 MCU package and look at the source files to see how to use them.
You can start from a working example to have more idea about implementation, initialization code and related functions. Then make required updates according to your needs.
Please mark my answer as best by clicking on the "Select as Best" button if it helped :smiling_face_with_smiling_eyes:.
Imen
2021-04-26 01:58 AM
Hi @JMigl.1 ,
Do you have still this problem to solve?
I'll be waiting for your feedback and share your update =)
Please close this topic by choosing "Select as Best" if your issue is resolved. This will help other users find that answer faster.
Imen
2021-08-23 04:55 AM
Hi Imen,
yes the problem is solved, thank you very much for your advise, it was very useful for me! :smiling_face_with_smiling_eyes:
Please forgive me for the delay to answer you.
have a nice day!