Skip to main content
Associate
April 13, 2024
Solved

STM32cubeide program uploads but doesn't run

I have successfully built and run 20 lessons in a tutorial series with a Nucleo STM32F767NI board but suddenly, on the 21st tutorial, programs would upload but not run.

I went back to the previous tutorial and then to the first tutorial, a simple blinking LED program, which also appeared to upload OK but refused to run even after pressing the board's reset button.

After much experimenting, including reinstalling STMCubeID, I installed STM packages in my Arduino IDE.

Using Arduino, a flashing LED program uploaded and ran without problem, so the board seems to be OK.

The problem may have occurred after I did an ST-Link upgrade. But this shouldn't be a problem as the Arduino code worked OK.

 

    This topic has been closed for replies.
    RogerMcBest answer
    Associate
    April 15, 2024

    Changing all occurrences  of GPIOA to GPIOB has all other problematic lessons working.

    Thanks all for good advice.

    9 replies

    RogerMcAuthor
    Associate
    April 13, 2024

    I can't get Edit Message to work.

    I installed the GPIO_IOToggle GPIO IO Toggle example which builds, uploads and runs OK but my other projects still refuse to run.

    mƎALLEm
    ST Technical Moderator
    April 13, 2024

    Hello,

    From your first statement it came to mind that in your 21st tutorial you handled boot address in option bytes or you modified the boot pin. But when you said a simple blinking example loaded with Arduino IDE is running well, this makes me perplex!

    To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
    RogerMcAuthor
    Associate
    April 13, 2024

    Thanks.

    I am using STM32Cube IDE 1.15.0 on a Mac under OSX 14.4.1.

    In addition to Arduino, under STM32Cube two STM32F767xx-Nucleo examples also work properly. Perhaps I accidentally, without knowing it, handled boot address in option bytes or modified the boot pin?

    Could you tell me how to check boot address in option bytes and boot pin settings?

    Also, there must be something different in the examples that enables them to work properly? But I haven't been able to spot the specific difference.

    My tutorial lessons are bare metal lessons, unlike the examples.

     

    RogerMcAuthor
    Associate
    April 14, 2024

    Could this problem be related to an upgrade from STMCubeIDE version 13 to version 15?

    RogerMcAuthor
    Associate
    April 14, 2024

    I built a new project using version 15 and the original main.c but the problem remained.

    I then found another project that runs OK.

    The difference is that the OK project uses GPIOB whereas the ones that don't work use GPIOA.

    AScha.3
    Super User
    April 14, 2024

    Tip:

    Always set in Cube (at first ! ) the debug connection you want to use enabled :

    AScha3_0-1713083558167.png

    because this is on GPIOA :

    AScha3_1-1713083643627.png

    So if you not do this, and use these pins for anything else - you stop any debug connection at this moment.

    :)

     

    If you feel a post has answered your question, please click on " Best Answer ".
    RogerMcAuthorBest answer
    Associate
    April 15, 2024

    Changing all occurrences  of GPIOA to GPIOB has all other problematic lessons working.

    Thanks all for good advice.