Keil Studio with STM32CubeMX2: Code generator issues

Hi everyone,

I have the following setup:

  • Keil Studio (VSCode Extension: Arm Keil Studio Pack 1.20.3), with Keil MDK Professional licince
  • STM32C5 (NUCLEO-C562RE)
  • STM32CubeMX2 (Version 1.1.2)

I've used the STM32CubeMX2 to create a project for the NUCLEO-C562RE board. I then generate the IDE project in Open-CMSIS format. Once the generation is complete, I open the project in Keil Studio. So far, everything works fine: I can open, build, and debug the project without any problems.

However, when I navigate to CMSIS → Components → STMicroelectronics:Device Codegen Code@2.0.0 and click Run Configuration Generator, I get the following error:

executing generator 'stm32c5xx_hal_mx2codegen' for context 'test.debug_AC6+NUCLEO-C562RE' failed

When I run the generator manually in verbose mode, I get the following error:

csolution run c:\git\nucleo\test_open-cmsis\test.csolution.yml -g stm32c5xx_hal_mx2codegen -a NUCLEO-C562RE --verbose
C:/git/nucleo/test_open-cmsis/tmp/test.debug_AC6+NUCLEO-C562RE.cbuild-gen.yml - info csolution: file is already up-to-date
info csolution: generator 'stm32c5xx_hal_mx2codegen' for context 'test.debug_AC6+NUCLEO-C562RE' reported:
[GEN-ERROR] codegen not found: STOP

error csolution: executing generator 'stm32c5xx_hal_mx2codegen' for context 'test.debug_AC6+NUCLEO-C562RE' failed

I really don't know wether this is an issue on my end (missing configuration or whatever), a problem with STMCubeMX2, or an issue with Keil Studio.

I'd appreciate any insights that might help me narrow down the cause or point me in the right direction.

Thanks in advance!

Parents
  • Hi Milorad

    Thank you for looking into this issue.

    In the meantime, I was able to resolve the "codegen not found" error. The issue was caused by missing CubeMX2 environment settings. After setting the required CUBE_BUNDLE_PATH and CUBE_DCM paths, the codegen tool could be found and the generator started successfully.

    The issue has now progressed to a different error. The generator fails because it cannot find:

    .settings/sw-configuration.store.json
    

    It appears that the generator expects this file to be present in the exported project, but it is not available in my setup. I am currently investigating whether this is related to the current STM32CubeMX2 to Keil Studio workflow or if additional project files are required for command-line code generation.

    I have opened a support request with ST and will continue the investigation with them.

Reply
  • Hi Milorad

    Thank you for looking into this issue.

    In the meantime, I was able to resolve the "codegen not found" error. The issue was caused by missing CubeMX2 environment settings. After setting the required CUBE_BUNDLE_PATH and CUBE_DCM paths, the codegen tool could be found and the generator started successfully.

    The issue has now progressed to a different error. The generator fails because it cannot find:

    .settings/sw-configuration.store.json
    

    It appears that the generator expects this file to be present in the exported project, but it is not available in my setup. I am currently investigating whether this is related to the current STM32CubeMX2 to Keil Studio workflow or if additional project files are required for command-line code generation.

    I have opened a support request with ST and will continue the investigation with them.

Children
No data