cancel
Showing results for 
Search instead for 
Did you mean: 

STM32cubeide linux WSLg under windows10

YSell.1
Associate II

I've tried using WSLg into windows 10 to start a project using the STM32cubeide but it fails. The ide is launched but those not automaticaly download stuff, but manualy do. If click new project, target selector animation goes and then I have this message "STM32 target or STM32Cube example selection is required". So can't select mpu. etc...

What is the simplest way to start dev :

  • full linux machine
  • virtual machine
  • WSLg /w10 should work

Thx for any help.

8 REPLIES 8
Olivier GALLIEN
ST Employee

Hi @YSell.1​ ,

I understand to run STM32CubeIDE linux version under WSL right ?

AFAIK this has never been tested.

For STM32CubeIDE I recommend to use the Linux version on a native or virtual Linux machine or the Win version on Win10.

WSL2 can be used eventually instead of native or virtual linux station for linux development part. ( out of CubeIDE)

Hope it help,

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
YSell.1
Associate II

Hi, thx for your reply.

I'am actually trying to make STM32cubeide work in wsl(g) to minimize impact on my team as we are all windows oriented devs. To lower complexity I don't want my team to work in wsl using stm32cubeide cli but use the full ide experience. So I choosed to install the windows 10 insider preview that allow me to get linux stm32cubeide GUI in windows. It almost work.

https://devblogs.microsoft.com/commandline/the-initial-preview-of-gui-app-support-is-now-available-for-the-windows-subsystem-for-linux-2/

You can see on the attached image the wsl ubuntu console then the stm32cubeide on top then the failing new project setup. I can download stuff from the "install new software" pages, it can compile for M4 (targeting a stm32MP1 double core A7 / M4). I think it's not far from a fonctionnal IDE. I only need to overcome this "STM32 target or STM32Cube example selection is required".

I'am in the discovery phase of the project and new to linux. Thx for your help.

YSell.1
Associate II

I've managed to make STM32CubeIde work on WSL2. I can compile user space linux project ok. Next step is to debug. As WSL2 no longer tunnel windows serial COMs I need to debug my STM32MP157F DK2 kit using another way. Do you have any suggestion for this scenario ?

Not able to see target selector panel is known issue if relying on Walyand. Xorg is right choice. Don't know which WSL2 is relying on by default.

As Windows-oriented devs - guess what? You can just use CubeIDE for Windows, natively, without all these perversions.

CubeIDE projects can be made portable and shared between Window and Linux hosts, by following few simple rules.

YSell.1
Associate II

I've tried CubeIde for windows but I'can't compile or install linux. A message popup that tells you to switch to linux in order to compile driver or userspace linux code.

By the way on my WSL2(g) install the selector panel issue is cleared after a few commands :

$ GDK_BACKEND=x11

$ export GDK_BACKEND

and

sudo apt install libwebkit2gtk-4.0-dev

I now have a complete installation, can code and compile linux stuff.

The only remaining issue is the fact that WSL2 does not forward USB com ports to debug. So maybe I can do it with a SSH connection. I'll give it a try.

Regards

Then - use a real Linux VM (VirtualBox, VMware). They both have good USB support and share files with host.

IMHO wsl2 is still half baked, users report lot of issues on github.

--pa

Hi. Yes I know it's still in early stage of dev. I just want to have the simplest approach to dev tool installation for a windows dev team.

I was able to debug user space program using SSH so I have a working solution. I can export de underlying VM so my team won't lose time to start working. Just an import in PowerShell.

Regards.