OpenOCD Message "Don't have the number of threads in FreeRTOS"

Hi,

I’m relatively new to FreeRTOS, so please excuse me if this is a dumb question:

I’m using a Fedora 41 enviroment and compiled the Atmel ‘usart_serial_example_pdc’ for a SAM3x8 (Arduino Due) and uploaded it using Bossa.

The example code works nicely and now I want to get the debugger going, which also worked - more or less -, but I always get theses messages:

(gdb) step
Don't have the number of threads in FreeRTOS
Don't have the number of threads in FreeRTOS
Don't have the number of threads in FreeRTOS
407                     uc_flag = uart_read(CONSOLE_UART, &uc_char);
(gdb) step
Don't have the number of threads in FreeRTOS
Don't have the number of threads in FreeRTOS
uart_read (p_uart=p_uart@entry=0x400e0800, puc_data=puc_data@entry=0x20072c08 "")
    at /home/karsten/Projects/FreeRTOS/atmel-asf-projects/sam/drivers/uart/uart.c:375
375             if ((p_uart->UART_SR & UART_SR_RXRDY) == 0)
(gdb) 

Also: breakpoints don’t work, but I’v got the feeling this might be related.

My debug environment:
Open On-Chip Debugger 0.12.0
Olimex ARM-USB-OCD connected via JTAG

Thanks for any hints and suggestions!

-Karsten-

Why do you say that breakpoints are not working? I see that step is working as you are able to step into the uart_read function.

It may be helpful to reach out to your hardware vendor.

When Iset a breapoint in GDB, every thing looks like it should, bit after ‘continue’ the progamme doesn’t stop, and I know it went past because the BP was on a puts() statement and I can see the output.

I can interrupt with CTRL-C, then I can step through the code.

I know to little about how this work internally.

By ‘hardware vendor’, do you mean:

  • the chip manufacturer (Atmel/Microchip)
  • the manfacturer of the ArduinoDue board
  • or the debugger manufacturer of the Debugger: Olimex?

I’m expected in new debuggers soon, an St-Link, so that I at least have an alternative here.

Thanks,

-Karsten-

Are you building your code with debug information enabled? Can you try putting breakpoints in some more locations just to ensure that this code was not optimized out? Also, run info br command to see the breakpoints.

I meant Atmel/Microchip as they would have a better recommendation about how to debug their hardware.

:slight_smile: When I wrote I was new to debugging FreeRTOS on SAM3x8 I meant just that. I know how to use GDB and debuggers in lots of other environments.

However, I suspect that OpenOCD is the culprit here and I will investicated in that direction,

Thanks for your answers!

Apologies for misunderstanding.

I think you are right. You probably need to provide the correct openocd config file.