cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Flash Driver Not Available from STM32CubeMX

Francois drd
Associate II
Posted on February 21, 2017 at 17:40

Hi, I want to port a IAP CubeMx project for the STM32091C_EVAL board (

https://github.com/borgel/STM32Cube-F0-Releases/tree/master/Projects/STM32091C_EVAL/Applications/IAP

) to a custom board using the STM32F0CB. I noticed that CubeMX can generate code for the MDK-ARM v5 (which supports STM32F0CB microcontroller, v4 doesn't). When I generate the code from CubeMX, it doesn't generate the flash driver (which is used by the STM32 example code). Files are flash_if.h, flash_if.c. There's no selection item to check in CubeMX and it's not included in CMSIS code. I updated the Keil packs from UVision->Project->Manage-Pack Installer.

Are these flash files supposed to be generated from CubeMX or do I simply copy them the example code (which seems not to be the 'clean' way to do it)?

Thanks

Francois

1 REPLY 1
Amel NASRI
ST Employee
Posted on February 21, 2017 at 18:09

Hi Francois,

Flash drivers are stm32f0xx_hal_flash.c and 

stm32f0xx_hal_flash_ex.c.

They are embedded -by default- in the generated package.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.