• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » System crashes after adding new task.
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

System crashes after adding new task.

System crashes after adding new task.

This question is answered
Steve Runion
Posted by Steve Runion
on Jun 26 2012 09:45 AM
Intellectual760 points

I am having a issue where adding simple task and crashing on bootup as a result.

The entire output of the console: " located entirely below 0x10000) xdc.runtime.Error.raise: terminating execution"

The ROV Statup State shows:

And looking at the task status under ROV view:

So all tasks are overunning theirs stacks supposedly.

Since there is not stack trace for the system once abort() occurs I put a break point in xdc_runtime_System_abort_F (found looking at the RPC regsiter) I get the following stack trace:

The error occurs in

Ptr TaskSupport_start(Ptr currTsk, ITaskSupport_FuncPtr enter, ITaskSupport_FuncPtr exit, Error_Block *eb)

    /*
     *  The SP register is only 16 bits on 28x. Ensure that the last address
     *  in the new stack is less than 0xffff
     */
    if (((ULong)tsk->stack) + (tsk->stackSize) >= MAX_SP_ADDR) {
        Error_raise(eb, TaskSupport_E_invalidStack, tsk->stack, 0);
        return (NULL);
    }

with tsk->stack = 0x006F0072  and task->stackSize = 0x00720045.

Looking inside Int Task_Module_startup (Int phase) i see that the task being initialized is the Zero'th statically created task that has an handle 0x0000C042 which Is not any of my tasks per ROV above.

What could be causing this? I only have 5 tasks with a total of 5k worth of stack and all evidence points to it being the first system task that is run.

Please advise.

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Steve Runion
    Posted by Steve Runion
    on Jun 26 2012 10:50 AM
    Intellectual760 points

    TMS320F28335 BTW.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Scott Gary
    Posted by Scott Gary
    on Jun 26 2012 18:30 PM
    Genius10040 points

    Steve,

    As you found, this error is raised when the Task startup function detected the Task’s stack range would go beyond the reach of the stack pointer (above 0xFFFF).  

    In ROV the values for stackBase all indicate above this value.  But this may be a red herring, because if a corruption of several kernel data structures occurs ROV can display extra bogus data.

    Are you explicitly specifying the stacks in high memory?

    Can you post the contents of your application configuration file (with the .cfg extension)?

    Also, any details on what you did to add the fifth task will help…

    Scott

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steve Runion
    Posted by Steve Runion
    on Jun 27 2012 07:23 AM
    Intellectual760 points

    6354.task.cfg

    3666.TMS320F28335.cmd.txt

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Scott Gary
    Posted by Scott Gary
    on Jun 27 2012 10:43 AM
    Verified Answer
    Verified by David Friedland
    Genius10040 points

    Steve,

    I think what is happening is that when you add the 5th task the allocated stack is getting placed above 0x10000.  If you have a map file I think you’ll see this.

    By default, Task.defaultStackSection for the C28 is: “.ebss:taskStackSection";

    In the linker command file .ebss is allowed to be placed in XRAM, which is above 0x10000

        .ebss               : >> L47SARAM | M01SARAM | XRAM 

     

    Also, I notice that the app configuration disables Task support for the dispatcher:

    Hwi.dispatcherTaskSupport = false;    

    Other stuff in the .cfg file implies that interrupts will post Tasks, so you’ll need to set

    Hwi.dispatcherTaskSupport = true;

    Otherwise Tasks may run immediately in the context of the interrupts.  This config parameter should be set to false only if interrupts will *not* be triggering Task scheduling.

    I think the overflow into XRAM is causing the Task startup issue, but the dispatcher support for Tasks being disabled will cause other issues.

    Scott

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steve Runion
    Posted by Steve Runion
    on Jun 27 2012 10:50 AM
    Intellectual760 points

    Gary,

       I will try these out and post results.

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steve Runion
    Posted by Steve Runion
    on Jun 27 2012 11:24 AM
    Intellectual760 points

    Is there a way I can specifically put the task stacks in a certain memory range. I have some large statically initialized data arrays which appear to go into .ebss, and .ebss is quite large 0x1036c. So it needs to go into external ram.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steve Runion
    Posted by Steve Runion
    on Jun 27 2012 11:26 AM
    Intellectual760 points

    I figured it out. I just assign the task stacks to go into on of the other sections that are totally in onboard ram.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use