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




Loading

Debugging FreeRTOS

Posted by altraqua on November 1, 2004
I'm using the GNU toolchain: gcc, gdb and friends.

When I start the ARM7 demo application (compiled in RAM) with gdb or insight, step executing don't work.

I think that this is due to the interrupt driven scheduler and the ARM EmbeddedICE debug mode that disable interrupts.

How can I debug a FreeRTOS task whith gdb???

RE: Debugging FreeRTOS

Posted by Richard on November 1, 2004
Some debugging methods cope better than others. I have encountered problems with other ports whereby stepping the compiler temorarily enables interrupts, even when you have them disabled in your application - causing big problems. I am not familiar with the EmbeddedICE, but have not had a problem with the tools I use - parallel port wiggler, and a Keil USB device. The wiggler seems to work well with GDB.

One way around your problem might be to run using the cooperative scheduler (set portUSE_PREEMPTION to 0 in portmacro.h). This way if your debugger is causing problems with the interrupts then at least context switches won't occur between debug steps! Debugging with the cooperative scheduler tends to be much simpler - but is of coarse not always suitable. You can go back to preemptive once you have finished debugging.

Depending on the size of your application, another option might to be to use the Keil simulator. This is an excellent tool and works well with GCC built applications. It is limited to 16K unless you buy the full version however.

You say that step execution doesn't work - what exactly happens? If you stop on a break point then step the code, does it just start executing again instead of just executing one instruction? If this is the case then I think I have read somewhere else about this problem.



[ 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