Skip to main content
Associate II
July 11, 2024
Solved

Generate code not working in CubeIDE

  • July 11, 2024
  • 7 replies
  • 22266 views

Following up from my previous post, I am having issues with code generation - it seems to complete, but I don't see anything changed in the code.

Here attached you will find the ioc file. I modified pin names for PB10 to PB12, but after generating the code I don't see any of the name in the project (should be in main.h, but I did a search in the whole project just to be sure).

 

I am using STM32CubeIDE 1.16.0 on mac Sonoma 14.2.1 with M1 chip.

    Best answer by AScha.3

    >  It is done within a fraction of a second.

    So you have one of these new quantum processors - or its doing nothing. :)

     

    Maybe you try : install CubeMX , to make ioc and gen.code (same as the IDE plugin). Try...

    https://www.st.com/content/st_com/en/stm32cubemx.html

     

    7 replies

    AScha.3
    Super User
    July 11, 2024

    Look in main.c , gpio init :

    void MX_GPIO_Init(void)
    {
     GPIO_InitTypeDef GPIO_InitStruct = {0};
    
     /* GPIO Ports Clock Enable */
     __HAL_RCC_GPIOE_CLK_ENABLE();
     __HAL_RCC_GPIOC_CLK_ENABLE();
     __HAL_RCC_GPIOF_CLK_ENABLE();
     __HAL_RCC_GPIOH_CLK_ENABLE();
     __HAL_RCC_GPIOA_CLK_ENABLE();
     __HAL_RCC_GPIOB_CLK_ENABLE();
     __HAL_RCC_GPIOG_CLK_ENABLE();
     __HAL_RCC_GPIOD_CLK_ENABLE();
    
     /*Configure GPIO pin Output Level */
     HAL_GPIO_WritePin(GPIOE, GELB_Pin|GRUEN_Pin|ROT_Pin, GPIO_PIN_RESET);

    There you see "your" names...after gen.code.

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    slai-nickAuthor
    Associate II
    July 11, 2024

    I don't...
    Also the names should be defined in main.h, but they aren't, and they don't appear anywhere else in the project.

    It just seems that my IDE is in a broken state... Unfortunately I just reinstalled it and it didn't solve the issue.

    When I click generate code, the window appears but is a lot faster than it should be. It is done within a fraction of a second.

    AScha.3
    AScha.3Best answer
    Super User
    July 11, 2024

    >  It is done within a fraction of a second.

    So you have one of these new quantum processors - or its doing nothing. :)

     

    Maybe you try : install CubeMX , to make ioc and gen.code (same as the IDE plugin). Try...

    https://www.st.com/content/st_com/en/stm32cubemx.html

     

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Technical Moderator
    July 15, 2024

    Hello @slai-nick ,

    First let me thank you for posting.

    This problem is not reproduced using STM32CubeIDE 1.16.0 on mac Sonoma.

     

    MahmoudBenRomdhane_1-1721048395747.pngMahmoudBenRomdhane_2-1721048476008.png

    Thanks.

    Mahmoud.

     

     

     

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    RLanz.2
    Associate III
    August 18, 2024

    Hi,

    I've bumped into similar issue after installation of STM32CubeIDE 1.16.0.
    I could not generate code after any change in the *.ioc file.
    I work on STMU575, but I think it is a general issue.
    After connecting to 'My ST' account in the STM32CubeIDE, I suddenly could generate the code.

    P.S.
    I only wonder if this is a one-timer need to connect to ones ST account, in order to generate code, after a new STMCubeIDE version installation, or will it be required for any code generation one might need.

    Adailton Júnior
    Associate
    October 25, 2024

    I just had the same issue.

    Also solved by logging in

    Visitor II
    November 18, 2024

    honestly, this is just fu***ed up. having to login to your account in order for code generation to work....

    just had the same issue and it took me 2 hours to figure this out. makes me want to switch to some other ide. not that cubeide ever was a great ide...

    Adailton Júnior
    Associate
    November 18, 2024

    Yeah. We already have to log in to download the software. Now, we have to log in to use it.

    If you don't have an internet connection, you're f***ed.

    Associate III
    January 9, 2025

    Hey all. I have this same issue. I have the following installed:

     

    STM32CubeMX - 6.13.0

    STM32CubeProgrammer - 2.18.0

    STM32CubeIDE - 1.17.0

     

    The device I'm trying to generate for is the STM32H747XI. I have tried clearing the myST account info and entering it again (from CubeMX and from CubeIDE). Regardless of which app I try to generate code from, I never get more than a skeleton (e.g. none of the custom User Labels for PINs show as #defines, and there's no initialization code generated). The Check Connection button always returns without a displayed error, there's no Proxy server in use.

     

    Any ideas?

     

    Thanks - C-Coder

     

    EDIT - Looks like the problem was that the Pin Context Assignment value was not set. Set them to the appropriate core causes the code to be generated.

    Visitor II
    March 23, 2025

    I also have this problem.  In the context menu for the project, Generate Code is now grayed out after I logged in properly.

     

    Someone asked about working offline.  In the user guide UM2609 I found this mention about working offline in section 1.2.3:

    gwfung_0-1742765441141.png

     

    Visitor II
    April 21, 2025

    I managed to solve it, I think by recreating the project.

    Graduate
    October 7, 2025

    I am using version 1.16.1, and I also had to login to generate code.

    Is there any guide to program stm32 without an IDE ?