cancel
Showing results for 
Search instead for 
Did you mean: 

[CUBE] Sharing the same application among different MCUs and dev.board

stanzanim
Associate III
Posted on November 24, 2015 at 11:59

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 much

4 REPLIES 4
Posted on November 24, 2015 at 14:14

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-

stanzanim
Associate III
Posted on November 24, 2015 at 14:52

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 code
Posted on November 30, 2015 at 17:59

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 the 

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00104712.pdf

 section 6.9.

-Shahrzad-

Posted on November 30, 2015 at 19:35

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.