cancel
Showing results for 
Search instead for 
Did you mean: 

USB DFU code generation from STM32CubeMX (F4) for SW4STM32

jfernandez
Associate
Posted on July 19, 2015 at 12:35

Hello,

I'm new with the STM32CubeMX software and the SW4STM32 IDE. I have some issues with the generation of a simple USB DFU application.

I was working with the STM32CubeMX 4.8.0 release and the STM32F4 1.6.0 Firmware package and all were working perfectly. However, I have updated both components to the last one available (4.9.0 & 1.7.0), and now I'm not able to compile the project.

Whereas I was writing this post I have found the solution. I think it could be interesting for other people. This is the problem:

  • The new FW package + STMCubeMX version generates 2 new predefined symbols that I had to remove. They are already defined into the hal_def.h file:
    •  _weak
    •  _packed
  • On the other hand, I had to rename all the include paths by this way:
    • Rename all paths in absolute form (Now works)
    • Ranem again into relative form (always is better)
I have done something wrong during the code generation or it is a bug from the new STM32Cube version?

#stm32cube #dfu #sw4stm32
1 REPLY 1
Florin Stroiescu
Associate II
Posted on January 21, 2017 at 15:51

I don't know exactly the version numbers of the firmware, but lately, the skeleton functions in usbd_dfu_if.c are no longer populated, so the writing actions in the flash have no means to complete. Check that...