Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8026

General • get_absolute_time() returning 0 under gdb

$
0
0
Hi,

I have an issue with get_absolute_time() which is properly working on my target without gdb, but always return 0 when a gdb is connected.

Code is very simple:

Code:

    while (true) {        absolute_time_t now = get_absolute_time();        printf("Time: %llu us\n", to_us_since_boot(now));        sleep_ms(500);    }
Openocd is launched with:

Code:

openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
And gdb with "gdb-multiarch my.elf"

Does anyone know how to let this work with gdb or how to replace it by something else ?

Statistics: Posted by wixiw — Mon Apr 14, 2025 7:40 pm



Viewing all articles
Browse latest Browse all 8026

Trending Articles