FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2004 Threads] Debugging FreeRTOSPosted 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 FreeRTOSPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|