Go to Post "Well-resourced" teams with "deep pockets" don't just spring up, they are usually the result of a lot of hard work. - artdutra04 [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-09-2006, 23:32
foobert foobert is offline
Registered User
no team
 
Join Date: May 2005
Location: oakland, ca
Posts: 87
foobert is a jewel in the roughfoobert is a jewel in the roughfoobert is a jewel in the rough
Re: Arrays in Vex Programming Kit EasyC?

perhaps if you declared the array static you could get it off the stack.

but remember alls you gets is a meager 2k for everything.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-09-2006, 07:04
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,695
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Arrays in Vex Programming Kit EasyC?

You are running into defined limits on how many bytes of global or local variables are available within any one project file or within any one routine.
It's not your one array of [56], but the sum of all the variables you've declared. For instance, if you have a couple of other variables declared, like so:

int a,b,c;
int example_array[55];

then

// int a,b,c;
int example_array[58];

would work for you.

The magic number is 256 bytes (or 128 int's).
  • 256 bytes of global variables (outside any routine or static) in any one project file (block).
  • 120 bytes of local variables declared within any single routine (not static)
but you should test the limits as you've been doing.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 12-09-2006 at 10:31.
Reply With Quote
  #3   Spotlight this post!  
Unread 12-09-2006, 17:05
sedim sedim is offline
SeDiM
no team
 
Join Date: Sep 2006
Location: NJ
Posts: 3
sedim is an unknown quantity at this point
Re: Arrays in Vex Programming Kit EasyC?

Thank you all for your contributions. Indeed, Mark McLeod's post is confirmed. I have also found out that we can utilize the "overlay" Storage class which acts as a static class but is initialized upon entry to the function. The maximums achieved are:

int array0[60];
overlay int array1[128];//But there are consequences

in the same function.

Best
Sedim
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vex programming kit Alex Burman FIRST Tech Challenge 1 30-03-2006 18:30
Pre-Load Arrays in EasyC, Possible? Chris_Elston Programming 6 22-02-2006 10:25
EasyC 2.0 for VEX Robotics Kit jeffmorris Programming 7 26-01-2006 10:21
Vex programming kit finally available?? rswsmay General Forum 20 27-09-2005 22:08
White Paper Discuss: VEX / intelitek easyC programming document dez250 Extra Discussion 3 15-09-2005 15:20


All times are GMT -5. The time now is 00:59.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi