Live data from Hacker News

Embedded Programming Without the IDE

reecestevens.me

21–30 of 59 posts

Re: Embedded Programming Without the IDE

#21
post #2

I'm very unlike the author in that I mostly dislike the terminal and I really like IDEs. That said, I think he's onto something here because, invariably, the IDE experience for embedded programming sucks . The amount of chipsets that pretty much force you to use an outdated compiler toolchain with some shitty unmaintained Eclipse plugin, or Visual Studio 2008 or whatever outdated piece of shit, is baffling. I'll neve…

So the embedded industry basically has three types of toolchains/dev environments. Open source, vendor supplied, or paid commercial stuff.

The commercial stuff costs a lot of money. Depending on what the project is and the size of the company, there's a good chance an embedded developer will have to suffer with this stuff. Compiler error messages are straight out of the 90s in terms of how bad they are, basically what it was before Clang showed that C/C++ compilers could be helpful. The IDE is more like a glorified text editor with some hook-ups to their own toolchain/build system. Oh, and things like code completion or just finding the definition of a function can be completely broken with no indication as to why (thanks for the system beep to indicate a generic error IAR).

Next up come vendor supplied stuff. As you said, lots of outdated stuff. They come with wizards to generate low level code which tends to be pretty dire (thanks for using malloc in an ISR, ST). I could understand a hobbyist using this stuff to get their feet wet, but I've seen way too many companies use this stuff for actual products and it hurts to think about.

Lastly is the open source stuff. This really is my preferred method, but it's hard to get both companies and embedded developers on board with this. Most embedded developers I speak with ended up using the vendor supplied or paid IDE because they wanted the debugger "to just work", similarly for the build system. This is kind of a fair point, it sucks having a ton of work to do just to set-up and maintain the project outside of actually developing code. Of course from my perspective open source offers you flexibility, the previous two categories lock you into a specific way of doing things and you will be stuck doing it their way even if it sucks, which it often does.

Re: Embedded Programming Without the IDE

#23
post #14
post #2

I'm very unlike the author in that I mostly dislike the terminal and I really like IDEs. That said, I think he's onto something here because, invariably, the IDE experience for embedded programming sucks . The amount of chipsets that pretty much force you to use an outdated compiler toolchain with some shitty unmaintained Eclipse plugin, or Visual Studio 2008 or whatever outdated piece of shit, is baffling. I'll neve…

One factor to consider is long term stability, an area where web dev works very differently from embedded devices. Embedded code is often tied to a specific hardware device. I maintain code that was originally written almost 20 years ago. I'm extremely conservative in my technological choices for this reason. Whatever I'm using today needs to keep working if I (or my successors) have to unearth the project in 10 year…

> Would I be more productive with fancy-pansy code completion? Probably a little bit. But having a simple, agnostic, portable and stable development environment is well worth the trade-off IMO.

I'd say historically this was less of a concern, but 10-100kloc codebases are becoming pretty common. More powerful uCs with more flash/ram, heterogeneous cores, etc are allowing very complex embedded projects to exist. I'd say fancy IDE features start to help in these cases.

Re: Embedded Programming Without the IDE

#24
post #2

I'm very unlike the author in that I mostly dislike the terminal and I really like IDEs. That said, I think he's onto something here because, invariably, the IDE experience for embedded programming sucks . The amount of chipsets that pretty much force you to use an outdated compiler toolchain with some shitty unmaintained Eclipse plugin, or Visual Studio 2008 or whatever outdated piece of shit, is baffling. I'll neve…

If moving to web development was a breath of fresh air.. holy smoke.

Re: Embedded Programming Without the IDE

#25
My team works on Pigweed [1], which offers a more terminal based approach to embedded development. Instead of working with Make, we use GN [3] as our primary build system (though we also support CMake, and plan to support Bazel).

The "pw watch" command is an integrated watcher that can detect file changes from e.g. vim, then re-build, re-flash your device, and re-run tests according to the dependency graph. I use 2 or 3 STM32F429i Discovery boards to run tests in parallel.

If you're curious, we're giving a workshop [4] at Hackaday's Remoticon; feel free to join or watch the recording after it's up.

[1] https://pigweed.dev

[2] https://pigweed.dev/docs/getting_started.html

[3] https://gn.googlesource.com/

[4] https://hackaday.io/project/175167-remoticon-give-pigweed-a-...

Re: Embedded Programming Without the IDE

#26
post #25

My team works on Pigweed [1], which offers a more terminal based approach to embedded development. Instead of working with Make, we use GN [3] as our primary build system (though we also support CMake, and plan to support Bazel). The "pw watch" command is an integrated watcher that can detect file changes from e.g. vim, then re-build, re-flash your device, and re-run tests according to the dependency graph. I use 2 o…

Thanks for the links! Does GN output compile_commands.json of the project?

Re: Embedded Programming Without the IDE

#27
post #25

My team works on Pigweed [1], which offers a more terminal based approach to embedded development. Instead of working with Make, we use GN [3] as our primary build system (though we also support CMake, and plan to support Bazel). The "pw watch" command is an integrated watcher that can detect file changes from e.g. vim, then re-build, re-flash your device, and re-run tests according to the dependency graph. I use 2 o…

Thanks for the links! Does GN output compile_commands.json of the project?

It sure does [1]!

[1] https://gn.googlesource.com/gn/+/8ce4e49a990c0579ca214ab7967...

Re: Embedded Programming Without the IDE

#28

On the flip side, I've only recently started using an IDE (vscode) after using a pretty light vim build for almost a decade to learn full stack app development (there's no demand for a crusty scientific programmer). I've also recently ditched my arch+awesome wm box for a mac. I'm blown away by the features, speed of code completion, tooling, and great built-in terminals. These's were all the features I've wanted for…

Make is great if you understand how to use it. It's sort of like git in that many people just pick it up as needed and so they don't understand the underlying model, which makes it mysterious to them and causes it to break in ways they don't understand.

Re: Embedded Programming Without the IDE

#29

Earlier quoted context omitted.

I'll never understand why professional embedded developers just suck this up Here's my point of view: historically, software engineers didn't pick the ecosystem. The electrical engineers did. They looked at (in descending order) cost, I/O capability, manufacturing lifespan, and then finally the software ecosystem. When things started getting too similar the chipmakers picked up on this and started selling the softwar…

If you're strapped for cash you can run Blackmagic Probe firmware on a $2 bluepill board for JTAG with a fully open-soure tool set. (I run it on a $2 esp8266 for wireless JTAG. Open-source gives many options!) Free as in speech, almost free as in beer. Less than a single (good) beer.

Everyone loves a Chestnut Brown ale that your neighbor brewed in his basement. But my clients prefer name brands delivered in sealed bottles.

Re: Embedded Programming Without the IDE

#30

Earlier quoted context omitted.

If you're strapped for cash you can run Blackmagic Probe firmware on a $2 bluepill board for JTAG with a fully open-soure tool set. (I run it on a $2 esp8266 for wireless JTAG. Open-source gives many options!) Free as in speech, almost free as in beer. Less than a single (good) beer.

Everyone loves a Chestnut Brown ale that your neighbor brewed in his basement. But my clients prefer name brands delivered in sealed bottles.

Yeah, the parent comment was talking about cheap alternatives. "Sealed Bottles" cost too much for hobbyists.

Also, is there a named-brand WiFi/Wireless GDB debugger?

Post reply on HN