Author Topic: Anyone switched from STM32CubeIDE (Eclipse) to VS Code with CubeMX extensions?  (Read 4640 times)

0 Members and 2 Guests are viewing this topic.

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Looking for the pain points.

After years of ignoring VS Code for VS reasons, I needed a markdown editor I didn't hate and.... actually really like VS Code. It's lighter than Atom and the plugins are pretty damn good so far.

So it got me thinking... Why am I still using Eclipse / CDT / STM32CubeIDE? There is an extension (stm32-for-vscode) that seems to add most of the CubeMX tie-in features. I haven't looked into Debug options, but it looks as good as any OpenOCD or GDB alternatives.

Has anyone gone through it?

Major issues like it's still makefile based. And while there is an Eclipse project importer, I'm sure there will be something that doesn't scale over correctly.

Then again, I've had a hard enough time with Eclipse doing weird things with imported files that I'm willing to give it a try.

Advice?
 

Online agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
I’d suggest looking at PlatformIO and VSC. There are tools to take the output from the configuration tool (CubeMX?) and turn it into at PIO project so you can still use the GUI tool to configure everything.

Was really convenient the last time I had to work on an STM32, especially since I can’t stand Eclipse-based IDEs.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: ca
  • Non-expert
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
I don’t know a ton about PIO, but I was under the impression it was like arduino and has its own formats and systems for building, I don’t think I want to add any Platform stuff to my code.

This isn’t a hobbiest project I’m working on. I’m sure someone “real” is using that framework, but I haven’t really seen anything to that level.

Is there some way to use and get benefit from those tools without making it a “platform.io project”?
 

Online agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Do NOT campare Arduino and PIO. That is like comparing a broken bike to a brand new race car - not really the same thing.

You can set PIO up to build using anything you like. There is a bit of setup for the project if you don’t want the defaults, but it is easy.
 
The following users thanked this post: tooki, jnz

Offline betocool

  • Regular Contributor
  • *
  • Posts: 97
  • Country: au
If it works, I think it's a really good idea. I've been using VS Code for almost everything except Jupyter... but still a bit. VHDL, Python, you name it, it goes through VS code. The Quartus editor is so bad, it's better to work on VS Code and just click on the "compile" button.

Back on topic, I briefly tried PIO on Windows, and I found it difficult to just get a microcontroller (STM32L4 I think, with custom hardware) up and running. Lots of dev kits though. But I didn't immediately dislike it, just didn't look into it enough.

I believe CubeMX does generate a Makefile project if necessary. Just add your own sauce I guess... but I never tried.

Cheers,

Alberto
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
I don’t know a ton about PIO, but I was under the impression it was like arduino and has its own formats and systems for building, I don’t think I want to add any Platform stuff to my code.
Not all. PIO supports a number of frameworks, of which Arduino is one, and CubeMX is another. For a project in PIO, you select the framework you want to use, provided it’s available for the selected board/MCU. (You cannot, for example, use CubeMX with an Arduino board.)

Whether PIO is superior to the CubeMX IDE I can’t say, I haven’t used it. (At school, we had to use Keil to program STM32. I hate its editor, but man, does it compile and upload quickly!!) PIO is popular in the Arduino crowd, especially using ESP32, precisely because it’s a billion times better an IDE than Arduino’s own.
 
The following users thanked this post: jnz

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Right… so… I spent some time trying to get SMT32-for-VSCode extensions up and it works alright but it’s not really as IDE as I am used to. I want to build; and if there is an error see it in the output window, see it highlighted on that line of code if the file is open, and get a list in the problems panel with links to the code. I want how much memory is remaining, etc. It seems to work and is developed well, but I want a whole turnkey solution.

So… I tried some MCU IDE extension written in Japanese or Chinese. No go there either.

I’ll try platform.io in the morning. I need a real IDE but have a couple immediate problems:

  • I feel like I’m going backwards a bit. I hated Keil. I grew to hate Segger Studio (Rowley crossworks). I really don’t mind STMCubeIDE/Eclipse but it’s just not as nice as VS Code. So now going to PlatformIO I feel like… like I haven’t seen professional products made in it, and it concerns me. Probably dumb, but perception could be reality. I know tons of “real” products are done in Keil and man I hated that whole system.
  • I don’t love their “you get one folder for source one for includes” thing. But honestly it makes sense and is probably something I would do if I made an IDE. It makes building and linking so much easier if you can enforce a rule like that.
  • I’m looking forward to a way to test. It seems great to have that properly built into the IDE. But this is a lock-in concern.
 

Online darkspr1te

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: zm
I'am user of what works best for any situ, some times i use arduino just for speed and sometimes platformio +cubemx when i want to build something similar to the device am reverse engineering.
The one thing i like about platform io is that i can create a cubemx folder, export the folder, add the platformio.ini with me settings in it and hit ctrl+shift+u to compile and upload. I also have the choice of debug type from openocd, black magic probe,jlink etc

see my github repo for examples of simple and complicated platformio file that allow all sorts of compile types.
https://github.com/darkspr1te

darkspr1te
 
The following users thanked this post: jnz


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf