This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error with Blinky Project

Hello,

I am a beginner, starting with STM32L1 dev board. I am trying to run the blinky project from the STM32L1 pack. I am having this error when I compiled, after I clicked 'Option for Target' and selected STM32152RCT6 as my device instead of STM32152RBT6. Does anyone know why that happens?
Thanks so much!

Build target 'STM32L152 Flash'
compiling LED.c...
C:\Keil_v5\ARM\PACK\Keil\STM32L1xx_DFP\1.0.2\Device\Include\STM32L1xx.h(238): error: #67: expected a "}" TIM7_IRQn = 44, /*!< TIM7 global Interrupt */
C:\Keil_v5\ARM\PACK\Keil\STM32L1xx_DFP\1.0.2\Device\Include\STM32L1xx.h(280): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type;
LED.c: 1 warning, 1 error
compiling Blinky.c...
C:\Keil_v5\ARM\PACK\Keil\STM32L1xx_DFP\1.0.2\Device\Include\STM32L1xx.h(238): error: #67: expected a "}" TIM7_IRQn = 44, /*!< TIM7 global Interrupt */
C:\Keil_v5\ARM\PACK\Keil\STM32L1xx_DFP\1.0.2\Device\Include\STM32L1xx.h(280): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type;
Blinky.c: 1 warning, 1 error
assembling startup_stm32l1xx_mdp.s...
compiling system_stm32l1xx.c...
C:\Keil_v5\ARM\PACK\Keil\STM32L1xx_DFP\1.0.2\Device\Include\stm32l1xx.h(238): error: #67: expected a "}" TIM7_IRQn = 44, /*!< TIM7 global Interrupt */
C:\Keil_v5\ARM\PACK\Keil\STM32L1xx_DFP\1.0.2\Device\Include\stm32l1xx.h(280): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type;
RTE\Device\STM32L152RC\system_stm32l1xx.c: 1 warning, 1 error
".\Flash\Blinky.axf" - 3 Error(s), 3 Warning(s).
Target not created

  • Perhaps you need to pass in an architecture define so only one set of enumeration is pulled in? Look at the #ifdef/#endif pairing in the include file around the lines it's complaining about, and then put the right define into the compilers options.