cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer is now the only way to program most of the newer STM32 uControllers. Has anyone been able to get it to work on Windows 10 with OpenJDK 8? I've spent a lot of time on it with no luck.

_dalbert
Associate III

Given that Oracle has changed their Java license to a commercial license that many developers and companies will be reluctant to accept, the dependency of STM32CubeProgrammer on it is problematic. Although the documentation suggests that it will work with OpenJDK if you install OpenJFX, I have not been able to get that combination to work, and judging from the commentary on the internet, a lot of developers are having the same issue.

Since STM32CubeProgrammer is now the only STM tool that supports newer STM32 uControllers for UART flashing, please consider releasing detailed instructions on how to make it work with OpenJDK.

1 ACCEPTED SOLUTION

Accepted Solutions
Nawres GHARBI
ST Employee

hi @berendi​ 

The main reason why STM32CubeProgrammer is not working with OpenJDK build you tried is the lack of OpenJFX library which is the Graphical Framework which STM32CubeProgrammer is based on.

Some OpenJDK builds contain JavaFX such as Zulu JRE 8.0 available for download here : https://cdn.azul.com/zulu/bin/zulu8.44.0.13-ca-fx-jre8.0.242-win_x64.zip

Instruction for install and usage with Zulu JRE 8:

1- Download Zulu JRE 8 and unzip it in your machine, in my case zulu8 is unzipped in this directory C:\zulu8.44.0.13-ca-fx-jre8.0.242-win_x64\

2- change C:\zulu8.44.0.13-ca-fx-jre8.0.242-win_x64\bin\java.exe setting to fit high resolution screens settings : 

   * Right click on C:\zulu8.44.0.13-ca-fx-jre8.0.242-win_x64\bin\java.exe

   * Select Compatibility Tab -> Settings and tick override high DPI scaling behavior [System]

3- Install STM32CubeProgrammer with Zulu JRE 8 : 

   * Open a CMD with administrator Privilege.

   * install STM32CubeProgrammer => C:\zulu8.44.0.13-ca-fx-jre8.0.242-win_x64\bin\java.exe -jar SetupSTM32CubeProgrammer-2.4.0.exe

 

4- Launch STM32CubeProgrammer with Zulu JRE 8 :

   * Open a CMD (no admin needed).

   * CD STM32CubeProgrammer location : cd "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin"

   * launch : C:\zulu8.44.0.13-ca-fx-jre8.0.242-win_x64\bin\java.exe -jar STM32CubeProgrammer.exe

View solution in original post

12 REPLIES 12
berendi
Principal

STM32CubeProgrammer is now the only way to program most of the newer STM32 uControllers

Which ones do not work with openocd?

Built-in JVM has been promised quite some time ago https://community.st.com/s/question/0D70X00000763nW/oracle-jre-license-impact

@Jerome B​  , any news on this?

JW

Should really have teams capable of writing native apps on a couple of platforms... multi-billion dollar corporation, and all..​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
turboscrew
Senior III

WHAT! Why?

Doesn't the older tools work anymore? If not then why?

With older tools, I mean Atollic TrueSTUDIO and Eclipse + GDB + OpenOCD.

Respectfully, that doesn't answer the question. ST has deprecated their older tools for flashing and replaced them with a tool that has a dependency on a third party license that is now both commercial and confusing. My question is how to make the tool work with OpenJDK (which the notes suggest it should, but I have not been able to do). ST should release either clear instructions for use with OpenJDK or remove the suggestion that it can work with it in order not to waste thousands of people's time trying.

OpenOCD is a great tool, but not super user-friendly and it was last updated Jan 2017.

That doesn't answer the question: has anyone been able to get the STM32CubeProgrammer to work with OpenJDK.

ST has deprecated their other tools (e.g. Flash Loader Demonstrator) and the official replacement is STM32CubeProgrammer.

It's a very nice, friendly program, but it appears to have a dependency on Oracle Java whose license is now commercial and confusing.

I'm aware that there are other options, but (in response to your suggested alternatives), I don't want to change my entire development environment, just a basic, supported tool to flash targets. I can cobble together a solution with OpenOCD (never Eclipse, but that's a topic for another thread), but I shouldn't have to; ST's tools folks should provide a flasher that doesn't require use of third-party commercial software...it's not that difficult.

The old website was last updated in 2017, but development is going forward.

ST distributes its own OpenOCD build as part of CubeIDE, which can flash and debug even the dual core STM32H7.

I was just wondering if they have done something to the flashing interfaces. I don't give a ... what STM recommends.

Note that STM tools are really mostly for themselves. They just let other people to use them too. But it's their own need that actually drives the development. I rather try to keep independent from any single party. And to my knowledge, CubeIDE and the new tools are still so buggy that I'd rather stick with the older tools whose major problems are already fixed.

> STM32CubeProgrammer is now the *only* tool that supports newer STM32 uControllers

[...]

> I'm aware that there are other options

Are you aware that those two sentences are contradicting?

> a flasher that doesn't require use of third-party commercial software

You mean it should not even require Windows?

OpenOCD for Linux then?

Theoretically you don't have to cobble anything, OpenOCD is GPL licensed software, therefore the version bundled in STMCubeIDE should be available in source form, complete with instructions to build it.