Skip to main content
Visitor II
October 13, 2023
Solved

STM32 and Platformio

  • October 13, 2023
  • 1 reply
  • 2641 views

I have been developing a program for the Nucleo-32 (STM32L412KBU6) board in Visual Studio Code's Platformio, and I have run into an interesting problem. I am able to build my project with no errors and upload it successfully. However, whenever the code is uploaded to the board, the program does not run. The only way that I can get it to run is by using the debugger to walk step by step through the code. Does anyone know of a solution to this strange issue? (I can drop my code here in a zipped file if I need to).

 

Thanks, in advance, for the help.

    This topic has been closed for replies.
    Best answer by TDK

    Different compilers will produce different code. Just because one of them "worked" doesn't imply the code is bug free.

    Suggest remaining objective and debugging the issue at hand directly.

    1 reply

    Super User
    October 13, 2023

    Probably a bug in the code. Attach a debugger without resetting to see where it's at.

     

    caden013Author
    Visitor II
    October 16, 2023

    I know there isn't an issue with the code because I copied and pasted the same code into Keil uVision5 and uploaded it to the board, and it worked with no problems. It has to be an issue with Visual Studio Code and Platformio.

    TDKAnswer
    Super User
    October 16, 2023

    Different compilers will produce different code. Just because one of them "worked" doesn't imply the code is bug free.

    Suggest remaining objective and debugging the issue at hand directly.