2019-12-10 07:54 AM
Hello
I am trying to debug a project in STM32CubeIDE v1.1.0.
Debug probe: ST-LINK GDB server.
I get this error:
"Error in final launch sequence:
Failed to execute MI command:
target remote localhost: 61234
Error message from debugger back end:
Cannot access memory at address 0x4c05b508
Failed to execute MI command:
target remote localhost: 61234
Error message from debugger back end:
Cannot access memory at address 0x4c05b508
Cannot access memory at address 0x4c05b508 "
Is this issue known? How to solve it?
I attach the debug log.
2019-12-10 08:15 AM
0x4000 0000 is usually in the peripheral address space for the CPUs I've used, not FLASH or RAM. What CPU are you using? Are you trying to read peripheral registers in the debugger? Or it is trying to run code and/or set breakpoints at that address?
In the gdb log you posted, the RAM definition is broken. Look for 'memory type="ram"'. It is in there 2 times. The first defines a RAM segment starting at 0x0000 0000 with length 0x8000 0000 (that is a HUGE amount of RAM for an STM32 part :). The second defines a RAM segment from 0x8100 0000 to with a length of 0xf7ef ffff. THAT AIN'T RIGHT EITHER!!!
2019-12-10 09:11 AM
I am using STM3240G-EVAL evaluation board. This was a project ("test_usb_4") with default settings(STM32CubeMX) for this board and USB OTG FS as Virtual Com Port.
The problem appears and disappears (in the test_usb_4 project) when:
1. If in 'Debug Configurations' I change 'Debug probe' to ST-LINK OpenOCD and debug the project. Debugging works.
2. When I change to Debug probe again: ST-LINK GDB server. Debugging will work without error.
3. Then - I switch to the 'test1' project, which is more complicated.
If it debugs in the ST-LINK GDB server configuration, the error "Cannot access memory at address 0x4c05b508" appears.
4. If I change to OpenOCD:
At the start:
No source available for "(gdb [19] .proc [42000] .threadGroup [i1], gdb [19] .proc [42000] .OSthread [1]). Thread [1] .frame [0]"
With Suspend:
"Break at address" 0xf3af4804 "with no debug information available, or outside of program code."
5. I switch to the "test_usb_4" project - Debug probe: ST-LINK GDB server. I get the error "Cannot access memory at address 0x4c05b508".
I can somehow deal with the error in the project "test_usb_4" by switching ST-LINK GDB server-> ST-LINK OpenOCD-> ST-LINK GDB server. An error occurs when the 'test1' project is debugging before.
I don't know where the error in the 'test1' project came from.
Now in the attachment log from debug project test1.
CPU - STM32F407IGH6. STM3240G-EVAL evaluation board.
I removed all breakpoints. I'm not trying to read peripheral registers in the debugger.
Thank you for your answer.
2019-12-29 12:22 AM
Did u solve the problem? I have the same issue
2019-12-29 05:11 AM
Looks to have crashed off into some random memory location. Check viability of stack.
Perhaps use some better tools.