Creating Custom Board

Hello,

I need to create a board for the STM32L052x8 microcontroller, since it’s not available as a board out of the box for PlatformIO. I’ve been reading about the process of creating the board, and attempted to copy what’s available for the genericSTM32F103C8 board, changing all the information concerning the cpu and the likes. When I attempted to run a compilation with this newly created board I got the following error

KeyError: ‘framework-stm32cubeL0’

I’m guessing there’s some stuff that’s not working correctly on my board definition, but I haven’t been able to find documentation explaining all the attributes that appear on the file. I’m sorry if this question is repetitive, but haven’t found any useful answers yet. Thanks in advance for any help on this matter.

Jorge.

In your board JSON file, spell the mcu name in lowercase, not uppercase.

The logic for determining the name of the used package is at

framework-stm32cubel0 exists, not framework-stm32cubeL0, as one can see in e.g. here.

Thanks a lot! that solved that problem, however I do have a host of errors, I’m guessing due to wrong definitions on my JSON file. Is there any in depth documentation that explains the attributes that I need to include on the file (the ones that are mandatory)? I need to work on that specific MCU and would rather do it on PlatformIO that on the STM32Cube IDE.

Not that I know of. The truth however always lies in the code of the platform and the framework code, regarding what board JSON options are used and what macros the framework code needs, for example.