2024-07-16 12:42 PM
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:
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?
2024-07-17 01:15 AM
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)
2024-07-18 05:24 AM
good news we succeeded fixing it for this release
https://marketplace.visualstudio.com/items?itemName=stmicroelectronics.stm32-vscode-extension
2024-07-18 03:04 PM
@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.
2024-07-19 07:15 AM
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
2024-07-19 12:09 PM
@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.
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.
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.
2024-07-19 01:04 PM
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
2024-07-22 01:31 AM
Thanks @Rob.Riggs for the details we are trying to get the issue
2024-07-23 02:49 AM
Hi @Rob.Riggs
We have some more questions please
2024-07-23 10:37 AM - edited 2024-07-23 10:44 AM
Looking at this more closely, this is coming from Microsoft's Embedded Tools Extension. The STM32 VS Code Extension provides no way to easily open an existing IOC file directly from the VSCode UI.
So, to be clear, the problem with STM32CubeMX hanging when launched from VSCode is occurring in Microsoft's Embedded Tools Extension, not in STM32 VSCode Extension.
@Nawres GHARBI Please fix STM32CubeMX to work with Microsoft's Embedded Tools Extension or work with Microsoft to fix their embedded tools extension to work with STM32CubeMX. Also, please enhance the STM32 VSCode Extension to provide a function similar to vscode-embedded.openWithStm32CubeMx so that users can easily open existing IOC files. In fact, the default action when clicking on an IOC file should be to open the file using STM32CubeMX when the STM32 VSCode Extension is installed and enabled. That is not the case today.