Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


gdbserver and thread debugging

Posted by rasty1 on July 15, 2016

Hi, Is someone aware about any port of gdbserver to FreeRTOS? Open source or commercial? I'd like to do thread debugging via gdserver, not JTAG or OpenOCD. Second question is target object file loader and symbol resolver for elf or similar format. Is the something like that for FreeRTOS.

Best regards Rasty

gdbserver and thread debugging

Posted by rtel on July 15, 2016

I think Segger and perhaps NXP have Eclipse plug-ins for FreeRTOS, which presumably use GDB. Have a look at


gdbserver and thread debugging

Posted by rasty1 on July 15, 2016

Thanks. But it is not what I'm looking for.

Few years ago OpenOCD started with parsing FreeRTOS TCB and stack and passing this data to GDB, I tried to play with it, but gave up at the end. Maybe today it works out of the box. It is really nice to see stack frames and tasks states, but I'd like to attach to a thread and debug it rather than stopping whole system. This would be a big advantage for complex applications.

I "discovered" FreeRTOS in 2007 for ARM7. I took idea from VxWorks and wrote a primitive stack parser and added symbol table and lookup and was able to see thread call stack at the run time from embedded shell. This was very helpfull to debug dead-end loops and dead-locks.

gdbserver and thread debugging

Posted by dumarjo on July 15, 2016


Which MCU do you use ? If it's a cortex-M, it's work well with openocd + gdb.


gdbserver and thread debugging

Posted by rasty1 on July 15, 2016

Hi, Unfortunately for evaluation I use uBlaze.I push CortexM/R+FreeRTOS for the next product. I'd love to use OpenOCD, but it does not support uBlaze, at least I didn't find script. What do you mean by "work well with openocd + gdb"? Shows all threads and stacks or supports also co-called "non-stop mode", where you can stop and step-through specific thread?


gdbserver and thread debugging

Posted by xz8987f on July 15, 2016

OpenOCD has it implemented (see https://mcuoneclipse.com/2016/04/09/freertos-thread-debugging-with-eclipse-and-openocd/), but I have not used much openOCD as it does not support the ARM cores I'm using well. But you might have a look at the OpenOCD implementation as it is open source.

gdbserver and thread debugging

Posted by rasty1 on July 15, 2016

Thanks I'll try that.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists