2015-09-18 11:41 AM
In the old days on the B-eval F1 board, I would pick out some sample FW projects and hand merge them into one bigger working monolith - and then use that as a starting point....
...but now we have cubeMX and I'm lost. Lets say that I wanted to create a monolith on an F4 G-eval board that pulls together a few different examples to create an application. To do this, I am supposed to use CubeMX to generate the bare bones of configuration that I need to pull it all together - then merge all sample code in one main.c file, right?So lets say I want to include the TIM_timebase example, which requires TIM3.My first problem is that it doesn't seem possible to open that TIM_timebase sample project in CubeMX to see how things are configured for that project in all the GUI you have to set up.My next problem is - I can't make sense of it. One screens asks me for the total number of timers I want to use. Yet on the next screen I can configure more than that number of timers. And I don't know how to configure those timer options in the Pinout and Configuration GUI - the sample project offers no guidance on that. This is why it would be helpful to open sample projects in CubeMX, but I don't think I can do that???Is there some easier way to do it? Some trick I am missing?Should I just try to hand merge project files together like I used to? Is it only system_stm32f4xx, stm32f4xx_it and its h file, and the hal_conf files I would have to hand merge, or can changes between projects run deeper then that?Of course, if I go that route - why not use the non-cube legacy FW samples instead?Help!2015-09-19 08:35 AM
In the old days on the B-eval F1 board, I would pick out some sample FW projects and hand merge them into one bigger working monolith - and then use that as a starting point....
...but now we have cubeMX and I'm lost. Lets say that I wanted to create a monolith on an F4 G-eval board that pulls together a few different examples to create an application. To do this, I am supposed to use CubeMX to generate the bare bones of configuration that I need to pull it all together - then merge all sample code in one main.c file, right?When you generate initialization code with CubeMX, you can then make as many .c files as you want. Just have to properly include them.So lets say I want to include the TIM_timebase example, which requires TIM3.My first problem is that it doesn't seem possible to open that TIM_timebase sample project in CubeMX to see how things are configured for that project in all the GUI you have to set up.You have to open a project in uVision IDE (for example), not in CubeMX.My next problem is - I can't make sense of it. One screens asks me for the total number of timers I want to use. Yet on the next screen I can configure more than that number of timers. And I don't know how to configure those timer options in the Pinout and Configuration GUI - the sample project offers no guidance on that. This is why it would be helpful to open sample projects in CubeMX, but I don't think I can do that???If you don't choose any of Timers in Pinout tab, then you also don't have any of Timers visible under Configuration tab. If you choose two Timers in Pinout tab, then you have only those two Timers visible in Configuration tab. And you can configure only those two.Is there some easier way to do it? Some trick I am missing?Should I just try to hand merge project files together like I used to? Is it only system_stm32f4xx, stm32f4xx_it and its h file, and the hal_conf files I would have to hand merge, or can changes between projects run deeper then that?Of course, if I go that route - why not use the non-cube legacy FW samples instead?Cube is very easy to use. First do all in Pinout tab (select clock - HSE/HSI, select pins for debugging and programming, select timers, GPIOs, ADCs and so on), then make everything in Clock configuration (choose external cristal speed, configure PLL) and finally do the configuration of peripherals under Configuration tab. That's it. Just save it and click to Generate code. Help!