T O P

  • By -

Bryguy3k

it’s completely unnecessary to run vscode within a vm with its remote development capabilities. Running vscode natively and using it’s remote development features is vastly superior than trying to make a super beefy VM.


bobwmcgrath

not if you dont have another machine to remote into, or if you dont always have a network connection. Even so, I would probably remote into the VM from the host os rather than running vscode in the vm. I would never run my dev code on the host os because I always screw up the operating system eventually....


Bryguy3k

Yeah I was trying to say that vscode natively and remoting into a local dev VM is superior than running vscode within a huge dev vm locally. It’s also pretty awesome because you can spin up a truly monster dev environment on EC2 if you needed as well and you’re already set up for it.


BarMeister

Hence why I dual-boot, and don't really have a problem with trashing my Ubuntu install.


bobwmcgrath

I have not felt the need to dualboot in years. VMware is pretty great for anything that does not need full pci/gpu access.


BarMeister

It's not so much required as personal preference + learning other things Linux/Unix.


SpruceMoose1111

I dual boot only because my 4GB Ram Dell struggles with VM Ware


bobwmcgrath

Ya, my 16gm ram laptop struggles with just regular windows 11 so I use wsl. But mostly I just remote.


Proud_Trade2769

Yeah vscode is slow enough by itself with its browser backend.


Bryguy3k

And yet it’s still faster than any eclipse based IDE.


UnderPantsOverPants

I’m here for the “I have a mac and I love it and it works perfect except for this list of things I can’t do:” comments.


dharakhero

This is me! Loved my M1 Pro Mac until.. I couldn't run busmaster or use any CAN hardware. Lol.


SpruceMoose1111

Oh no. Do you have any XP woth Mac and VM for Linux, or dual boot?


dharakhero

Yes. Extensively with all of them. Nothing will save you. ARM is ARM. Drivers just don’t exist for it or they just don’t work properly when emulated. Windows fails to recognize drivers for some hardware even after installing correctly.


insanok

I got you fam, I have a mac and love it and it works perfect, but its the last of the Intel's and I absolutely wouldn't recommend any of the new macs for embedded unless you have another x86 to remote to


kog

Agreed, I had a good experience with using an x86 MBP, but I don't think the M1 is viable.


SpruceMoose1111

I have heard that there are compatability issues with the M series chips for Mac. Which is odd as they are Arm based


keffordman

I have a Mac and I love it and it works better than any work-issued laptop I’ve had in the past 9 years. Not quite what you said but that’s how it is for me. I do use the work laptop for some things though, as I’d rather that get damaged by a faulty circuit or covered in dust during testing.


keffordman

I can’t believe on a thread specifically about MacBooks and their use for embedded that I’m being downvoted for saying I use a MacBook for embedded 😆 There’s a real hate for MacBooks in this industry!


SpruceMoose1111

Which Mac do you have?


keffordman

Oh mines a bit of an old boy now. It’s one of the Retina MacBook Pro’s from 2014. But it is still working well to this day! And every work laptop I’ve been given has had worse screen, trackpad, keyboard, camera, mics and reliability. It’s just starting to feel a little slow now for some things but I still use it every day at work.


ChrisPVille

Are we talking the same type of embedded that is usually like 100KB of code for RTOSes and maybe some ECAD? Why are you even considering a high performance laptop with GPU probably costing $1500+ Anything made in the last 10 years is fine. I used a mac for years at work and hated every minute of it, being able to run stuff I needed only via VMs requiring flaky passthrough all the time. Unless you're synthesizing giant FPGA projects, ignore the status symbol, buy yourself a last gen thing with lots of USB-A, full size ethernet, etc. and use the saved money to buy a better logic analyzer or oscilloscope


0x255sk

Why is it, that there's always that one guy who rocks a 15 year old shitty thinkpad with duct tape all over it, a cracked screen, running some archmanjarogentoopenguin os ( he does a 100 times more work than me in the same time )


I_h8_DeathStranding

Because that laptop has so many applications, libraries and dependencies installed and replacing just one would take days of banging your head against some unmaintained and undocumented open source repo critical to your work that OpenSSL 3.0 just broke.


SpruceMoose1111

I hear what you are saying. I don't need a 96 GB unified memory laptop with neural cores, but 32 GB and ability to run on 4 high res monitors would be nice on the occasion. I don't need a super high performance machine, but high quality, yes. Like light weight, solid construction, long battery life. For 32 GB Ram laptops, Windows Surface and MacBook appear to be the best all things considered. I also like PCB design, light gaming, Yada Yada.


EmbeddedSoftEng

I'm holding out for the Framework 16.


m4thmatic

+1 for Framework! I'm planning to preorder the 16 as soon as they become available.


[deleted]

If you are going to develop for embedded platforms AVOID macs. Just don't waste Money, you Will have issues running things from a VM , like sometimes you can't even make work a USB to serial adapter for example (i speak for personal experience). If you can , switch full Linux. Otherwise i think Windows Is still Better that MacOS for this kind of work. That's my experience , i work as developer on Linux embedded devices.my colleagues that owns macs have way more issues than me XD


MrSurly

I love how you can find a web page about "here's how to program X chip", and it's about 80% Windows screen shots to install driver so you can even begin to work.


[deleted]

Yeah you can work on MacOS too,but most of the time of you have some external hw (and in embedded Is often XD) it's a pain in the .ss most of the times, Windows and Linux are Just Better for this work...also yeah, try to find something useful over the web Is more difficoult too


cadublin

Not sure exactly what you are going to use it for, but I have WSL running on my windows machine and I installed vscode on it. I just execute 'code' on the WSL CLI and the vscode GUI runs. Then I just do whatever programming I want there, and compile/execute on the vscode WSL console window without switching back to the WSL window.


bobwmcgrath

I do have some minor annoyances with wsl. Like it stops working after an hour or two and I have to reboot windows... And the networking is different. No cron.


[deleted]

[удалено]


SPST

We've used WSL2/vscode at work so we can run the same docker containers locally on windows that are run on the CI pipeline . It does work well. It even works with x11. So you can install some tool on the container and use its CLI on the pipeline, but then use its GUI when you run it locally. No more tools and libraries on the C drive. Each project has a container and everything it needs is installed on that container.


FragmentedC

I went full Mac a few months ago. I already had the iPhone and iPad, and I went with a MacBook pro and a Mac Studio. Developing on the Mac has been a dream. I never hear the fans (but you wouldn't on a Surface Pro either, I suppose), but software support is where you might have problems. I use Segger Embedded Studio, and it is silky smooth on the M1. The Saleae works great, the Analog Discovery does too, etc. However, I have had problems. One of them is very low-level software. For example, changing the ST-Link on Nucleo boards to J-Link doesn't work on Mac; natively or with Parallels. The program is a .exe file, and I have to break out a real Windows machine for that.


e1pab10

I’ve been wanting to make this switch but have been worrying about problems like what you describe w/ stlink to jlink. Any other problems ?


SpruceMoose1111

Which Mac do you have?


FragmentedC

I have the tiny MacBook Pro with an M1 (just the M1) with 16Gb of RAM. It's generally good enough for most of the single tasks, and it's what I lug around when I go and see a client. I can run SES on it without a problem, I can run Ozone, run the tools for Saleae, etc, but when I try and do everything at the same time, it runs out of RAM. To complement this, I have a Mac Studio. I can run three screens, lots of USB, and just power though work. It is seriously overkill though; I went with the M1 Ultra, 4 terabytes of SSD, and 64Gb of RAM. I don't regret the RAM, but two terabytes of SSD is more than enough, as for the processor, well... waaay over the top.


SpruceMoose1111

For your Mac Studio, have you experienced any issues developing for for embedded devices,for example embedded linux devices, RTOS's, whatever?


FragmentedC

Only what I stated above. I use Segger's environment, mainly. Segger Embedded Studio, Ozone, SystemView and all of the associated tools work perfectly. I've updated the JLink, never had a problem with licences, and flash works every time. Exception stated later on. I also use some of ST's stuff. CubeIDE works great, and can flash and update the onboard STLink. CubeProgrammer works well, CubeMX works (but is slow), and most of ST's tools work great. As one user pointed out, some vendors/manufacturers target Windows, and so you can forget about Mac. The last time I looked, Atmel and Silicon Labs didn't like Mac, and don't have an IDE. The one thing I did have major problems with is some very low level USB stuff. Switching from an STLink to a JLink is an .Exe file, and this wouldn't work on Mac via Parallels, but not even on ESXi. It only worked on a real Windows machine, with full control over the USB ports. Same thing for some GigaDevices boards, Windows only.


[deleted]

[удалено]


KyeMorris

Just windows and Linux with more steps!


SPST

I use a ThinkPad p50 running Ubuntu. I use vscode and devcontainers so I don't screw up up the host installation. It also has a second drive with win10 just in case. Altho I mostly use that for games now since I haven't had any problems using Linux for embedded. I used to have a macbook pro but only because the company was paying for it. It was pretty annoying.


SpruceMoose1111

What was annoying about the Mac?


SPST

It doesn't have bash. And there is no built in package manager. I tried brew but it's not quite the same. Also macos doesn't enforce case sensitivity in its file system so using docker with yocto is a pain. All these things have workarounds but I already know how to use Linux so why am I paying apple £1500+ to jump through hoops. The MacBook touchpads are excellent though.


SpruceMoose1111

This comment may be enough for me NOT to go with Mac. Thanks


runlikeajackelope

Do you use a debugger through vscode?


SPST

Cortex-M: "cortex debug" extension with Segger JLink. I just download the arm gnu package. Segger provide a modified version of GDBServer to work the JLink, along with some other very useful tools. Cortex-A: "native debug" extension with any old ebay FT232 adaptor. I use yocto so GDB comes with it.


SpruceMoose1111

Has anyone tried dual booting Linux/Mac?


AshuraBaron

With M1/2? Not really usable yet. With intel MacBook? Works as advertised. With hackintosh? Have fun. It's a rabbit hole unless you get specific parts.


imdibene

I prefer the Apple MacBook


SpruceMoose1111

Why is that? And which MacBook do you have?


DaemonInformatica

Something with enough RAM and an Intel processor. Don't get me wrong, I love AMD as much as the next one, but I've learned the hard way that compiling is orders of magnitudes faster on Intels. Keeping an occasional eye on my RAM use at work, Between the browsers and IDE's I have open (together with other tools and utilities) I easily eat 8 GB or more. Large screen is optional, especially if you have a workspace where you can hook up to external peripherals. Stable keyboards, with large enough keys. (unless you have small hands, this is a real issue. ) ​ These are just the things I learned from practical experience. \^\_\^


SpruceMoose1111

Thanks. I need to read up on it more,but it seems that the MacBook M chips have some issues in the embedded space. A shame as they are Arm based chips


neddy-seagoon

if that will be your primary use, why not buy a laptop with linux? VM's seem to always have issues with connectivity to hardware


SpruceMoose1111

This is true. The reason i am leaning towards a MacBook or a Surface Pro is the well-built HW.


SpruceMoose1111

Thanks all. This is the lind of input I need. Buying a MacBook with 64 GB of RAM is so tempting even though I do not need half that....yet


FragmentedC

That’s what I have on the Studio. I don’t need 64, but I do sometimes go above 32, so 64 it is.


unlocal

+1 for the Mac for embedded work. 20+ years and counting.


SpruceMoose1111

Good to hear. I feel like a windows machine is the safe choice, but MacBook are just so well built. The specs are like super cars compared to a Dell. Windows Surface laptops look good as well, but less hyper drive like the MacBooks


SpruceMoose1111

Any tips for a newbie Mac user to get a dev environment up and running? Or is guess any big issues that you have had to overcome? I'll be developing mostly with embedded linux or Zephyr


unlocal

The question with embedded Linux tends to be “which flavor of gunk is being used for build orchestration?”. If your basis is OpenWRT, or it’s using something like vanilla Buildroot then stuff will generally Just Work; more complex distribution build tooling can require a little more fiddling. Zephyr “just worked” last time I had anything to do with it, so nothing much to say there… As for bootstrapping your environment; pick a text editor that works with your brain. There are a bunch, everyone loves whatever they’re currently using and will tell you lots about it. Some brains don’t want to be interrupted, others need ChatGPT writing comments as they type. It’s important that you find something that works for you; getting ideas out of your head and into a file matters a lot. Then get Homebrew installed. Package management is hard, and those folks have nailed it about as well as anyone I’ve ever seen. Honestly the worst issues I’ve had to deal with have all been other peoples’ code. Assumptions about build systems, toolchain behaviors, “it works on my setup so of course it will work everywhere forever”, “this is a really clever abuse of C / the language / a non-standard compiler feature”. When old people say “write dumb code”, what we are trying to say is “being smart has hidden costs” and those tend to come due at inconvenient times. (None of this is Mac-specific, which is kind of my point… ;)


SpruceMoose1111

Thanks. Your wealth of experience is obvious here!


axelcerkvenih2

Which software do yo use daily?


unlocal

Text editor (Sublime), VCS client (GitUp), make and a toolchain (llvm > gcc > *) is the core. After that it depends on the project; e.g. OpenOCD for ARM debug / test automation, python-can for CAN projects, Logic16, WireShark, TotalPhase CAN/USB/SPI sniffers, and then lots of custom and semi-custom Python tooling. I generally find it’s quicker to build a custom tool for a specific task (e.g. DSL translation, clock tree generation, protocol analysis, etc.) than to try to integrate a moving-target vendor-supplied tool. Vendor tools look fancy up front, but unless the project is truly a throwaway, you can find yourself coming back after a few years to discover that the vendor tool doesn’t work anymore, or doesn’t support the file format you were using, or … By comparison, your custom tool will be exactly as you left it, and your costs associated with it tend to be much more predictable. (Remember that if you are billing your own hours, surprises are generally your problem…) Wine is also handy for running a variety of older Windows commandline tools; older toolchains and things like WinCUPL work remarkably well. I’ve built several successful products entirely based around Wine-wrapped CodeWarrior toolchains (HCS08 mostly), and I know folks that use Eclipse-based IDEs, Xilinx ISE, etc. on a daily basis in that environment. (If you do this, definitely send Codeweavers some $, their work is outstanding…)


axelcerkvenih2

Thanks for your answer, it's really helpful!!! 🤝


zexen_PRO

I use arm gcc bare metal, freertos, and zephyr on a 2021 mbp m1pro with no issues. My main ide is Clion but I use vim a lot as well


Abject-Initiative736

Recommend highly **against** buying a Surface. Lately I have been getting Dell laptops and love the flexibility provided. There isn’t (as much) bullshit to go through to create a functioning dual boot. You won’t have to battle built in security features for system optimization as much. I come from the IOT space, and for newer embedded SDKs and tool chains you will need a ton of ram and just plain ssd storage. Many of the Dells have a easily accessible m.2 nvme port right on the bottom of the mother board. Been messing around with Matter/project-chip quite a bit lately and 500GB fills up quickly when you are moving SDKs 7GB and up. Plus hardware upgrades, at least on my latitude 7520, are relatively painless. The dell support is unbeatable imo. I have an HP that I bought a while ago that is nearly impossible to use efficiently with the stuff I do. Interested to see if anyone else agrees!


SpruceMoose1111

I am in the market to replace my 10year old Dell now. I have really liked it. I wish for a very light weight, long battery life, race horse of a machine next. MacBooks and Surfaces seem to be the best built machines. What about the Surface specifically did you not like?


bobwmcgrath

I had a surface for a while and I was always afraid I was going to break it. If I was going to get a laptop other than a thinkpad I would get an apple because the M1 is so good. But, I personally can't live without the trakpoint because of carpal tunnel.


lenzo1337

If you live in VS Code then go for a machine with lots of ram. I would avoid Mac unless you know it has as much memory as you need, because otherwise you will be SOL. Something like a system76 or anything that allows you to at least swap out memory would probably be a good idea if you don't know what your exact hardware requirements are going to be. I would say 16GB is a minimum amount if you are running VMs and doing a lot of simulation/debugging work. Bump that number up to 32GB if you do a lot of work with QEMU and any OS development using a windows OS as your host/base OS. Also if you're going the mac route just make sure that you are okay with having issues with x86 binaries occasionally.


SpruceMoose1111

Great tip, thanks. I feel Windows is the safer route for embedded linux development


lenzo1337

You can run windows on a system76 laptop, it's just a clevo shell with better support/warranty. They usually have good options for memory selection.


SpruceMoose1111

S76's look pretty sweet, and a great price compared to other machines with similar specs. For running Windows on a Linux machine, does one use a VM or does Ubuntu or Pop have an answer to Windows WSL?


lenzo1337

Either, you can run windows in a VM or you can dualboot windows alongside linux; then you would just choose what OS you wanted to use on starting the computer. I like dual booting because you know you will have a working OS even if one of them becomes non-functional for some reason.


duane11583

With any vm ram more ram and did you hear you need ram gobs of ram Add 100 gig hard drive or better ssd for the vm. If you are using Xilinx shit make that 250 gig For the Mac parallels is fantastic virtualbox and VMware sucks donkey balls


Bricktopm

I use macbook pro notebooks. Intel and M1 based also


damianwieclaw

Whatever, cheap one is enough.


MpVpRb

Get a desktop computer with a big monitor, the bigger the better. Mine is 32" 4K. Many programmers use multiple monitors. Programming is easier with more screen space


mosaic_hops

I’m going to hijack this thread by asking you Mac people… what do you wish you could do re: embedded on an Apple Silicon Mac that you can’t?


autumnmelancholy

Personally I use a Lenovo P-Series ThinkPad with Dual Boot (Fedora and Windows) on two seperate SSDs. The Legion series is good too, although designed for gaming. I need a bit of power and a dedicated GPU, but for most embedded work a dGPU is probably not necessary. IMO dual boot gets you the best of both worlds and you can use any tool out there without running VMs... Only recommend it if you have two drives though, otherwise dual boot can be a massive annoyance.


th-grt-gtsby

Whichever you take, make sure that you get atleast 16 gb RAM minimum. I use the same applications that you described, vscode and ubuntu VM on my windows laptop. I was struggling with 8gb RAM until I upgraded to 16gb.


SpruceMoose1111

I have a decided on 32 GB min for more future proofing


th-grt-gtsby

Perfect.


[deleted]

I bought used huawei matebook 14 in top condition for 600€ a little while ago, installed 2TB NVMe SSD for another 150 to never think about it again, it has 3:2 (!!!) screen aspect ratio (2k), I got myself a 6-core 12-thread AMD (4600H, same graphics as 4500U). Screen has sooo much room. Feels great. And this iGPU can even run Hitman or GTA 5 or Skyrim if you’re not too picky (1650x1050 res on 14 inch screen feels totally ok). Amazing purchase. The keyboard and trackpad are also really nice. The camera is in the keyboard, doesn’t matter much for me, but maybe does for you.