cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Debug Project "Source Not Found... Error Failed To Read Target Status..."

TNguy.18
Associate II

Hi,

I'm pretty new to the STM32CubeIDE and I've been following one of the ST MOOCs as an introduction.

I've been able to debug the blinky project example but for some reason, I'm unable to debug the PWM project example. I receive these error messages attached below after trying to debug the project. Any reasons why this is happening?

Thanks

0693W000003Q3w7QAC.jpg0693W000003Q3w2QAC.jpg

6 REPLIES 6
TDK
Guru

It looks like it's calling a signal handler that isn't implemented properly. Not sure how it still has a stack trace if the connection was lost. Step through the HAL_RCC_ClockConfig call to see where/why it stops.

Might be a better use of time to just switch to another example, or generate your own with CubeMX.

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

Sorry, I should've specified that I recreated the example via the IDE in this video following this video: https://www.youtube.com/watch?v=-AFCcfzK9xc.

I've been using stepping through stuff and it seems to crash after this line. I'll try starting a new project if it just was a one-off issue.0693W000003Q41HQAS.jpg

Hey again, thanks for the help. I traced down the source of the error to the fact that I changed the HCLK frequency from 80Mhz(default CLK) to 8Mhz in the clock configuration tab. Why would this cause any problems? I'm using the NUCLEO-L476RG.

TDK
Guru

There are a number of clock requirements that can cause issues. STM32CubeMX is a good tool for configuring the clock and will most of the time alert you if there are any errors. I would set up your clock configuration in a new project there and see if it's valid. There's much more involved than just the HCLK value.

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

Interesting. I'm completely new to STM programming so I haven't had experience with the STM32CubeMX even though the STM32CubeIDE includes the MX. Maybe I shouldn't be solely relying on the STM32CubeIDE? I'm given no alert here by the way and nothing seems to be mentioned in the datasheets.0693W000003Q4R0QAK.jpg

Well, your code above suggests LSE is getting enabled and timing out while waiting for it to be ready, but it's not enabled in your clock config. One possibility is it doesn't exist on your board. Are you sure they're the same? Clock config otherwise looks okay. Doesn't really explain why it would work with 80MHz clock but not with 8MHz. Hard to debug remotely.

STM32CubeIDE is fine, and getting better. Other IDEs are generally fine as well. Use the one you like the most, they all have their quirks.

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