Windows Subsytem for Linux Support! #65
base: master
Are you sure you want to change the base?
Conversation
Installing OpenOCD on Windows is kind of gross, so this. Not quite finished yet, but it's close. Things to check in the future: - file permissions for this script - whether TI's ICDI/JTAG/DFU/SWAD drivers are needed w/OpenOCD (I think yes)
Three things that still need be resolved/investigated: - /run/screen (?) needs to be set to 777 and this requires sudo; not sure if this is a one time thing - the detect-board routine for WSL is not very robust; it'll likely choke on multiple devices - ICDI drivers; not sure if required as mentioned earlier Other than that, things are looking shiny!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less bash pls!
We'll get there this summer hopefully 😢 |
@dimembermatt As of last November, USB device support for WSL2 was still kinda sketch; I haven't really kept up with it but it doesn't look like things are much better for arbitrary devices. This is basically the only roadblock left. In the past I got around it by shelling out to the Windows version of I was hoping that WSL2 would let us access arbitrary USB devices (which we need for ICDI — serial actually gets passed through even with WSL1 which is why But really, after having spent a lot of time trying to do platform support by shoving Linux everywhere, I think ultimately it's probably best to either put time into making guides for native Windows installations (all the tools we use have native Windows binaries) or just have people use VMs. All of the things I tried to do ending up being incredibly brittle and I think they'd require a lot more time to actually get right and then, way more maintenance effort than is justifiable. I'm partial to just using VMs because:
That said, I'm happy to help however I can with whatever approach you end up choosing. |
It looks like that WSL 2 will eventually have USB support, but I'm not optimistic about the timeline for that. I'm on board with you on the VM approach. A unified UX will make it a lot easier for us to maintain documentation and iron out or identify bugs. I'd even argue that Mac users should also use a VM, but I don't know if it already works well enough as is now. I'll leave that as a possible extension at the moment. I was having some hiccups along the way getting make flash to work ( It doesn't look like I see the setup instructions for using this with VSCode, is that somewhere else not on the Rasware repo? (also, tlt?) Adding @RosannaR to the conversation, I wonder what bugs in general were you experiencing when trying to get this work? Were you using WSL or VirtualBox? I remember we were having some issues with ninja. Finally, was there anything else you were looking at fixing/extending? I'm thinking the current list of priorities this summer are:
It's a pretty big project considering my other priorities this summer, so hopefully Burak frees up some time later on to help throw more bodies at this. |
So actually, I think things worked pretty okay for macOS last year but I might be misremembering. If y'all end up using But yeah, VMs for macOS wouldn't be so bad.
So, are you using Rasware with it's I kind of botched things last year and I can't actually find where we ended up putting install docs; I think they were in a thread in the slack that's since disappeared. 😕
So I'm not sure where the setup instructions went but for Linux with VS Code it's just:
And it should build the container, install all the plugins it needs, make the files it needs for There are a bunch of things Not sure whether it makes more sense to use
Most of my qualms with Rasware have been tooling/build system related. Outside of build system things, I've wanted to update Rasware to actually use hardware PWM now (since we don't really hand out LM4Fs anymore) but this is super unimportant. The other thing I've wanted to do was more in the way of automated testing but I never really got to making very concrete plans for how to do this and it'd be a pretty bad use of time at this point.
This has definitely been brought up before but: it's actually super viable to just give people a VM image, as a backup. Hopefully you have better luck than I've had, but I've tried to do install scripts many times before and I've found good install instructions to be more resilient/less likely to need to be updated.
I actually think Rasware is pretty good about this as is, but it'd could be good to maybe put the docs up somewhere a little more accessible than the GitHub wiki for this repo. The examples are good too but documenting them more never hurts. |
I was using the Thanks for reminding me that we were looking at VM images with the thing already set up; I think that this would probably be the easiest way to get things running, especially with the steering-committee's bandwidth. For more devious purposes, this would be very beneficial for hooking a new generation of students on [OS]/[code editor]/[shell]... any preferences for this? @benbelov would probably vouch for Manjaro and zsh. Of course, I'll leave the manual instructions for the Arch inclined to get setup on. I'm thinking of Ubuntu 20.04 for this prebuilt image, but it might be useful to have a 32 bit version since I don't know if some students will have very old laptops. Hopefully I can get an image set up and OS specific instructions for getting it working on VirtualBox by the end of this week. Will send it out to Wendy and co to get some feedback. |
I just wanted to clarify:
This was actually before my time but RAS used to have RASBox, which was VM images with Arch and vim, I think. Realistically though, I think Ubuntu + are your best bet.
I'd be very surprised if anyone showed up with a 32-bit laptop. |
This isn't quite ready yet: I want to do a little more testing and I need to finish/polish the install guide for WSL. So, don't merge this yet!
I'm making this PR now so people can kick the tires a bit and see if it works.
This also is rebased against the build-system branch; it isn't exactly required for WSL support but it should be merged before this PR.
This: