Forum Index
Link error on taskHeadroom()

 
Author Message
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 15 July 2008, 22:41 PM    Post subject: Link error on taskHeadroom()

I cannot use System.TaskHeadRoom() in my code. The linker fails to find taskHeadroom in zxLib 2.5.2
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 16 July 2008, 2:40 AM    Post subject: Re: Link error on taskHeadroom()

mikep wrote:
I cannot use System.TaskHeadRoom() in my code. The linker fails to find taskHeadroom in zxLib 2.5.2
The entry point was missing from the library. You can try the experimental (i.e. not fully tested) ZX Library v2.5.5. The .zip file contains an updated change history.
Back to top
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 16 July 2008, 4:58 AM    Post subject:

I have tested the new ZX library code and it works fine on a ZX24n. Here is some empirical data about the relative size of task stacks. These numbers have no margin at all.

TaskZVM StackNative StackGrowth
Main103281286%
Task13263197%
Task23271222%
Task372100139%
Task460115192%
Task53685236%

It is usual to have a ZVM stack margin of 10 bytes. I would suggest for a native mode device that this translates into a 30 byte margin. Here is some sample output from a ported native mode application using System.TaskHeadRoom()
Code:
Main       44
Indicators 30
Receive    30
Send       30
Update     30
Watchdog   44

Note that if you over allocate RAM, a task may still start ok but the stack headroom may get returned as &hFFFF.
Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group