StateViewer working in a FreeRTOS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

StateViewer working in a FreeRTOS

1,905件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jtirado on Fri Nov 25 06:15:59 MST 2011
Hi,

I use the FreeRTOS example project for the LPC1343.

I can debug the project but the task table view don't show any data:

[IMG]http://www.smartering.com/LPCXpresso/4.jpg[/IMG]

The LPCXpresso v4.1.0 that I use have installed the plug-in "OpenRTOS StateViewer 1.0.10".

The eclipse that use the LPCXpresso v4.1.0 is the Helios version (3.6.x).

I've read in this forum http://support.highintegritysystems.com/entries/470137-stateviewer-plugin-not-showing-anything-in-ec... that the StateViewer 1.0.10 is not compatible with the Helios version.

I've tried to install the new StateViewer 2.0 that is compatible with Helios version (by "Help -> Install new software" and using the location http://www.highintegritysystems.com/StateViewer/)

[IMG]http://www.smartering.com/LPCXpresso/2.jpg[/IMG]

but the IDE says that I've to uninstall first the StateViewer 1.0.

[IMG]http://www.smartering.com/LPCXpresso/3.jpg[/IMG]

The problem is that I can't uninstall the StateViewer 1.0 because the uninstall button is disabled.

[IMG]http://www.smartering.com/LPCXpresso/1.jpg[/IMG]

Has anyone working an  Helios version of LPCXpresso with StateViewer?

Tthanks in advance.
0 件の賞賛
返信
5 返答(返信)

1,501件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Nov 29 01:37:25 MST 2011
Yes!

just to show how useful this is:
[IMG]http://bikealive.nl/img-for-others/LPCXpresso-forum/freertos-stateviewer.png[/IMG]

After adding some code to my application the thing crashed ...
The code looked OK, I could even step through the code normally without any problem but it just crashed later on.

Looking at the task table I suddenly noticed that the TCB for my current task is gone and that there is only a line with some strange numbers.
Both the task and TCB are placed on the heap (standard FreeRTOS config as provided in the LPCXpresso tools) and the task is placed above the TCB.
Since the stack growns down when being used this shows a stack problem.

Without the OpenRTOS viewer this would have taken me (a bit more) time :D

Rob

P.s: a posting with full size 'before' and 'after' images is available here.
0 件の賞賛
返信

1,501件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sat Nov 26 09:18:43 MST 2011
I just know I've seen this in a previous thread ...

And it was me asking about the manual back then :eek:
But had not tried it 'cause I'm more interested in task states than queue states.
Seeing your screen dump triggered me to look at it again.

Thanks!

I use a set of defines for my Queue creations like this:
xQueueHandle UIQueue;
#define UIQueueLen  5
#define UIQueueSize sizeof(uint32_t)

xQueueHandle IndicatorQueue;
#define IndicatorQueueLen 4
#define IndicatorQueueSize sizeof(uint8_t)

#define QueueCreate(x, name) x = xQueueCreate(x##Len, x##Size); vQueueAddToRegistry( x, (signed char*)name)
When I want to create the queue I use this:

     QueueCreate(UIQueue, "UIQueue");
     QueueCreate(IndicatorQueue, "IndQueue");
This makes my program nicer to read and gives me a nice structure for defining queue sizes and element sizes.

I've got something similar for tasks:

enum {
    SetupTaskIdx,       /* The main task initialize and UI                      */
    KeyTaskIdx,         /* Key handling, ssend key message to UI                */
    UIDisplayTaskIdx,   /* user Interface display task (update display)         */
    MAXTASKS
};

void *tasks[MAXTASKS];

#define TaskCreate(x, name) xTaskCreate(x, (signed char *) name, x##Stack, NULL, x##Prio, &tasks[x##Idx])

#define SetupTaskPrio        2
#define KeyTaskPrio          2
#define UIDisplayTaskPrio    2

#define SetupTaskStack       500
#define KeyTaskStack         200
#define UIDisplayTaskStack   400


    TaskCreate(KeyTask,       "KEY");
    TaskCreate(UIDisplayTask, "UILCD");
What I like is that a second version of this define is available for a release build; there I don't need the vQueueAddToRegistry or to store any strings with names of queues and tasks.

Rob
0 件の賞賛
返信

1,501件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jtirado on Fri Nov 25 15:50:41 MST 2011
This already works!!!

[IMG]http://www.smartering.com/LPCXpresso/5.jpg[/IMG]

Was my fault .... :o

The problem was that I was testing the FreeRTOS configuration and I changed the definition [FONT=Courier New]INCLUDE_vTaskSuspend[/FONT] to 0. Now I know that the StateViewer plug-in don't work if this definition is disabled. 

Thank you very much for the help!

Greetings,

Jordi
0 件の賞賛
返信

1,501件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Fri Nov 25 13:25:52 MST 2011
Hello

I wasn't aware of this useful tool, so when I read this post I started to look how to activate it. It's already installed with LPCXpresso (Help->About...->Installation details->Installed software) :

OpenRTOS State Viewer 1.0.10
LPCXpresso v4.1.0 Build 190

Now that we know we have it, it's time to activate it:

Window->Show view->Other->OpenRTOS Viewer->Queue table or Task table->OK

and a new tab will show up. The funny thing is that I have no idea how to use it :D but at least I know it exists.

Greettings
0 件の賞賛
返信

1,501件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Nov 25 09:00:06 MST 2011
The StateViewer provided with LPCXpresso is the version that works with LPCXpresso... AFAIK, the new version does not work with this version of LPCXpresso
0 件の賞賛
返信