View unanswered posts | View active topics It is currently Thu Aug 28, 2014 5:25 am






Reply to topic  [ 5 posts ] 
Max Tasks 
Author Message
Rookie

Joined: Sun Feb 23, 2014 3:56 pm
Posts: 8
Post Max Tasks
I have received an error indicating the maximum number of tasks is limited to 5... Is this correct?


Thu Mar 06, 2014 9:59 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3196
Location: Rotterdam, The Netherlands
Post Re: Max Tasks
Yes, according to LoadBuildOptionsVEXIQ.h, it's 5:
Code:
#define   kNumbOfTasks   (5)       // VexIQ


= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Mar 07, 2014 3:26 am
Profile WWW
Rookie

Joined: Sun Feb 23, 2014 3:56 pm
Posts: 8
Post Re: Max Tasks
Is this something that is limited by the capabilities of the VexIQ brain?


Fri Mar 07, 2014 4:42 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 602
Post Re: Max Tasks
Yep - each task that's running needs it's own stack/call space. ROBOTC only has about 16KB of the 32KB of RAM available to us (VEX's 'master firmware' uses the rest for things like radio/I2C buffers). So if we were to leave a reasonable of memory for each task (approx 2K per task), plus the ROBOTC overhead, that affects the number of tasks/threads we can run.

The VEX IQ supports 5 tasks: 1 "main" and 4 "user" tasks. There is a bug in the current build that "main" isn't being counted by the compiler when it compile-time allocates memory for each task.

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Fri Mar 07, 2014 4:48 pm
Profile
Rookie

Joined: Sun Feb 23, 2014 3:56 pm
Posts: 8
Post Re: Max Tasks
Ok, so if the individual tasks are very small and the total code size would remain under ~10k it shouldn’t present any problems… correct?


Fri Mar 07, 2014 5:07 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.