Skip to main content
_dalbert
Associate II
April 4, 2020
Solved

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.

  • April 4, 2020
  • 5 replies
  • 3602 views

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.

This topic has been closed for replies.
Best answer by Nawres GHARBI

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

5 replies

berendi
Principal
April 4, 2020

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

Which ones do not work with openocd?

_dalbert
_dalbertAuthor
Associate II
April 4, 2020

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.

berendi
Principal
April 4, 2020

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.

waclawek.jan
Super User
April 4, 2020

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

Tesla DeLorean
Guru
April 4, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
turboscrew
Senior III
April 4, 2020

WHAT! Why?

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

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

_dalbert
_dalbertAuthor
Associate II
April 4, 2020

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.

turboscrew
Senior III
April 4, 2020

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.

Andreas Bolsch
Lead III
April 5, 2020

Just to give a couterweight: It's not that long ago that chip manufactures did publish documentation rather reluctantly (sometimes only with NDA) for programming PALs, GALs, CPLDs, uCs, ..., so you were forced to buy rather expensive equipment from specialised companies. If you weren't a big company, even getting simple datasheets was difficult.

Now, ST (like most other manufacturers) publish (most) documents free of charge, without an NDA. And they even offer basic programming "equipment" free of charge. I do agree that STM32CubeProgrammer is far from being perfect (and I can't understand why it could be that difficult to deal with the openJFX problem) but on the other hand, I'm quite happy that it's not perfect. If all these manufacturer supplied tools would be perfect, there would be very little interest in alternatives, i.e. development of alternative, (open source in particular) tools would almost cease. That's not what we want, do we?

That open source tools lag behind regarding supported chips is clear, as the developers get the documents (and the hardware for testing :( ) only with some delay. But in many cases, preliminary support for new families turns out to be rather simple and can be accomplished in a few hours. That it takes

sometimes quite a long time to get this into mainline is a different topic.

So, looking back into the past, I'd say the present situation isn't exactly paradise, but quite close to.

Nawres GHARBI
Nawres GHARBIBest answer
Technical Moderator
April 6, 2020

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