cancel
Showing results for 
Search instead for 
Did you mean: 

Cube MX 5.2.0 and Keil 5.24 cannot debug anymore "Cannot access target Shutting down debug session."

MNapi
Senior III

After installing Cube MX 5.2.0 I am getting error like cortex cannot debug, "Cannot access target Shutting down debug session." I spent a whole day even reinstalling Keil. Until I found that it is somehow problem with latest Cube MX 5.2.0

I installed back Cube MX 5.0 and it works again. I found a lot references to this problem to earlier Keil release but no fix solved it until I go back Cube MX 5.0

2 REPLIES 2

You could check the settings in the debugger options. Perhaps the SWD or JTAG usage, speed, or connection settings.

Keil 5.27​ is the current version.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I did exactly this, wasted whole day until I realized it has something to do with new Cube MX 5.2. I have the same setting it works and always worked on Cube MX 5. Cube MX 5.2 generates some extra or different code, some glitch. It will not allow Keil to debug.

They messed up something with the new update. You only need to load Cube MX 5.2 and Keil and you will see what I am talking about.