2020-04-23 12:00 AM
Hi there
I moved from TI DSPs using Code Composer Studio to a STM32F4 MCU using STM32CubeIDE and I already struggle with the first steps. While I fancy the automatic Code generation that the STM32CubeIDE configurator offers, I would like to start my first projects without it in order to get a better understanding of the MCU and the CubeIDE.
I am coming straight to the point:
I hope I am not asking for too much help here.
Thank you,
2020-04-24 07:08 AM
Hi all,
short update. I believe I finally managed to find my way through the IDE and the project options to include all necessary header files, setup the defines etc. It was a good exercise for me in order to get a better understanding as of which files are actually necessary and from where these header files are used/called.
I actually got my point proven to go through this (painful) exercise of creating the project manually step-by-step because using the code generation from CubeIDE, the highly critical header files stm32f4xx.h and stm32f4xx_hal.h were called within a header file usb_host.h which is a header file which I do not manage to find in the stm32cubef4 driver package (please correct me when I am wrong). I would have blindly believed the IDE that usb_host.h is crucial for my project and I would have copied this mistake from one project to another.
I now seem to have a proper minimalistic base project where only the absolute necessary header files are present and NO source files (neither HAL or LL). Next step is to include the necessary source files that are used to initialize the MCU clock, and I will then take it from there to probably make my first LED blink.
It was a tough run, and I would have not managed to get this far without your help, which I highly appreciate.
Thank you,
2020-04-25 02:59 PM
Also add the useful CMSIS core files from the latest release there:
2020-07-10 11:10 AM
Hi, I'm working on setting up a similar minimal project for a STM32H755 (dual core). Would it be possible to get a copy of your base project to use as a reference? It would be a huge help. Thanks
2021-03-08 01:41 PM
My approach to the problem is to immediately open a new file, named my_main.c, and create a while (1) {} function in it. Then I have a completely blank screen and a "main loop". In the original main.c the file only has a call to my_main (). This may not be the smartest solution, but it helps me to not to look at the original main.c, which doesn't actually do anything, and is overloaded with various /*...*/,//! I don't know if anyone, whether a beginner or a pro, got a little scared when they saw the automatically generated main.c from CubeMX. That file looks like an ad that says, "Hey look what we did all for you."
Thanks,