9 years, 11 months ago.

Cannot access memory under Keil debug

Hi,

I have a Nucleo board with STM32F103 processor. I can use the on-line compiler, and export the result to Keil 5.10.0.2. I can compile it there, and download it to the board with ST-Link and it runs. Code is simple:

include "mbed.h" DigitalOut myled(LED1);

int main() { while(1) { myled = 1; LED is ON wait(0.2); 200 ms myled = 0; LED is OFF wait(1.0); 1 sec } }

The problem is that I cannot use the Keil debugger, despite having checked that it uses ST-LInk (not the old version). I just get the 'cannot access memory' message, with no addresses given, as soon as it gets to 'main' (address 0x08000874 according to the dissassembler). When I quit the debugger, the application runs OK. Error messages look like this:

  • Restricted Version with 32768 Byte Code Size Limit
  • Currently used: 6168 Bytes (18%)

Cannot access Memory Cannot access Memory Cannot access Memory Cannot access Memory Cannot access Memory

Any ideas, anyone. I am up to version 'V2.J20.M4 JTAG+MBed Debugger' of the hardware. I assume this supports SWD?

Thanks

Question relating to:

ST
A world leader in providing the semiconductor solutions that make a positive contribution to people’s lives, both today and in the future.

Did you find a solution to this problem? It sounds like I have the exact same issue here, and setting the port to SW does not seem to help.

posted by Kenneth Fog 16 Jun 2014

1 Answer

9 years, 11 months ago.

In the debugger hardware setting window you have to explicitly select SW, otherwise the debugger will try to use the full JTAG interface for debugging. right click on your project root folder > Option for target ... > debug > use: STlink > settings > Port: SW