This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil uVision download/debug problems

Hello everyone,

I hope you will be able to help me with this veery strange issue.

So, using STM32F401 device (I think that doesn't matter here) I have one custom made board, which works just great.
The problem I got today was, that when I download project and try to debug it, it didn't come to main function even.
I searched for a problem and I realized that downloaded code was not starting with 0x2000xxx at start location of FLASH memory.
I use J-Link tool for download/debug and it always worked just well.

The problem is still more strange because this project worked yesterday just well. I didn't evet touched any of settings in uVision, just closed project, today I opened it and voila, problem is here that my MCU didn't started because of problem I told above.

Also, I've downloaded another project and it worked.
The solution I did was to delete .uvprojx file and create another one (a new project with old source) and then it worked again.

But, I didn't touch any of settings like "run to main" in debugger. Everything was by default like yesterday.

PS: This is not first time this happened to me. I thought that I've made some source code problems that it don't work but then I realized that it even don't jump to Reset Handler which is called by default.

STM32F401 is Cortex-M4 device.

What could be a problem for problem like tihs and how to avoid it?
I hope anyone knows for nice solution.

Thanks to everyone, have a nice day.

  • What debug adapter are you using when you have such problems. You write that JLINK does not have such problems?

    What debug adapter is used when you have the problems you are describing?
    Is it possible that the Flash download step failed in such cases?

  • I'm using SWD always.

    It's strange because it works, works and then suddenly STOP, debug not works, processor never stops, PC counter shows just some random values, SP the same.

    Also, I've opened the other project which worked well and I checked it's settings in "Options for Target". Everything the same.

    Only what helps is that I remove .uvprojx file and create new one with old source files.