2025-10-14 11:33 PM
Hello,
my computer is running Windows 11.
The versions of the software I'm using are CubeMX V6.0.1, MotorWorkBench V5.4.8, and Java jre1.8.0_461. However, I keep getting such error prompts when generating code. Could you please tell me how to solve this problem?
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:D:/STMicroelectronics/STM32Cube/STM32CubeMX/plugins/analytics.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[Fatal Error] :1:1: Premature end of file.
[Fatal Error] :1:1: Premature end of file.
[Fatal Error] :1:1: Premature end of file.
[Fatal Error] :1:1: Premature end of file.
[Fatal Error] :1:1: Premature end of file.
[Fatal Error] :1:1: Premature end of file.
Solved! Go to Solution.
2025-10-15 1:29 AM
Hi,
the main.c file has indeed been generated, and there is already a complete IAR project.
However, I will open the automatically generated CubeMX IOC project file and generate the IAR project again through CubeMX. At this point, when compiling the latest IAR project, there will be many errors, indicating that the referenced header files cannot be found.
To sum up, the main.c file has been generated, which means a complete and correctly compilable project has been created. Do not use the automatically generated CubeMX project file to generate the project again, as this will cause the project to fail to compile.
really appreciate your help.
2025-10-15 12:10 AM
Hello @guijiaoZeng,
The point has been reported to the dedicated team.
If the code generation proceeds to the main.c file, you can use the generated project.
2025-10-15 1:29 AM
Hi,
the main.c file has indeed been generated, and there is already a complete IAR project.
However, I will open the automatically generated CubeMX IOC project file and generate the IAR project again through CubeMX. At this point, when compiling the latest IAR project, there will be many errors, indicating that the referenced header files cannot be found.
To sum up, the main.c file has been generated, which means a complete and correctly compilable project has been created. Do not use the automatically generated CubeMX project file to generate the project again, as this will cause the project to fail to compile.
really appreciate your help.