cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube and GCC for VCP

joeyshepard
Associate II
Posted on June 14, 2015 at 06:26

I have the STM32F429 Discovery board and I am trying to get the Virtual Com Port working. I am using the GCC plugin for Eclipse, which can generate a blinky program that compiles and works for the board. I can also use STM32Cube to generate a project, which will hopefully work for VCP. The problem is I can't open any of the projects STM32Cube generates with Eclipse. What would be the best way to get the VCP working?

8 REPLIES 8
dszlamp
Associate
Posted on June 14, 2015 at 11:53

Create an empty project and import the code.

joeyshepard
Associate II
Posted on June 15, 2015 at 01:37

Hi Daniel,

Could you be a little bit more specific? When Cube asks me what toolchain, GCC is not an option. I have read elsewhere that I should select TrueStudio but I am unable to import anything it generates into Eclipse. Can you give me more details? Maybe I'm trying to open the wrong thing.

Posted on June 15, 2015 at 05:37

Can you give me more details? Maybe I'm trying to open the wrong thing.

I think it was a suggestion requiring manual additional of all the component files into the empty recipient project, not a button being pressed.

You'd want to pick a supported chain that has GNU/GCC at it's core, so Atollic, RiDE, Rowley, Code:Blocks, or whatever. Atollic uses Eclipse, so perhaps there's additional commonality working in your favour with that,
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
joeyshepard
Associate II
Posted on June 19, 2015 at 23:05

I think it was a suggestion requiring manual additional of all the component files into the empty recipient project, not a button being pressed.

I see now. I should have explained better what I meant. Eclipse does have an ''Import...'' option where an entire directory can be imported, but none of the projects Cube generates seem to be compatible with this feature. If he just meant copying the generated files into Eclipse, I tried this of course before coming here. The linker scripts for one don't seem to be compatible. Also, to get it to even compile, a lot of rearranging has to be done, since Eclipse doesn't try to use all the .h or .c files in the directory structure unless they are in the right place. Files also need to be deleted from the ''empty'' project since it contains templates that conflict with the files generated by Cube. I don't understand why the Cube program is available as an Eclipse plug-in if I have to delete, copy, paste, rearrange, and comment out code to get it to even compile (even if it doesn't link.)

You'd want to pick a supported chain that has GNU/GCC at it's core

 

I don't understand what you mean. I am using Eclipse with GCC. Cube gives me the following ''Toolchain/IDE'' options: EWARM, MDK-ARM V4, MDK-ARM V5, TrueSTUDIO, and SW4STM32. Would the projects generated with any of those options be compatible with the toolchain options you listed? I am not attached to using Eclipse as long as I'm using GCC.

Posted on June 19, 2015 at 23:15

IAR and Keil wrote their own compilers, and thus do not have GNU/GCC at their core. Atollic/TrueSTUDIO and System Workbench use GNU tools.

Code generated that targets IAR/Keil with specific compiler constructs will likely not build cleanly under GNU tools.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
joeyshepard
Associate II
Posted on June 20, 2015 at 22:20

clive1, I understand. I suppose generated projects can only work with TrueSTUDIO and SW4STM32 if I really want to use GCC. The reason I have been trying to get it to work with Eclipse and GCC is that they offer the same Cube software as a plug in for Eclipse that claims: 

  • C code project generation covering STM32 microcontroller initialization compliant with IARâ„¢, Keilâ„¢ and GCC compilers.

Should I give up on trying to make this work?

Posted on June 20, 2015 at 22:44

No, but you're going to have to pick something close to what you want and walk it the last mile, at least until there some better integration, or these tool chains do a better job at importing project files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
tarekbouchkati
Associate II
Posted on June 29, 2015 at 13:32

 I suppose generated projects can only work with TrueSTUDIO and SW4STM32 if I really want to use GCC.

 >  But TrueSTUDIO and SW4STM32 are really GCC based ! Both of them include ARM GNU C Compiler and both of them are eclipse based.

If you want a free solution Attolic offers a lite version of TrueSTUDIO and SW4STM32 is totally free.

hint : You can install STM32Cube-MX eclipse plugin within SW4STM32.