2025-01-04 12:32 PM
Hi,
CubeMX is unable to generate code. The program freezes and I find the following message in the logs.
2025-01-04 21:22:40,906 [INFO] BlockDiagram:2766 - set Specific Code input for plugin: RCC
2025-01-04 21:22:40,921 [INFO] CodeGenerator:896 - code generatio: config db path: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\\db\
2025-01-04 21:22:41,089 [INFO] CodeEngine:255 - oldGeneratedFile, G:\Mijn Drive\Workspace\vscode_stm32\Finger\MXTmpFiles\license.tmp_save
2025-01-04 21:22:41,551 [INFO] CodeEngine:279 - Generated code: G:\Mijn Drive\Workspace\vscode_stm32\Finger\MXTmpFiles\license.tmp
2025-01-04 21:22:41,759 [ERROR] CodeEngine:200 - catch error: Failed to copy full contents from 'C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\templates\gpio_c.ftl' to 'G:\Mijn Drive\Workspace\vscode_stm32\Finger\gpio_c.ftl'
2025-01-04 21:22:41,759 [ERROR] ProjectBuilder:2207 -
java.lang.NullPointerException: Cannot invoke "com.st.microxplorer.codegenerator.TemplateFile.getPath()" because "this.template" is null
at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:243) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:6282) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generatePinoutConfigCode(CodeGenerator.java:2935) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1948) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateDefaultConfig(CodeGenerator.java:10606) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1594) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:3026) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:2204) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:809) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:61) ~[?:?]
Are there any restriction to what path it can handle?
I'm trying to save it to my google drive which is being mapped to G: by the Google drive client.
Saving it to a location on my physical drives works without any troubles.
Solved! Go to Solution.
2025-01-04 02:29 PM - edited 2025-01-04 02:29 PM
Turned out I had my Google drive client set to 'stream' my files in stead of making a local copy.
Changing this solved my issue.
Here is some more info also how to get rid fo the space in "My drive".
thanks for everyone's suggestions.
2025-01-04 01:00 PM
> I'm trying to save it to my google drive which is being mapped to G:
Better don't. If one actively looks for problems, one finds them pretty soon.
2025-01-04 01:44 PM
Pausing the drive client makes no difference.
Too bad, I like to use drive to sync my workspace..
2025-01-04 01:50 PM
Version control tools (git and others) exist for this goal.
2025-01-04 01:57 PM
> G:\Mijn Drive\
The issue could be a space appearing in the path. Better to avoid that as not every program handles it appropriately.
2025-01-04 02:29 PM - edited 2025-01-04 02:29 PM
Turned out I had my Google drive client set to 'stream' my files in stead of making a local copy.
Changing this solved my issue.
Here is some more info also how to get rid fo the space in "My drive".
thanks for everyone's suggestions.