Problems with new custom variant

Post here first, or if you can't find a relevant section!
Post Reply
toogooda
Posts: 10
Joined: Sun Jul 19, 2020 9:47 pm
Answers: 1

Problems with new custom variant

Post by toogooda »

I am trying to create a Generic L151C8xxA Variant and followed the instructions for the Wiki https://github.com/stm32duino/wiki/wiki ... nt-(board) Instructions

While testing blink example I found the following issue:
1) stm32l1xx.h:167:3: error: #error "Please select first the target STM32L1xx device used in your application (in stm32l1xx.h file)"

This seems to relate to a missing definition in compiler preprocessor as when I read through the listed file about it has the comment
/* Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor.
*/
I have reviewed the instructions and don't see any information adding this definition anywhere.

Adding #define STM32L151xBA to both stm32l1xx.h and stm32_def_build.h gets it to compile but I have hard coded it for this board, anyone know how to set it correctly for a variant?
by toogooda » Fri Sep 18, 2020 4:44 am
It is set in board.txt
.build.product_line=STM32L151xBA
I had set it to the actual chip STM32L151x8A but you have to select a valid group.
Go to full post
toogooda
Posts: 10
Joined: Sun Jul 19, 2020 9:47 pm
Answers: 1

Re: Problems with new custom variant

Post by toogooda »

It is set in board.txt
.build.product_line=STM32L151xBA
I had set it to the actual chip STM32L151x8A but you have to select a valid group.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Problems with new custom variant

Post by fpiSTM »

Hi,

you have to use this one

Code: Select all

STM32L151xB 
:
https://github.com/stm32duino/Arduino_C ... ild.h#L293

This file provides all possible value.
toogooda
Posts: 10
Joined: Sun Jul 19, 2020 9:47 pm
Answers: 1

Re: Problems with new custom variant

Post by toogooda »

fpiSTM wrote: Fri Sep 18, 2020 8:29 am Hi,

you have to use this one

Code: Select all

STM32L151xB 
:
https://github.com/stm32duino/Arduino_C ... ild.h#L293

This file provides all possible value.
Actually I needed the

Code: Select all

STM32L151xBA 
one thanks
Post Reply

Return to “General discussion”