cancel
Showing results for 
Search instead for 
Did you mean: 

Problem importing from STM32CubeMX to System Workbench

Clark Sann
Senior
Posted on May 07, 2018 at 04:00

I have been importing CubeMX projects into System Workbench (SW4STM32). It's been working great, a real time saver. I first open System Workbench and select a workspace. Then using CubeMX I configure the project and generate the code. Then when the code generation is done and the dialog window opens, I press the Open Project button. In the past this has nicely imported my CubeMX code into SW.

It no longer works. Now after I press the Open Project button, I get a new dialog box with the following error message:

Unrecognized option: -d64

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

What has gone wrong?

Clark

#stm32cubemx-eclipse-sw4stm32
1 ACCEPTED SOLUTION

Accepted Solutions
Nawres GHARBI
ST Employee
Posted on May 16, 2018 at 17:10

Effectively it is a wrong Java version, the 1.80_x version is needed. 

You can download it from this link 

https://java.com/en/download/help/mac_install.xml

 

View solution in original post

10 REPLIES 10
Clark Sann
Senior
Posted on May 07, 2018 at 16:10

Here is some additional information about this problem:

1. I am using OSX 10.12.6

2. Before this problem began, my CubeMX repo was in my home folder and the CubeMX project was stored somewhere in my Documents folder.

3. Before it stopped working I moved the repo location to a folder within my Documents folder. I also moved the CubeMX project folder to another location. I did this because the Documents folder is automatically placed into the cloud and is available on all my machines.

4. After that, I noticed this problem. I do not recall if it occurred immediately after the relocation or occurred later.

5. I cannot recall making any other changes before the problem occurred.

6. On one of my other machines, setup identically to the first machine, the problem does not occur. On that machine, the project import into SW4STM32 worked before

and after

I moved the repo and project folders.

7. I am using the latest version of CubeMX, SW4STM32, and Eclipse.

8. I deleted the CubeMX app and reinstalled it on the defective machine. That did not help.

I hope this helps you diagnose this problem. Good luck!

Posted on May 14, 2018 at 10:24

Hi

acsann

‌,

after many test I could not reproduce your issue, could you please attach the CubeMX and SW4STM32 logs please

Posted on May 14, 2018 at 20:04

Hello

Here is the STM32CubeMX.log I found in a ~/.stm32cubemx folder. I made two attempts to import a project into SW4STM

On the first attempt, I created a new STM32CubeMX project named Test1. When I attempted to import it into SW4STM32 I got this error message:

On the second attempt, I opened an existing STM32CubeMX project named GPIO_1. When I attempted to import it into SW4STM32 I got the same error message.

Neither of the two tests created an Eclipse project so I have no project logs.

I did find an eclipse log file in Window / Show View / Other / General / Error Log. The errors in that log occurred prior to running my tests. I have run the tests again and have verified that no new logs are created when I attempt to import CubeMX projects.

I hope this information helps you. Do you think I should uninstall the SW4STM32 plugin and reinstall it into Eclipse? If so, can you tell me how to do this?

Thanks for your help!

Clark

________________

Attachments :

STM32CubeMX.log.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxdW&d=%2Fa%2F0X0000000b0N%2FZINoTn0QHTJgYLerRToGLRTY9i6OXJcVJ4bn8BMWDs8&asPdf=false

Screen Shot 2018-05-14 at 12.57.18 PM.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxTs&d=%2Fa%2F0X0000000b0J%2FCQ7LmadnpSHggMko.U3X8hvHa.ICLg7w6U5CAoSQ2yg&asPdf=false

Screen Shot 2018-05-14 at 1.02.05 PM.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxXB&d=%2Fa%2F0X0000000b0L%2FeCAnF6vACC3Fa11GwKOI0N8uRXHKwS7AY6tZkj0HHi4&asPdf=false
Nawres GHARBI
ST Employee
Posted on May 16, 2018 at 17:10

Effectively it is a wrong Java version, the 1.80_x version is needed. 

You can download it from this link 

https://java.com/en/download/help/mac_install.xml

 
Posted on May 16, 2018 at 15:44

Hi Clark, 

Could you please give me your SW4STM32 and JVM versions please ? 

Posted on May 16, 2018 at 16:17

Hi Nawres,

Here is a screenshot showing the Eclipse SW4STM32 versions:

I have two OS X computers…SW4STM32 is working on one of them but not on the other. The SW4STM32 versions are identical in both.

There is a difference in the Java versions on the two machines. Here are the Java versions on the non-working computer:

Last login: Mon May 14 12:42:28 on ttys000

Clarks-MacBook-Pro:~ clark$ java -version

java version '0.1' 2018-04-17

Java(TM) SE Runtime Environment 3 (build 0.1+10)

Java HotSpot(TM) 64-Bit Server VM 3 (build 0.1+10, mixed mode)

Clarks-MacBook-Pro:~ clark$

And here they are on the working computer:

Last login: Wed May 16 08:53:02 on ttys000

Clarks-iMac:~ clark$ java -version

java version '1.8.0_161'

Java(TM) SE Runtime Environment (build 1.8.0_161-b12)

Java HotSpot(TM) 64-Bit Server VM (build 161-b12, mixed mode)

Clarks-iMac:~ clark$

The import process used to work on the non-working computer. I do not know what caused it to stop working, but I am sure I did not update Java.

Lastly, if I need to change Java versions on the non-working computer, would you be able to give me any advice on how to do that. Installing the right version of Java is always a mystery to me. Oracles version numbering system and website is difficult for me to comprehend.

Thanks for your help!

Clark

________________

Attachments :

Screen Shot 2018-05-16 at 8.52.39 AM.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxcO&d=%2Fa%2F0X0000000b0F%2FtIpJ71.4VWfBOufsB3pRGx.zHe8iljE92BXuFS7xDiw&asPdf=false
Posted on May 16, 2018 at 17:27

Java won’t let me install v8 because I have v10 installed. I’ll google on how to uninstall v10 later. Do you have any immediate ideas?

Posted on May 16, 2018 at 17:36

Nevermind, I got Java v10 uninstalled. I’m about to install v8. I’ll let you know how importing works after I get that done.

Posted on May 16, 2018 at 17:54

Thank you. I have uninstalled v10 and reinstalled v8. And importing works again. I guess I must have updated from v8 to v10, but I don’t remember doing it. I generally detest Java enough that I try to make no changes if everything is working well.

Anyway, thanks for working as long as you did to get me back up and running!

Clark