cancel
Showing results for 
Search instead for 
Did you mean: 

Low level drivers and Cube

Geoffrey1
Associate III
Posted on August 02, 2016 at 15:02

I'm working on a project with the stm32l432 which really requires a minimalist approach with respect to code.   I like cube for pin assignments, and configuration, but it doesn't appear there's a way to generate the init calls to the low level libraries.  Am I missing something ?  Are there plans to integrate the low level libraries with cube in a more meaningful way ?

;
4 REPLIES 4
AvaTar
Lead
Posted on August 02, 2016 at 15:26

> Am I missing something ?

 

Downloaded the Cube package for M7 recently, and found the LL layer to be but a sorry stub (two meager files).

I suspect their software people just can't keep up with demand.

And the LL layer would be the only thing I would ever consider to use.

Nesrine M_O
Lead II
Posted on August 03, 2016 at 10:37

Hi brown.geoffrey.001,

The initialization code generated by MX is based on HAL drivers.

Thanks for your suggestion! I will forward it to our MX team.

-Syrine-

stm32cube-t
Senior III
Posted on November 15, 2016 at 16:20

Please note STM32CubeMX support generating code based on LL drivers for L4 series.

Use the Advanced settings tab from the Project Settings window, to select LL instead of default HAL drivers for code generation.

Geoffrey1
Associate III
Posted on November 16, 2016 at 00:23

Definitely a step in the right direction.  I generated a small project for the stm32l432 nucleo board (but didn't test) that included USB, CRS, and spi.  

I had an issue with RCC configuration I couldn't resolve -- CubeMX objected to the default MSI auto calibration, but also wouldn't let me turn that off (??).  

The generated code was mostly ok.  It was necessary to define USE_FULL_LL_DRIVER  because the generated code quite needlessly uses the GPIO init structure.  This generally leads to bloated code for a very small simplification in coding (but who needs that if the initialization code is generated anyway.

Also the gpdsc file had lots of unnecessary HAL sources listed for devices I didn't explicitly configure.  This is a problem with previous releases.  Since I generate make files from GPDSC, I then have to explicitly disable these files.  Why all the bloat ?

Geoffrey