EEVblog Electronics Community Forum
Products => Computers => Programming => Topic started by: garethw on March 07, 2020, 12:21:31 pm
-
I curently use Windows 10 and have been developing embedded projects for a while. I've started to notice that the tool chains seem native to linux systems and have to be ported over to Windows. I'm toying with the idea of going over to Linux for software development.
What do other people use and why?
-
Use whatever works best for you. ;) In my case it's linux. I'm familiar with unix and windows, but I prefer unix. One of the main reasons for linux is that it's open source and allows me to fix things. Windows is more of a black box.
-
" I'm toying with the idea of going over to Linux for software development. "
You don't need to move, have the best of both words
https://www.youtube.com/watch?v=wM-wBciLeDw (https://www.youtube.com/watch?v=wM-wBciLeDw)
-
I'm using Linux. It is my main OS for anything. But specific to Linux and firmware development:
When developing a firmware implements an USB Device, and something is wrong, Linux tells me what is wrong, and Windows just tell me something is wrong.
My preferred toolchain is gcc, and I prefer to use Makefiles as my build tool, such that my build environment is independent from my IDE. This way of work is easier to set up on a Linux environment, as everything I need is readily available as packages in most Linux distros. Getting that stuff to work on Windows requires getting binaries from various sources, (eg. the arm-none-eabi-gcc is not present in the MSYS2 repo)
-
My first choice is Linux. No second choice, except when forced by stupid IT department. There's all the tools (like gcc-arm-whatever, make, ...) natively available, most of it provided by the distribution package manager or even installed by default. And, my typical Makefile project compiles five to ten times faster on native Linux than Windows (using the very same PC, just booted into Win / Linux). Someone (bd139) pointed out Windows has a serious issue in its native filesystem that slows heavily down your typical embedded compile process using make, gcc and so on. And, as someone else said, the typical Linux tools provide you with useful logging / error messages while Windows leaves you guessing what is wrong. Next, Linux has easier handling of your typical low cost HW debug tool than Windows. You don't have to hassle around licensing and updating issues. And so on and on and on ...
-
Does all brands MCU support Linux ?
-
The vast majority of toolchains for embedded software these days are portable CLI executables, so they can be compiled for almost any OS, and they certainly are available on Linux, Windows, and usually MacOS too. GCC is currently the most popular compiler, it's very likely to be GCC unless you develop for an ultra-specific target with a proprietary compiler.
The only part that may be OS-specific are extra GUI tools (such as IDEs, which are themselves not mandatory for software development), although a large number of IDEs now are based on Eclipse which is also cross-platform. So the OS choice pretty much comes down to your preferences, unless you're using some extra tools that are only available on a given OS.
I personally use both Windows (7) and Linux. Mainly Windows on my main workstation, and Linux on my laptop and on a couple "headless" boxes I have built that are just connected to the LAN and accessed through SSH.
-
The only part that may be OS-specific are extra GUI tools (such as IDEs, which are themselves not mandatory for software development), although a large number of IDEs now are based on Eclipse which is also cross-platform. So the OS choice pretty much comes down to your preferences, unless you're using some extra tools that are only available on a given OS.
The most common and important tool in this category IME is the programming software.
This isn't normally a problem because someone will have reversed the device or implemented a flasher from the documentation, but I have run into issues where the latest parts are not supported yet by the open-source tools. Usually means you have to go modifying the sources to support your new chip, or run the vendor's flasher in a VM, which is moderately annoying.
I am using 100% Linux for almost 10 years now.
-
Does all brands MCU support Linux ?
No for the IDE, virtually yes for the compiler.
Some MCUs just have to be used with their special IDE for mac potential, such as PSoC, so you have to use Linux (rest of PSoC6 which rumor says it has brand new a Linux IDE).
Most everyday MCUs like STM32, AVR, PIC, most 8051 and MSP430 have good Linux support. But you pay a bit more time cost for setting up the Linux environment than Windows.
The ModusToolBox is a humongous pile of steaming garbage. Its one of the main reasons why I did not use PSoC6 for one my latest projects. Half of the features in the tool chain don't work and the IDE freezes up when I hook up my PSoC dev board. not to mention its eclipse based, so I'm already a bit tiered of the UI. And perhaps the worst part was that there seems to be no active development effort behind it.
-
I use Win7 and Linux mostly, occasionally MacOS, it doesn't really matter.
WSL is a waste of time, it's not the best of both worlds, it's the worst of both worlds. You get a somewhat hobbled and nonstandard Linux and you still have to deal with Windows.
-
Beware that WSL1 does NOT support USB other than USB serial ports and mass storage. If you work with libUSB devices, you are out of luck.
I have no idea if WSL2 works with USB, but since it is based on VM, it should, but that really depends on how MSFT configures it.
Also, just a fyi, Quartus (if you also use it) has an issue with WSL that is apparently fixed with version 19.x.
-
At work Linux. Once in a while I run windows 7 in Virtualbox because of some rare tool.
At home Linux. I have some vm's with windows xp and windows 7 when I need to compile some software for other people.
Anyway, all development and testing is done on Linux, windows 10 is avoided as the plague...
https://blogs.microsoft.com/on-the-issues/2020/03/10/necurs-botnet-cyber-crime-disrupt/ (https://blogs.microsoft.com/on-the-issues/2020/03/10/necurs-botnet-cyber-crime-disrupt/)
-
W10 with VMWare Workstation and then a collection of Linux VMs
-
FreeBSD, occasionally Linux. I left Linux because of Systemd, and stayed with FreeBSD because of ZFS and BSD Jails. I want my OS to be easily maintained and utterly dependable so I can do real work.
My "Bluepill Diagnostics" binary was created on this FreeBSD machine and has been downloaded 181 times so far.
https://www.eevblog.com/forum/microcontrollers/stm32f103c8-diagnostic-bootable-binary-freely-available/msg2830060/#msg2830060 (https://www.eevblog.com/forum/microcontrollers/stm32f103c8-diagnostic-bootable-binary-freely-available/msg2830060/#msg2830060)
-
Windows 10. I don't use the OS to write embedded code and won't be switching for the sake of one program.
-
Windows 10. I don't use the OS to write embedded code and won't be switching for the sake of one program.
Isn't writing embedded code under an OS the whole topic of discussion in this thread? Or am I misunderstanding what you're saying?
-
i was simply saying that I don't understand why one's OS would be so important. The only role the OS has is to run the IDE.
-
i was simply saying that I don't understand why one's OS would be so important. The only role the OS has is to run the IDE.
No, IDE is actually the optional part. I have never used IDEs unless I have to due to external policy.
In very simple projects, of course, there is not much else than the basic code editing, compiler and programming tools.
But when the complexity goes up, you also design things, requiring mathematical simulation (like Matlab / Octave), scripting languages, building your own tools to generate data tables, test cases, your own programming tools to interract with your own bootloaders (because you won't always be able to depend on the physical JTAG/SWD/whatever link).
Spreadsheets is something I need all the time when writing software.
Then comes documentation, drawing figures...
And I'm sure this is just the tip of the iceberg. It's a lot more than just running the IDE.
So embedded software development involves a lot of software, of many different kinds. For myself, I find that linux caters better for these varying needs - especially the "custom tool" and software process automation mindset. I also appreciate USB serial devices which work reliably and without hassle, without drivers, and without COM port number changing applications.
OTOH, others may have a different workflow, in which they rely on a few specific large Windows applications to be productive: it can be, for example, Visual Studio, Matlab, and the MCU-specific IDE.
I recognize there is no one right way to do it, and while the OS may be surprisingly important part of the puzzle, it can be either way, and work out equally fine in the end. It's just indicative of your particular workflow; and like we all, I prefer mine.
-
Yes which is why the question on it's own about the OS is not really one that has an answer. The question is what do you need. I am only at the start of programming. an IDE is all i need and what that is is almost irrelevant to me because I am not a power user yet. I have the choice of atmel studio or MPLABX, i chose Atmel studio simply because MPLABX is based on a program call netbeans that has not done DPI management yet and it looks absolutely crap an my 4k monitor, worse than it would if i were simply running FHD. So i don't use it and microchip will have to keep paying the visual studio licence until they sort it out. That's how my choice of programming environment was made.
And yes i use windows 10 because that is what i have and I could not get used to Linux and the OS is just an OS to me. I just pick the one that works and that the programs i want to run, run on.
-
Assuming you are someone who uses a "traditional" computer anyway - this sentence would have sounded absolutely stupid just a decade ago, but now there are people who don't use a computer anymore - then the choice is obvious: use whatever you are running already.
I developed embedded MCU firmware using Windows (95, 98, 2000, finally XP) for over 15 years, and decided to switch to linux in 2014, because I saw my productivity would only go down with Windows 7 - because it didn't offer anything new, but only more distractions and things that changed for no reason (before that, I liked Windows due to it's stable mindset and stable APIs, and the non-changing UI experience). In the end, my productivity and capability went up with linux, but that cannot be attributed to the choice of linux itself; it has to do with the phase of learning I was at after 15 years of working with MCUs with their IDEs on Windows. I might have been able to keep using Windows and still change my workflow significantly, but this is up to speculation.
-
Just to chime in: I normally develop on MacOS, which has the pleasing (?) combination of mass-market GUI and underlying unix layer. This is largely because I'm old and comfortable with command-line tools and ancient editors (Emacs!) Many of the vendor IDEs will not run on MacOS (Atmel Studio, Keil, Cypress PSoC Creator, ...) Sometimes this is only a minor problem, other times the vendor IDE is the only access to proprietary programming tools...
I don't see any problem with staying on windows. I like the unix shells and core CLI tools a lot more than the windows shells, but that ceased to be a problem quite a long time ago, and is even less so now that Microsoft has the "linux shell" support.
-
The problem with windows10 is you need online, constant updating, and using telemetry.
Linux is free, i can assume they dont need all those things running to program a chip ?
Got me intrested.
-
There is nothing stopping you disconnecting windows 10 from the internet. Most updates are security related. We have updates now like never before and this has come in line with increased connectivity and the security risks this poses.
-
I use Win10, Linux, and MacOS but spend most of my time in Win10. It is the only OS that runs everything I need. Linux does a lot of things, but is distracting for someone like me that will never be a system engineer. I do love Linux for my projects that need to run on limited hardware.
I don't care if I have to pay a tiny sum for Windows and I don't care about the updates - I am always connected to the internet.
-
I'm in the "use what works best for you" camp - I prefer Windows but if you prefer Linux/FreeBSD/MacOS/etc then go for it - I don't think the OS choice has as much impact as the "target device" and "tool chain" has. YMMV.
That said, I just did quite a bit of uboot work with i.MX6 using WSL and it was great (setattr is your friend) when combined with VS Code and the WSL extension.
TonyG
-
Windows should be detected by your antivirus.
-
Me? Windows.
Same as Simon above with Atmel Studio.
MPLAB does weird things on my monitor and I tinkered with the DPI settings to no avail.
Not sure why Microchip doesn't fix that problem. It makes the MPLAB near useless.
Atollic works fine on my high DPI monitors so I am not sure why Microchip can't get that sorted.
But who knows in the future I may be forced back to Linux (I used to use it as a daily driver for years so no worries)
-
Not sure why Microchip doesn't fix that problem. It makes the MPLAB near useless.
Software development as a whole is in a disastrous state these days. Just my humble opinion though.
-
At work Win 10, we heavily depend on niche Windows applications for the whole development lifecycle, even though we use MYSYS for our compilation environment.
For most of the stablished industries changing or altering the development lifecycle toolchain OS is not doable, as it would mean doing a lot more yourself or losing competitive edge by diverting more resources to developing your own tools. Though we definetively have our own development and design tools.
For personal use I use Linux.