cancel
Showing results for 
Search instead for 
Did you mean: 

Is there enough memory on the STM32F011 to use the HAL or should I write my own peripheral layer?

NBrow.2
Associate

Hello, I am designing with a STM32L011 (16KB) and setting up with STMCubeIDE. I require I2C, LPTIM,DMA and A/D with a small amount of program space for my actual program. The HAL however uses up all the flash space. Just adding the MX_ADC_Init() function uses about 2KB and overflows my last 10% of flash.

1 ACCEPTED SOLUTION

Accepted Solutions
Ozone
Lead II

You can try to gear up optimisation settings, or check if you use the smallest library variant possible.

But otherwise, those are the perils of "convenience" frameworks, especially those trying to please everyone.

You could write your own libs, or use the "LL part (Low Level) of Cube/HAL.

While it does not come with the baggage of useless code, it is often incomplete and occasional buggy.

View solution in original post

2 REPLIES 2
Ozone
Lead II

You can try to gear up optimisation settings, or check if you use the smallest library variant possible.

But otherwise, those are the perils of "convenience" frameworks, especially those trying to please everyone.

You could write your own libs, or use the "LL part (Low Level) of Cube/HAL.

While it does not come with the baggage of useless code, it is often incomplete and occasional buggy.

NBrow.2
Associate

Thank you, optimizing for size has got me to 60%. Sometimes I can forget the obvious.

Cheers.