Skip to main content
Associate
October 15, 2025
Solved

ST MotorControl Workbench WARNING: An illegal reflective access operation has occurred

  • October 15, 2025
  • 1 reply
  • 266 views

guijiaoZeng_0-1760509550115.png

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.

Best answer by guijiaoZeng

guijiaoZeng_0-1760516255105.png

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.

1 reply

GMA
Technical Moderator
October 15, 2025

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.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
guijiaoZengAuthorBest answer
Associate
October 15, 2025

guijiaoZeng_0-1760516255105.png

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.