Debugger error "STLink error (22): DP error"

I am using Nucelo-F767ZI board
with Mbed Studio 1.3.1
image
run it in
Linux localhost 5.4.80-gentoo-x86_64 #1 SMP Tue Dec 22 23:21:16 JST 2020 x86_64 Intel(R) Core™ i7-6700HQ CPU @ 2.60GHz GenuineIntel GNU/Linux

ST-LINK firmware:

image

Program code is simple to test debugger:

#define BLINKING_RATE_MS 100
int main()
{
bool led1;
bool led2;
bool led3;
while (true) {
led1 = !led1;
led2 = !led2;
led3 = !led3;
}
}

Got debugger error:

How do I need to fix it?

Hello Serge,

If you build your program with Mbed OS 6.6.0 then this might help to fix it.

Best regards, Zoltan

Hello Zoltan,

I patched files:
targets/TARGET_STM/mbed_overrides.c
and
targets/targets.json

as suggested here

Debugging looks like start to work

Thank you!

1 Like

Solution:
Go to Tools > Options.
In the Options dialog box, select the Debugging folder.
In the Debugging folder, select the Just-In-Time page.
In the Enable Just-In-Time debugging of these types of code box, select or clear the relevant program types: Managed, Native, or Script.
Click OK.

Regards,
Rachel Gomez