cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX examples are not examples

Posted on May 10, 2016 at 21:08

The examples in the CubeMX repository do not use CubeMX to generate init code.  This means that they may be a little useful for showing examples of on-chip and on-board peripherals working, but give little assistance in creating projects based on complex peripherals using CibeMX.  By way of example, with the F746 Discovery board, there are examples and Application reference code to use the on-board LCD, SDRAM, QSPI etc.  The example projects initialize and run these peripherals and show that the hardware can be initialized and does work.  However none of these use startup code from CubeMX.  In fact the FMC memory controller code generated by CubeMX does not seem to work to talk to the on-board SDRAM chip.  And trying to translate from the example code which uses init mechanisms nothing like those used by CubeMX makes it very difficult to determine what the Cube implementation is doing wrong.

By making these into actual CubeMX based examples it would serve two important purposes.  First it would provide REAL start points for users of ST products and CubeMX to create projects.  Second it would serve to debug the CubeMX functions themselves so that the users don't have to debug the tools for ST.

PLEASE change ALL of the example projects so that they contain a CubeMX .ioc file that initializes the peripherals used, and provide additional example code to run and use the on-board peripherals thus initialized.

#customer-advocacy
3 REPLIES 3
Posted on May 10, 2016 at 21:34

I think the examples serve different goals, but in general terms some serious 'dog fooding' of this stuff would improve the quality of the code significantly.

https://community.st.com/0D50X00009XkgAKSAZ

 

Edit: Fixed DEAD LINK, original post from May 10 2016

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Walid FTITI_O
Senior II
Posted on May 11, 2016 at 11:30

Hi bauch.aaron.001,

Please, try to make one only thread for the same subject. I gave you a response in the other [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/CubeMX%20and%20CubeMX%20Example%20programs&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/AllItems.aspx&currentviews=34]thread.

-Hannibal-

Posted on May 11, 2016 at 17:42

At the time this thread was open, you provided a canned response which did not address the question, at all. This thread is more of a focused argument, not questioning why.

The question is of the form ''why can't the compiler compile itself?'', and relates to the rather poorly executed transition from a working library to one where the ''code/example'' generation tool doesn't infact generate the code required, and deviates from the manner in which the supplied ''examples'' do,  and does so in a way that ''merging'' code from one to the other is neither practical or functional.

There is a pretty strong case that the examples should be auto-generated by the tool from .IOCs, either generic, or board specific, or portable.

Providing hand-crafted examples, while I think is important, misses the target audience expectations for a tool that conjures fully functional, and coherent, code out of the air.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..