Hi! I am new to this Forum and to FreeRTOS. Started working with it this monday. Now I have a few questions which you could hopefully answer. I use the IAR Embedded Workbench Kickstart IDE. I succesfully compiled the uIP Demo and everything works fine. Now I am wondering how I can debug my own applications using this IDE. I found no possibility to get a view of the running tasks or other important information like used stack sizes etc.. Is there a way to get info about such things? I am using an AT91SAM7X-EK with an AT91SAM-ICE. If there is no possibility to debug FreeRTOS applications proper with Embedded Workbench, which other IDE would be advisable to use? I dont want to start working on my project without a good debugging method. Thanks for your help!
I just saw the possibility of using debug plug-ins with embedded workbench. Unfortunately I can not find any plugin for FreeRTOS. Does any exist?
You can figure most things out from the code. You have a handle to each task and can get most (all?) information about the task from that. For example, get information on the current running task by inspecting pxCurrentTCB in the debugger watch window. In the TCB there is a pointer to the stack, you can see the high water mark by inspecting the RAM to see how many 0xa5’s are left. There is a function called vTaskList() in task.c that prints our the state, priority, max stack usage, etc. of each task to a string. This is the function that is used to generate the task table for the WEB server demos.
Thx for your response. I read the documentation about the function vTaskList(), but I must admit I’m not quite sure how to use it. I will check pxCurrentTCB when I’m back at work next week.
You were right, pxCurrentTCB is very useful for debug purposes. Is there also a possibility to get information about semaphores?
Semaphores are just queues. Semaphore handles and queue handles are both pointers to a queue structure. The difficulty is that the data hiding technique used means the queue structure type is only visible from within queue.c. Inside queue.c it is then easy to see the queue in the debugger. Outside more difficult. You can move the queue structure definition to the header file if you don’t mind breaking the data hiding. Dave.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.