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] [July 2009 Threads] Trace Hook MacrosPosted by zy015240 on July 9, 2009 Hi all, Have someone used Trace Hook Macros? or where can i find the demo of using Trace Hook Macros? Thanks.
RE: Trace Hook MacrosPosted by Dave on July 9, 2009 What do you want to achieve with them? Maybe we can help here.
RE: Trace Hook MacrosPosted by zy015240 on July 9, 2009 I just port to MSP430F5438+IAR 4.2, so i need to confirm if my port is correct. I see the FreeRTOS web site for information, but i can't find any examle for these macros. Maybe you can give me some advices. thanks.
RE: Trace Hook MacrosPosted by Dave on July 9, 2009 The macros are very generic and can be used in lots of different ways. If you say what you actually want to do (see how much idle time there is, how often a task runs, the order in which tasks run) and how you want to view the information (digital output, analog output, buffer) then we might be able to help here.
RE: Trace Hook MacrosPosted by John W. on July 9, 2009 Zy,
Does your port run in the debugger?
Regards, John
RE: Trace Hook MacrosPosted by zy015240 on July 10, 2009 Hi John, I just port to MSP430F5430 + IAR 4.2, both in debugger and release. and I create two task which flash two LEDs with different fixed frequency. It seem run fine. But I don't confirn the kernel is running well. So I plan use trace macro to see the status of kernel. The manual on the web is too simpleness, I can't implement my trace, I need help.
Regards,
ZouYong
RE: Trace Hook MacrosPosted by John W. on July 10, 2009 ZouYong,
Sounds like you need to spend more time in the debugger - no reason to make release builds if you don't know that your debug version is working or not.
Set breakpoints in your TIMER IRQ and see if that is working.
Get a scope, program some I/O's and create a couple of tasks that toggle the I/O's - or even toggle the I/O's in your timer IRQ.
HTH, John
RE: Trace Hook MacrosPosted by zy015240 on July 10, 2009 Hi John, I already create three tasks in my test main(), each one flash one LED at different frequency using Taskdelayuntil() function, and it work ok. But I really need to know if the kernel mechanism such as switchcontext work correct. so I think I can use trace macro to confirm. But I do know how to use them. Thank you for faster replay.
RE: Trace Hook MacrosPosted by John W. on July 10, 2009 ZouYong,
Move one of your tasks to be > 0x10000 (above 64K) - this will check if your port is OK running in 430X mode. You define this in your linker command file. Maybe you don't want to run in 430X mode initially until you get your port stable.
Put a taskYield() in your LED tasks forcing them to do a context switch.
Put a breakpoint range on 0xFFFE-0xFFFF to make sure the board isn't constantly resetting - I've seen small projects do this when they are unstable - and it isn't always apparent.
Check values in tasks.c like xTickCount and uxCurrentNumberOfTasks - xTickCount should increment until it rolls and uxCurrentNumberOfTasks should reflect the # of tasks that are running.
If you do the above you will prove the kernel is correct. This way you don't have to worry about trace hook macros. I think when you have the system stable and you want to do some fine tuning - the the trace hook macros may be more appropriate.
RE: Trace Hook MacrosPosted by zy015240 on July 10, 2009 Hi John, Thanks for you advice. I will do follow your advice next week. BTW, I download your IAR+MSP430F5438 port from your web site and send you email for unzip password. After I test what you say ,I will let you know. Thanks.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|