Sysprogs forums › Forums › VisualGDB › Visual Live Watch FreeRTOS static tasks
- This topic has 4 replies, 2 voices, and was last updated 3 years, 8 months ago by elivoe.
-
AuthorPosts
-
August 17, 2020 at 22:15 #28860elivoeParticipant
Hi,
I am using VisualGDB for embedded software development on Infineon XMC microcontrollers. There I am using FreeRTOS with static tasks to keep heap allocation as little as possible.
I found two problems regarding the visual live watch windows and static tasks in FreeRTOS:
- The FreeRTOS tab disappears if there are only static tasks/queues/… in the code (no heap allocation of FreeRTOS).
- There is a problem with the stack usage values, as you can see in the attached picture.
It would be great if you could fix those problems as static tasks are quite useful for embedded development.
Thank you very much!
Yours,
Elias
Attachments:
You must be logged in to view attached files.August 18, 2020 at 08:36 #28862supportKeymasterHi,
No problem, we will be happy to look into this. Would you be able to share a basic project that reproduces both issues? You can either attach it here as a zip file (make sure you delete the built files), or upload it to an external file sharing service.
April 6, 2021 at 08:59 #30307elivoeParticipantHi,
I am again debugging a FreeRTOS based system with tasks with statically allocated RAM. So I have created a demo project with and tried to get closer to the problem. The demo project runs on a XMC4500 as I don’t have an STM32 in the office to test it. But I think you should be able to just copy the code from the main.cpp and test it with an STM32 project.
I have summarized what the two problems behave like:
Problem 1:
If nothing from the FreeRTOS heap is allocated the system does not recognize that there is FreeRTOS running on the controller. In the live watch windows the FreeRTOS button is not visible. As soon as there is at least one task with dynamically allocated RAM created or anything else allocated from the FreeRTOS RAM (i.e. via pvPortMalloc(1)), all tasks (cynamically and statically allocated) show up in the live watch view. The problem could be that the ucHeap field gets removed if there is nothing allocated from the FreeRTOS heap. Are you checking for this field?Problem 2:
If there are two or more tasks with statically allocated RAM created the live watch view in FreeRTOS mode shows strange stack usage value for all tasks except the first created (only talking about the tasks with statically allocated RAM). In this example the live watch shows the following stack usage for the first demo task: 708 bytes remaining which would be fine, but shows 631612121 / 631612829 bytes for demo task 2.It is also interesting that the stack usage for task on the heap is formatted in the style 92/400 and the format of the task in the stack is 708 bytes remaining.
See my attached screenshots for further details.
Hope this information and the attached demo project can help you finding the problem.
Attachments:
You must be logged in to view attached files.April 13, 2021 at 16:27 #30348supportKeymasterHi,
Thanks for the detailed demonstration. We have updated Live Watch to properly support statically allocated threads and queues. Please try this build: VisualGDB-5.6.1.4098.msi
April 15, 2021 at 09:09 #30357 -
AuthorPosts
- You must be logged in to reply to this topic.