cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cubemx stuck in ''Generating user source code''

n.serina
Associate III
Posted on April 08, 2017 at 08:29

Hello, 

I recently installed cubemx 4.20 latest version 4.20.1

I can generate the project only 1 time, later if i try to update the project by adding new peripherals, i can not able to generate the code, the whole application is stuck in 'Generating user source code '. the only way i can close this application is killing it by 'Task manager'. it happens every time. Please help 

29 REPLIES 29
Posted on April 14, 2017 at 02:22

Ferry.Chet

‌ are you using keil -mdk software ? try uninstalling it and installing a newer version.

Posted on April 14, 2017 at 10:04

Hi

Ryan.David.002

,

Do you want to send me your ioc file where you encounter your issue in order that I have a quick look at it?

By the way, could you please precise in details the process you follow when you have your issue?

BR. Eric

Pawe? Jab?o?ski
Associate II
Posted on April 17, 2017 at 11:45

Hello,

I have this same problem in version 4.20.1 under Ubuntu. Under Windows it's working. I have run CubeMX via terminal under Linux and the following logs are there, when the program will not responding:

2017-04-17 11:07:33,444 [INFO] ProjectBuilder:1120 - Time for Copy HAL[1] : 584mS.

2017-04-17 11:07:33,604 [INFO] ProjectBuilder:1314 - Project Generator version: 2.22.0

2017-04-17 11:07:33,622 [INFO] ConfigFileManager:297 - The Die is : DIE444

Exception in thread 'Thread-862' java.lang.IllegalAccessError: class stm32Families.Families (in unnamed module @0x1e9e725a) cannot access class com.sun.org.apache.xerces.internal.parsers.DOMParser (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.parsers to unnamed module @0x1e9e725a

at stm32Families.Families.getDestinations(Families.java:962)

at convertor.Convertor.generate(Convertor.java:342)

at com.st.microxplorer.plugins.projectmanager.model.ToolchainGenerator.generate(ToolchainGenerator.java:99)

at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createToolChainFolders(ProjectBuilder.java:1351)

at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:490)

at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:41)

I hope, that it will help to find the reason of problem and fix it ASAP. Where I can download old versions of CubeMX? I need to generate project under Linux.

Posted on April 17, 2017 at 15:42

I'm not using Keil.  I am using Visual GDB (bolts together GNU compiler tools and Visual Studio).  I use 'True Studio' as the output toolchain, but then don't use TrueStudio.  I just use all the C code that gets generated.

Posted on April 24, 2017 at 11:01

Hello jablonski.pawel,

to be able to reproduce the same symptoms, could it be possible that you share your ioc file ?

Could you please details your Linux distribution (Ubuntu, or ?.... Oracle JDK, or ? )

Great thanks in advance

Kind regards

Sirma

Posted on April 24, 2017 at 23:47

Hello,

here is zip with ioc file, generated files and log from terminal generated at working CubeMX - 

https://drive.google.com/open?id=0B70yM14XBbBmOGJHd2FHUVoyYVE

 . Now I see, that CubeMX is generating code just when Toolchain is set as 'Other Toolchains (GPDSC)'. In any other option it crash at code generating. I am using Ubuntu 17.04 and Java 9-ea.

Thanks

Paweł

Posted on April 27, 2017 at 15:28

Hello jablonski.pawel,

Thanks for your sharing :)

I tried it under my Linux distrib, and it went well.

I am using a slightly different ubuntu and java version.....

Just to be sure, I will set up a virtual machine to check your configuration.

I will let you know.

Thanks again for your inputs.

Kind Regards

Sirma

Posted on April 29, 2017 at 11:58

Hello

SIRY.Marc

Thanks for your answer. I have found on the Internet similar problem like mine, but with another program written in Java. The reason was a bug in Java 9, like I have had. I have changed Java 9 to Java 8 and CubeMX is now working pretty well.

Regards

Paweł

Glen Larson
Associate II
Posted on May 05, 2017 at 19:35

Let me add to the chorus. After upgrading to 0.1 one project won't generate and I can't open the settings dialog, either. The log file shows nothing obviously of interest. No java faults, to be sure.

I can open the tool on three other ioc files and it all works fine. Swap to the fourth ioc and no settings and an attempt to generate gets a 'no progress' bar and it has to be killed through the task manager. It will do the 'Generate Report' just fine and the output in the pdf looks OK.

I'm running this directly from the OS on Windows 10 with Java 8.

ioc attached

________________

Attachments :

F469DiscGen.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HygI&d=%2Fa%2F0X0000000bAu%2FjVgMg_xoR0KrYEA2wbj4QU4xzYgOoxell0iGW.YJ8J8&asPdf=false
Posted on May 05, 2017 at 21:33

Your ioc file works fine on me. As attachment is generated project for SW4STM Another projects, which are working, are also based on F4 libraries? Try to remove library and download again. Try also to run CubeMX from command prompt. There you should have logs directly from program.

________________

Attachments :

F469DiscGen.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HygR&d=%2Fa%2F0X0000000bAs%2FfdEPdvHMD22EKFysLw5m1SOIeeBaU.l4o3uTVJsIkbk&asPdf=false