Author Topic: Rant... Why I dumped Platform IO IDE after a week  (Read 11183 times)

0 Members and 1 Guest are viewing this topic.

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Rant... Why I dumped Platform IO IDE after a week
« on: September 07, 2022, 05:16:05 pm »
Aside from odd projects here and there... Microchip whatevers >>> Rowley Crossworks >>> Kiel uVision >>> Segger Embedded Studio >>> Eclipse CDT and STM32CubeIDE >>> VS Code + PlatformIO >>> VS Code CMake.

I recently decided to dump Eclipse / STM32CubeIDE. While it's a TON better than my previous (Segger Embedded Studio, seriously, that can go to hell), I wanted VS Code but still wanted "support". I wanted tools that were made and maintained by someone. Someone to call on if there was an issue. I'm not paid to play with tooling all day, I'm paid to make things.

My first and last week with PlatformIO...

- There is pretty literally one guy answering questions on their forum. I hope Max is paid, because if he isn't I imagine there is an end to his generosity. This does not count as having someone to call on. Paid support for PIO is absurdly expensive at $250/mo with a 12 month use it or lose it contract. This iirc on the prices, is more than a year of IAR, Keil, and CLion together. That's some lunatic pricing.  (EDIT I swear last week they had a $500 per month no contract, but it's gone now)

- Good luck manually adding a floating point flag. I spent a two days trying to figure out how to get an STM32 to build with floating point. Any other system you click a button, or add -fpv4-16 or some other flag. No, not PIO!! You need to add the flag to the compiler, as well as the linker, but In PIO the config .ini only allows for editing the compiler flags. So... What you need to do is create a python script that will add the flags in a backend way, and then call that flag from the ini file. Complete backwards BS. Why are there no linker arguments in the ini? F U is why, I assume.

- You'll have no options and be happy about it. Similarly, you have access to flags they thought you would want access to. I wanted to add context RTOS awareness to the JLink debugger. Despite a guide saying you can easily to it, adding the "-rtos freertos" didn't work.

- What do you mean multiple ram sections!? A ton of new chips have multiple ram sections like STM32's tightly coupled memory. You can place things in these sections using the linker and gcc compiler options, but PIO is hard coded to only should a build usage percentage chart of RAM and FLASH. Not all ram, or all flash, just one "main" section they per-determine. This is 1990s thinking, at best. No great way to fix it, and it's been on their open issues for at least a year.

- "Will you be able to build the project in 10 years?". EEV Members warn/warned others about this. I say no. I could barely build today, and that was not using any of their tooling, just bringing my own files in like a big boy. I initially scoffed this warning, but I recant. Their package manager looks nice, but it's trying to do too much. For STM32, they have a hard coded "platform" build script that tries to replace CubeMX and select the files you might need. I don't trust they will maintain it. I decided early to bring my own files in and it was also trouble.

- It probably works well if you still to absolute basics. Using their tools the way they intended. However... At it's root, they're using python scripts to interpret an ini file, then make a SCons config, which makes me wonder why not just use a Makefile or CMake to existing standards? PIO is a build system helper for SCons. I guess when something goes wrong, I'd rather have the millions deep CMake community to ask instead of hoping Max is around.

- It's still vendor lock in. Despite big bullet points saying it isn't. You're in their system or you aren't. You do get the source, but that doesn't mean it's portable or your changes would be maintainable. You're paying for it with your time. They're a vendor, and their system is exclusive. It's not the hardest lock-in I've ever seen. But there was nothing stopping me from dumping Keil and taking my code to GCC, just a couple flags to change here and there.

- Inexplicable limitations. You are forced root source folder for your code. They build from multiple folders and libraries, but give you access to only one root folder. If you have configurations for two micros, and one folder must be excluded, you are expected to add both to the root source folder, then add a build flag to explicitly exclude the "wrong" folder per build. Backwards and they easily could have selected an "opt-in" system for source files, like every other build tool ever.

- .C or .S files, pick one. You can not have both with the same name, ever, anywhere. Annoying that in STM32 you may have a .C or .S option with the same name. Startup is one example but in the CMSIS folders there are a few more. PIO just can't handle this. Goes back to the single root source folder, and that everything inside will try and be compiled whether you want it to or not.


Takeaways...

1. They're trying to be Arduino. I would only rank it slightly above.

2. I don't think the current development is very active. Blame the war in Ukraine if you want.

3. It took me longer to try and learn PIO and it's odd .ini system and workaround than it did to open VSCode, install all the extensions I wanted, and create a CMake file. That's the worst thing I can say about PIO and why I'll probably never recommend it.


I don't regret trying it. I have a great setup now in VS Code. I finally feel like my embedded tooling isn't perpetually 15 years in the past.
« Last Edit: September 09, 2022, 04:44:00 pm by jnz »
 
The following users thanked this post: boB, edavid, Oleenick, wek

Offline hans

  • Super Contributor
  • ***
  • Posts: 1410
  • Country: nl
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #1 on: September 07, 2022, 06:26:30 pm »
My personal favorite: CLion + CMake. But CLion is not free. And their embedded support is far from done (still waiting for disassembly listing panes and live CPU register views -- need to debug with gcc objdump and gdb commands). But their C/C++/general programming tool suite is very well regarded/supported..


I agree with your findings. And I can rant along too. PIO... I've tried it, and my first impression: it's a steaming pile of ****. I like the Arduino IDE more because it does less things and doesn't get in the way. I hate when embedded tools try to be "automagic" but then get it wrong. It's a general theme IMO in your comments. It's a 1-size-fits-all approach which only works in the software world where you can say "this software runs on any Windows 7 or later system".

I've tried to build a custom IOT application based on the Tasmota project, and I don't think I can fault the Tasmota guys for how crappy PIO is. For mysterious reasons, the upload_port will never change even when I manually set it in ALL the .ini files with CTRL+F search in the project folders and brute-force replaced them all. It still defaults to COM5. I'm not even on Windows(!), and there is absolutely no mention in ANY file of "COM5".  |O

Eventually I gave up on trying to fix PIO, so I hacked in the correct serial port right at the exception line in one of those python scripts. It worked.. but then rebuilding a project takes forever. Now this may be because of the large Tasmota project size, but I was really not amused by an almost 2 min build/upload cycle... IIRC it kept rebuilding libraries and trying to link this huge 1MB final binary :-//. I rather spend my energy on writing an Arduino sketch with a basic MQTT library and handing over data via a handful of published/subscribed topics.
« Last Edit: September 07, 2022, 06:29:33 pm by hans »
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3218
  • Country: it
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #2 on: September 07, 2022, 07:51:59 pm »
why i dumped platform io after one hour: it should be self explanatory. How do people stand that pile of garbage? I couldn't make sense of anything, the workflow, how to know when things are being done, everything seems like an hack upon another hack.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3218
  • Country: it
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #3 on: September 07, 2022, 07:53:50 pm »
I'd rather have poor documentation, but at least one hello world C project that actually builds and works so i can make sense of things one little step at a time
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1594
  • Country: us
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #4 on: September 07, 2022, 09:34:54 pm »
Segger Embedded Studio, seriously, that can go to hell

I'm curious...what did you not like about Segger Embedded Studio (and presumably Rowley CrossWorks)?
Complexity is the number-one enemy of high-quality code.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 4661
  • Country: ca
  • Non-expert
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #5 on: September 07, 2022, 09:37:39 pm »
If you are paid for your work and want support, PIO is not something I'd really consider. I would be looking at paid software.

My choice is VisualGDB, but many may not like it, especially if software is your strong suite.
You can setup a project as msbuild, gnumake, cmake.
Its NOT lightweight, and windows only.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: newbrain

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #6 on: September 08, 2022, 12:17:55 am »
Segger Embedded Studio, seriously, that can go to hell

I'm curious...what did you not like about Segger Embedded Studio (and presumably Rowley CrossWorks)?

Without derail... Besides the straight up crashes, besides the goofball menus that try and hide options way deep down, besides the download/install size and that updates are manual with entirely new binary folders, besides the find/find-in-files sucking, besides the awful theme options, and besides the bugs I had to work with Segger on....

It's just old. It doesn't support a modern CTRL+CLICK to get a definition of. It doesn't support any extensions for complex or trivial things. It just feels like it's 20 years old, because it is and no one ever considered to go through it again.

Compared to a version of VS Code that is set up how I like it, it's just a joke to use. I'm still stuck with it for a legacy product, but I honestly wonder how I got anything done in there.

Like I said above, I finally feel like I have modern tools that do actually helpful things. As I write this, I have VS Code open with a text file set to PlantUML and I'm doing a state machine diagram that is automatically updating when I change the text. I don't need to leave my IDE to work in Notepad++ and run the PlantUML jar elsewhere. It's all just right here, and works so well. I can switch to C or Python just by opening a file and build/debug either just as easily.
 
The following users thanked this post: newbrain

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #7 on: September 08, 2022, 12:19:37 am »
If you are paid for your work and want support, PIO is not something I'd really consider. I would be looking at paid software.

Yea, well.... Been there too! I had a short stint with IAR, and a long stint with Keil.

At least for all of Keil's awfulness and an editor that rival Segger for old tech... At least their compiler is very very fast.
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #8 on: September 08, 2022, 12:22:18 am »
I'd rather have poor documentation, but at least one hello world C project that actually builds and works so i can make sense of things one little step at a time

I guess to be fair, PIO's documentation isn't the worst. But it looks a lot better than it is on the surface. Once you need something, you get in this loop of "I need this thing (build tools) so I click a link and it takes me to a page that has another link that looks like what I want that takes me to another page that definitely says it has what I want... And now I'm back at the first page again." I'll check the forum or GIT close issues and see if Max answered this already.
 

Offline PatrickCPE

  • Contributor
  • Posts: 9
  • Country: us
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #9 on: September 08, 2022, 12:30:33 am »
I can vouch I enjoyed CLion when I did STM32 Development. They let you import the IOC files and generate a CMake file for you.

I'm also a fan of just doing a CMake or make file if the project is anything serious that I'll be using for a long time. GUIs are great until something doesn't work or you need to do something weird/dumb. I've been opting for just Emacs and a terminal when needed as of late
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3218
  • Country: it
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #10 on: September 08, 2022, 05:56:55 am »
I'd rather have poor documentation, but at least one hello world C project that actually builds and works so i can make sense of things one little step at a time

I guess to be fair, PIO's documentation isn't the worst. But it looks a lot better than it is on the surface. Once you need something, you get in this loop of "I need this thing (build tools) so I click a link and it takes me to a page that has another link that looks like what I want that takes me to another page that definitely says it has what I want... And now I'm back at the first page again." I'll check the forum or GIT close issues and see if Max answered this already.

I am starting to ventilate
 

Offline SpacedCowboy

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
  • Aging physicist
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #11 on: September 08, 2022, 03:50:28 pm »
Perhaps I was lucky, but I got platform io working pretty quickly with the RP2040. Thought it was quite nice and easy to use, actually.
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #12 on: September 08, 2022, 05:54:21 pm »
I'd rather have poor documentation, but at least one hello world C project that actually builds and works so i can make sense of things one little step at a time

I guess to be fair, PIO's documentation isn't the worst. But it looks a lot better than it is on the surface. Once you need something, you get in this loop of "I need this thing (build tools) so I click a link and it takes me to a page that has another link that looks like what I want that takes me to another page that definitely says it has what I want... And now I'm back at the first page again." I'll check the forum or GIT close issues and see if Max answered this already.

I am starting to ventilate

I get it. Hence the reason for this whole post.

However... still sadly, not even remotely the worst.
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #13 on: September 08, 2022, 05:57:35 pm »
Perhaps I was lucky, but I got platform io working pretty quickly with the RP2040. Thought it was quite nice and easy to use, actually.

Yea, well, that's the thing isn't it? If it's something we all recognize even vaguely as a thing, there are obviously people out there using it. I have no doubts that if you stay within the box and with very popular hardware, that there has been enough work to be successful using it.

I like some of the things they did, they just made odd choices that I feel long term have boxed themselves in. Unless they PIO2 as a complete re-write to drop old decisions, I don't see it going much further. But, I shit on bitcoin back when it was $100, so what do I know anyhow!?

The overall point is when you want to step outside the box even a little, or you want to build the project years later... Your time is probably better spent doing it "the hard way" (may be easier) with CMake and modular tools.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 6375
  • Country: fi
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #14 on: September 08, 2022, 06:02:29 pm »
Vendor frameworks, IDEs and whatever have always been pure shit, and so are third party replacements.

Even if some are remotely acceptable, learning them is wasted time because they have short lifespans, or narrow scope (some specific brand).

If you use ARM, RISCV, AVR or any other MCU with GCC and GNU toolchain available, just learn these command line tools. They have been the same from 1980's, maybe evolved a bit but never aggressively. As you have witnessed trying to adjust compiler flags in a GUI, you usually need to understand how the underlying tools work anyway, so working with them directly removes one layer of indirection.

End result: less wasted time, stable workflow, you being able to quickly switch between different manufacturers without installing anything, deeper understanding, better results. No downsides.

So just say no and don't waste a week, don't waste a day, not even an hour.
 
The following users thanked this post: artag, SiliconWizard, wek, tellurium, karpouzi9

Online wek

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: sk
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #15 on: September 08, 2022, 06:08:32 pm »
We all have strong opinions about toolsets, cars and beverages.

Maybe it's good.

Thanks jnz for the overview.

JW
 
The following users thanked this post: jnz

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 11207
  • Country: fr
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #16 on: September 08, 2022, 06:14:33 pm »
I agree with Siwastaja here, and more generally speaking, don't fall into the trap of quick-and-easy, "instant-gratification" tools and approaches. You will almost always regret it at some point.
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #17 on: September 08, 2022, 06:51:18 pm »
I agree with Siwastaja here, and more generally speaking, don't fall into the trap of quick-and-easy, "instant-gratification" tools and approaches. You will almost always regret it at some point.

I can steelman that... I said it in the top post. "I'm not paid to play with tooling all day, I'm paid to make things."

Jupiter Notebooks and Python have replaced MathCad for me. VS Code + Extensions has replaced like... almost everything. But if you hold a gun to my head and tell me I have 5 days to make a CAN to Ethernet bridge on a micro I've never used before - I'm not running to VS Code or CMake or my ability to screw up a for loop in python because I do them so rarely.

Similar to the comments to SpacedCowboy, obviously these things work for some people depending on the task. Let's not pretend that "instant gratification" is a bad thing if it works.

Let's also not pretend that "the big boy tools" always Just Work (tm).

... But yea, I agree overall and it's where I'm at now.
 

Online agehall

  • Frequent Contributor
  • **
  • Posts: 356
  • Country: se
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #18 on: September 08, 2022, 07:18:35 pm »
I found that it did take a bit of work to get into how PIO does things but once you start reading up on things, it was pretty trivial to beat it into submission and make it do whatever I desired. Probably spent a day or so figuring things out but I thought that was time well invested for my little project.
 

Offline ozcar

  • Frequent Contributor
  • **
  • Posts: 269
  • Country: au
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #19 on: September 08, 2022, 10:09:22 pm »
Perhaps I was lucky, but I got platform io working pretty quickly with the RP2040. Thought it was quite nice and easy to use, actually.

PIO worked for me as a casual tinkerer for STM32. I do remember having some trouble with a compiler option, when I had to "unset" something that PIO was doing. 

PIO does RP2040? I did eventually get RP2040 working with VS code, but as far as I could see, what I did had nothing to do with PIO.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 4661
  • Country: ca
  • Non-expert
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #20 on: September 08, 2022, 10:27:24 pm »
Yea, well.... Been there too! I had a short stint with IAR, and a long stint with Keil.

At least for all of Keil's awfulness and an editor that rival Segger for old tech... At least their compiler is very very fast.

Sure, I never said all paid software is good, just that paid would be the only ones I'd be looking at trialing.

Compiler being fast could be related to build options, caching, multi-core use, etc.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline SpacedCowboy

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
  • Aging physicist
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #21 on: September 09, 2022, 01:01:01 am »
PIO does RP2040? I did eventually get RP2040 working with VS code, but as far as I could see, what I did had nothing to do with PIO.

Gah. Wrong micro. I was also using VSCode for the RP2040. I used PIO for the GD32F450 (Chinese STM32 "clone").

As I recall, there was a little to do - create a definition file basically because the specific chip I had wasn't supported, but it was pretty straightforward.
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1594
  • Country: us
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #22 on: September 09, 2022, 06:33:40 pm »
I agree with Siwastaja here, and more generally speaking, don't fall into the trap of quick-and-easy, "instant-gratification" tools and approaches. You will almost always regret it at some point.

I can steelman that... I said it in the top post. "I'm not paid to play with tooling all day, I'm paid to make things."

Jupiter Notebooks and Python have replaced MathCad for me. VS Code + Extensions has replaced like... almost everything. But if you hold a gun to my head and tell me I have 5 days to make a CAN to Ethernet bridge on a micro I've never used before - I'm not running to VS Code or CMake or my ability to screw up a for loop in python because I do them so rarely.

Similar to the comments to SpacedCowboy, obviously these things work for some people depending on the task. Let's not pretend that "instant gratification" is a bad thing if it works.

Let's also not pretend that "the big boy tools" always Just Work (tm).

... But yea, I agree overall and it's where I'm at now.

I remember looking into doing STM32 development using VSCode about a year ago. There are several sites describing how to do this, and they all require tying together a bunch of bits and pieces from different sources. And they require using STM32CubeMX to create the makefiles. After futzing with it for a week, I finally got things going, but it felt like a kludge that would break anytime one of the components changed and became incompatible with some other component.

I prefer an integrated solution that includes everything, properly integrated. Hell, I'll even use something like Keil or IAR over some hodge podge solution cobbled together from parts. I' more than willing to give up some cute editing features for an all-in-one solution that just works.
Complexity is the number-one enemy of high-quality code.
 
The following users thanked this post: thm_w, cfbsoftware

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #23 on: September 09, 2022, 11:46:55 pm »
I remember looking into doing STM32 development using VSCode about a year ago. There are several sites describing how to do this, and they all require tying together a bunch of bits and pieces from different sources. And they require using STM32CubeMX to create the makefiles. After futzing with it for a week, I finally got things going, but it felt like a kludge that would break anytime one of the components changed and became incompatible with some other component.

I prefer an integrated solution that includes everything, properly integrated. Hell, I'll even use something like Keil or IAR over some hodge podge solution cobbled together from parts. I' more than willing to give up some cute editing features for an all-in-one solution that just works.

I think the weak point in your path was being convinced to use CubeMX for the makefile.

You'll need to add your own files to the make process anyhow... So I would recommend just using CMake and then adding the cube files. The way I look at it is, how often do you really add files to the project? You will spend much more time working with what you have after an initial set up. I still use Cube for generation of inits and clock, but if Cube adds a new file, I just add it to CMake and away I go. I haven't used CLion, and just CAN'T imagine the editor is nearly as good as VSCode, but that would be my backup before having to go back to Eclipse which I would fine also painful.

My extension list is primarily:

Language and Syntax:
ARM
C
CMake
Python
PlantUML
Markdown
GNU Linker

Tools:
CMake Tools
Cortex-Debug (and SVD packs)
Serial Monitor
Embedded Tools (RTOS monitor)

That's 99% of everything I need. Everything else are themes, tools I find handy (like errorlens and rainbow brackets).

I just had to got from my "cobbled together" solution back to Keil and it nearly killed me. Such a productivity drag.

If anyone wants a decent guide, I used this and it worked pretty well. https://mcuoneclipse.com/2021/05/01/visual-studio-code-for-c-c-with-arm-cortex-m-part-1/
 
The following users thanked this post: Sal Ammoniac

Offline uliano

  • Contributor
  • Posts: 48
  • Country: it
Re: Rant... Why I dumped Platform IO IDE after a week
« Reply #24 on: September 10, 2022, 06:52:22 am »
So I would recommend just using CMake and then adding the cube files. The way I look at it is, how often do you really add files to the project? You will spend much more time working with what you have after an initial set up. I still use Cube for generation of inits and clock, but if Cube adds a new file, I just add it to CMake and away I go.

Quote
If anyone wants a decent guide, I used this and it worked pretty well. https://mcuoneclipse.com/2021/05/01/visual-studio-code-for-c-c-with-arm-cortex-m-part-1/

I had already stumbled on that link, however all the workflow there is based on j-link (expeeensive!!) and NXP devices. As an absolute beginner in the ARM realm I'm not able to "translate" it for st-link and stm devices. That's why I have been an easy pray for PlatformIO, which at least let me blink a led even if I strongly dislike it in almost every aspect.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 



Advertise on the EEVblog Forum