AnsweredAssumed Answered

USB DFU code generation from STM32CubeMX (F4) for SW4STM32

Question asked by fernandez.javier.001 on Jul 19, 2015
Latest reply on Jan 21, 2017 by Florin Stroiescu
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?

Outcomes