2015-11-24 02:59 AM
Hi there
I need some methodology advice. I devoloped an application FW for F030F6T6 which I'd like to run on a STM32F4 discovery board just for algorythm debug (I have this board on my desk so why not?).I then created an ioc file for F030F6T6 (the MCU I plan to use for production) and, after creating the file I understand that I cannot change the target (either MCU or dev board) any longer. I also learned that I cannot create a new ioc which share the same project name with an existing ioc (I'd like to create an ioc having different name but same project name so I could share mi application user code ...).I'd also like to run Cortex M0/M0+ code on a Cortex M4 (this should be possible since the instr.set of M0/M0+ is fully included in the M4 instr. set). how to manage this?Thanks much2015-11-24 05:14 AM
Hi stanzani.marco,
STM32F0 family has different features from STM32F4 one. Although, one of the advantages of HAL library is the portability as function's names are identical. By consequence, you can use the same functions used for F030F6T6 application taking into account that it has different drivers from STM32F4. All depends on your application.-Shahrzad-2015-11-24 05:52 AM
Hi Sharzad
thanks for your reply. I get your point, still I do not understand why the same project name cannot be used for different target (different MCUs and eval. boards), provided the same peripherals are used: for example, my app uses PortA (GIPIO0, 9 and 10), Timer1 so I do not see why I cannot change target (provided I select the same periperalss and port, keeping the same user code2015-11-30 08:59 AM
Hi marco,
With STM32CubeMx, you have the ability to Switch from MCU to another only if they belong to the same family.For more details, refer to thehttp://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00104712.pdf
section 6.9.-Shahrzad-2015-11-30 10:35 AM
Not sure I understand why you find it so important to use the same project name. I often use the same code on multiple MCU versions and create a new project name that includes the family member in the name, ie projectF4, projectF3 etc. However you can use the same name if you put them in separate working directories. The CubeMX tool uses the project name as the file name so if you try to create two with the same name in the same place it will have the same problem any program would have creating two files with the same name.
Also, I generally put as little code as possible into the cubeMX generated files, including (especially) main.c I just put calls to functions in other files so by copying these files into a new project folder its easy to set up multiple environments that run the same code, recompiled for different family members. So create a new project using the F4, do your algorithm development in a separate source file and copy the changes back into your initial project when you're done.