2025-12-05 9:55 PM - last edited on 2025-12-06 1:23 AM by Andrew Neil
Hi there!
Im currently learning STM32 MCUs using Nucleo-F446RE
I wrote two 'Blinky' firmwares:
*One using HAL and CubeMX (.ioc file)
*A second one using just HAL (NO CubeMX)
What does the FW does?: It just uses the user button on the nucleo, reads the state and "mirrors" that state on the user LED on the nucleo
In the project using CubeMX the firmware works in debug mode and in run mode (directly running on the board)
But in the project that doesnt use CubeMX the firmware works fine in debug mode but it doesnt in run mode
Both projects compile with 0 errors and 0 warnings for both, debug and release
I have read the RM and the HAL documentation but i dont have a clue where is the problem
I tried all the solutions from chatGPT and still it doesnt work
Can you help me please?
What am i doing wrong?
I let you the link to my projects if you need to check something
Maybe the STM32CubeF4 version? (weird because both projects use the same version)
Thanks in advance!
Projects link: https://drive.google.com/drive/folders/1xs8ck-L0GyELmdG6uNVZT-bSjg4GwUFW?hl=es-419
2025-12-05 11:05 PM
Just HAL is what? FYI generated project isnt only main.c , exist startup asm and c parts. How you handle this...
2025-12-06 1:38 AM
@Cblue_X wrote:in the project that doesnt use CubeMX the firmware works fine in debug mode but it doesnt in run mode
What, exactly, does happen in "run" mode ?
Are you running the exact same binary, or are you rebuilding for Debug/Release ?
Note that you can connect to a running (or "stuck"/"crashed") system without having to reset & do a download:
It sounds like something is wrong/missing in your startup/configuration - so carefully compare & contrast the working & non-working case...