cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX display resolution problem

misagh
Associate III
Posted on June 27, 2017 at 16:27

Hello ST team,

I think the STM32CubeMX code generator has a big problem with screen resolution. I'm using a laptop with 4K display, so my CubeMX appears like following screenshots, which are annoying in many cases: Almost half of most table rows appear vertically, the texts sometimes are too small or too large and so on:

0690X00000607RtQAI.png0690X00000607UdQAI.png

Can this problem fix?

Bests,

Misagh

#cube-mx #stm32cubemx
13 REPLIES 13
fauvarque.daniel
ST Employee
Posted on October 24, 2017 at 10:14

The uiScale Java option unfortunately works only with Java9.

Another possible option if you are on Windows 10 is to change the compatibility mode.

Right click on STM32CubeMX.exe and go the Properties -> Compatibility screen

Change the scaling behavior from Application to System.

We'll see if it is possible to force this option by default at installation time

Regards

Daniel


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.
Posted on October 24, 2017 at 13:10

Unfortunately I don't have this option in my windows 10.

In compatibility tab I have 'disable display scaling on high dpi' option which doesn't effect on application UI.

Regards,

Misagh

Posted on October 24, 2017 at 16:09

Hello Daniel

Thanks a lot. The compatibility setting sorts out the problem and STM32CubeMX is now displaying properly!

Best regards,

Daniel Debrunner

fauvarque.daniel
ST Employee
Posted on October 25, 2017 at 19:21

I found another possible workaround to the issue (Warning it is a hack :) )

The actual problems comes from the manifest file embedded in the java.exe where it declares to be dpiAware.

So the trick is to change the manifest to set dpiAware false.

  • locate your java.exe binary (generally in C:\Program Files\Java\jrexxx\bin\java.exe)
  • copy java.exe into javanodpi.exe (better safe than sorry)
  • edit the Manifest with a resource editor like XNResourceEditor
  • change dpiAware, it should look like <dpiAware>false</dpiAware>, on my java.exe it was in the last section of the file
  • run CubeMX using
    • javanodpi.exe -jar STM32CubeMX.exe
    • Don't forget to put the right path for the 2 exe in front of the names, you can create a .bat for that

FYI I've forced <dpiAware>false</dpiAware> in STM32CubeMX.exe manifest but it doesn't work because STM32CubeMX.exe calls java.exe

Regards

Daniel


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.