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] [January 2009 Threads] thread.js (Rowley ARM7 demo)Posted by Glen B. on January 9, 2009 As far as I can tell, thread.js has never worked properly. I once posted a correction to the algorithm for traversing the data structures, but even that was not right. But a more serious problem was a crash of CrossStudion when switching to the Idle thread context.
I have finally determined the problem and will explain here. I will also send a corrected threads.js to Richard Barry.
This problem is a strange one. In threads.js a function Debug.Evaluate() is used to poke into the object code being debugged. All variables accessed should be known in the current debug context. Oddly (and apparently unknown to Rowley), if they are not known because they are static in some other context then the value returned is the address of the variable rather than the value of the variable. The original FreeRTOS threads.js exploits this idiosyncracy and just dereferences values that are static in tasks.c. Unfortunately if you switch to the context of the Idle task (which has visibility into tasks.c) then addresses are not returned but the proper values are. This crashes threads.js and consequently CrossStudio.
Recent FreeRTOS versions of tasks.c make use of aportREMOVE_STATIC_QUALIFIER, a preprocessor macro. With portREMOVE_STATIC_QUALIFIER defined, statics in tasks.c become extern instead. This gives them global visibility. With '#define portREMOVE_STATIC_QUALIFIER' in portmacro.h, and modifying threads.js to lose the extra dereferencing of Debug.Evaluate() accessed data, we get a working system.
The threads.js I am sending to Richard also fixes the traversing of the TCB lists. I can send it to users if they email me at... glen at EmbeddedClarity dot com.
Glen
RE: thread.js (Rowley ARM7 demo)Posted by Richard on January 9, 2009 Excellent work Glen - I have the file you sent. Thanks!
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|