Skip to main content
SSaur
Associate
March 20, 2019
Question

Adding LED APIs for STM32L476 Discovery board?

  • March 20, 2019
  • 2 replies
  • 916 views

I am trying to create keil project for STM32L476VG Discovery board, I tried to include LED API through board support packages from Manage Run time environment.

It leads to open STM32CubeMx and I have generated the code, While building the code I am getting error:

C:\Keil_v5\ARM\PACK\Keil\STM32L4xx_DFP\2.2.0\MDK\Boards\ST\STM32L496G-DISCO\Common\LED_STM32L496G_Discovery.c(34): error: #5: cannot open source input file "stm32l496g_discovery.h": No such file or directory

I am not able to understand why is it searching for STM32L496g_discovery.h file instead it should look for STM32L476g_discovery.h as I am using STM32L476 board.

I also tried to keep a copy of STM32L496g_discovery.h by downloading from github, but build fails with error:

STCubeGenerated\STCubeGenerated.sct(7): error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.

Please help :(

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
March 20, 2019

>>Please help

Sounds like hours of fun, I'm afraid I have productive work to be doing...

When you get board fighting all that, perhaps try loading a couple of the HAL examples from the trees in the CubeL4 trees. Start with things that will build correctly in a free standing manner

STM32Cube_FW_L4_V1.13.0\Projects\32L476GDISCOVERY\Examples\GPIO\GPIO_IOToggle\MDK-ARM\Project.uvprojx

STM32Cube_FW_L4_V1.13.0\Projects\32L476GDISCOVERY\Examples\BSP\MDK-ARM\Project.uvprojx

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
SSaur
SSaurAuthor
Associate
March 26, 2019

Thank you I tried using the example code.

S.Ma
Principal
March 26, 2019

In general, when you open your project on an IDE you have access to the project settings. In there, there is the compiler with its compile options. Maybe there lurks some BSP defines which can't be found with a "find in files" command.