cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX Hangs When Launched from VSCode

Rob.Riggs
Senior II

I am running VSCode on Fedora 39 with the latest STM32 VSCode extensions.

I am using STM32CubeMX 6.12.0.

First, STM32CubeMX is not the default action when clicking on the IOC file. It is rather surprising that it is opened in a text editor in VSCode. However, the real problem is that when I right-click on the IOC file in VSCode and select "Open with STM32CubeMX", STM32CubeMX starts up, begins reading the IOC file, and just hangs, never completing the action. This is all I see:

RobRiggs_0-1721158216320.png

The window is unresponsive. I cannot close it. I need to then manually find the Java process and kill -9 it to resume normal operations. If I start STM32CubeMX manually from the command-line, it works fine. I have verified that both are using the same JRE.

What is causing this and are there any work-arounds?

7 REPLIES 7
Nawres GHARBI
ST Employee

Hi @Rob.Riggs 

we are aware of this issue and trying to fix it, unfortunately won't be possible for the next release (in the coming days)

Nawres GHARBI
ST Employee
Rob.Riggs
Senior II

@Nawres GHARBI I updated the extension (and have restarted VS Code numerous times) and still see the same behavior. One new thing I did discover while testing the new extension it is that STM32CubeMX will complete loading if I exit VSCode (File|Exit) while it is stuck loading the IOC file.

Nawres GHARBI
ST Employee

hi @Rob.Riggs 

could you please clean you environment uninstall completely the extension restart VSCode and install it again

If the issue persists could you please share these information:

version of Fedora

version of STM32CubeMX

log file of STM32CubeMX

@Nawres GHARBI I removed the STM32 plugin, restarted VS Code, installed the STM32 plugin, and then restarted VS Code again. I still see the same behavior.

I am running Fedora 39.

I am running STM32CubeMX 6.12.0.

RobRiggs_0-1721415570655.png

 

VS Code shows this in Help|About:

Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:08:12.169Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.9.9-100.fc39.x86_64

I verified that I am running the new version of the STM32 plugin.

RobRiggs_1-1721416080849.png

I am including 2 log files. The first shows the log up to the point where it is stuck after being launched by VS Code. The second contains the first, but also shows the remainder which occurs after I exit VS Code which allowed STM32CubeMX to complete start-up.

Rob.Riggs
Senior II

I have found a hack to work around the problem for now. Maybe it will help identify the root cause of the problem.

Rename the executable STM32CubeMX to STM32CubeMX.jar, and replace STM32CubeMX with this shell script:

#!/bin/bash

CMD=$(readlink -f $0)
DIR=$(dirname ${CMD})

nohup ${DIR}/STM32CubeMX.jar $* &

 

Replacing the executable is necessary because the STM32 VS Code extension apparently ignores the setting below when launching STM32CubeMX. This seems like a bug to me.

 

STM32 VSCode Extension › Project Creator: Executable Path
Absolute path to the STM32CubeMX executable

Thanks @Rob.Riggs  for the details we are trying to get the issue