cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 and Platformio

caden013
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

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

 

If you feel a post has answered your question, please click "Accept as Solution".

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.

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.

If you feel a post has answered your question, please click "Accept as Solution".