Go to Post The robot is talking to you, you must listen to find out what might be wrong. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2005, 19:40
flounder22001's Avatar
flounder22001 flounder22001 is offline
Registered User
#1197
 
Join Date: Feb 2005
Location: CA
Posts: 2
flounder22001 is an unknown quantity at this point
32k controller limit

whenever i intialize _USE_CMU_CAMERA to be able to use the camera the .hex file size goes to 60k and the controller's limit is 32k

if anyone else has had this problem and has found a way around it , it would be really nice if you caould help us.
  #2   Spotlight this post!  
Unread 03-02-2005, 19:46
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: 32k controller limit

I was just wondering whose CMU cam code you are using? The official IFI code?
__________________
- from B B frank


Last edited by AIBob : 03-02-2005 at 19:54.
  #3   Spotlight this post!  
Unread 03-02-2005, 19:58
whakojacko's Avatar
whakojacko whakojacko is offline
Registered User
FRC #1072 (hrt)
Team Role: College Student
 
Join Date: Feb 2003
Rookie Year: 2003
Location: San Jose, California
Posts: 137
whakojacko is on a distinguished road
Send a message via AIM to whakojacko Send a message via MSN to whakojacko
Re: 32k controller limit

i never looked at the size, but ive been turning on and off that macro for testing stuff and its always loaded fine
__________________
Harker Robotics:1072
http://www.harker-robotics.org
  #4   Spotlight this post!  
Unread 03-02-2005, 20:05
flounder22001's Avatar
flounder22001 flounder22001 is offline
Registered User
#1197
 
Join Date: Feb 2005
Location: CA
Posts: 2
flounder22001 is an unknown quantity at this point
Re: 32k controller limit

i'm using the official default code supplied by first (or ifi)

whackjacko: can you check the size of the .hex file with the macro on and tell me what it is?
  #5   Spotlight this post!  
Unread 03-02-2005, 20:32
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: 32k controller limit

To look at what is filling up your 32KB, you can just loop at the .map file....
if that is not there, then you can produce it by going to:
Project -> Build Options... -> Project :::::: <MPLINK Linker> Check "Generate map file"
__________________
- from B B frank

  #6   Spotlight this post!  
Unread 03-02-2005, 21:22
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: 32k controller limit

Quote:
Originally Posted by flounder22001
whenever i intialize _USE_CMU_CAMERA to be able to use the camera the .hex file size goes to 60k and the controller's limit is 32k.
The file size is not the same thing as the code size. The .hex file contains more than just the raw bits which end up in the flash memory of the controller. Look in the .map file to find out how much space the program is actually taking.
  #7   Spotlight this post!  
Unread 04-02-2005, 18:48
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: 32k controller limit

Quote:
Originally Posted by Alan Anderson
The file size is not the same thing as the code size. The .hex file contains more than just the raw bits which end up in the flash memory of the controller. Look in the .map file to find out how much space the program is actually taking.
Indeed. It's in Intel-Hex (google for it if you really want to know). Mine is 69 KB, but the MAP file says that the code is using 72% of my program memory (or 24K).
  #8   Spotlight this post!  
Unread 05-02-2005, 14:10
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
Re: 32k controller limit

We saw this after trying to combine the Navigation code and the camera code. I noticed that the default project settings turn off a lot of the optimizations the compiler can do, resulting in larger slower code. This may be needed for the simulator or a debugger, but without them the code was 1/2 the size.

I also saw that the largest module was vprintf (~4k). If you get rid of all printf calls, this will go away. You can sill use puts(), itoa(), ltoa() ... which are smaller.

Of course there is no substitute for going through the code and removing anything you don't need. Some of the sample code could be made smaller and faster (but probably less readable) too.
__________________
Don Reid
  #9   Spotlight this post!  
Unread 06-02-2005, 09:26
Plloyd Plloyd is offline
Registered User
no team
 
Join Date: Sep 2004
Location: Toronto
Posts: 6
Plloyd is an unknown quantity at this point
Re: 32k controller limit

Thanks guys, this discussion is very helpful... to many more than just myself I am certain.
However, I am still confused about how we can use external memory, and the consequences of doing that (runs slower?)
Also, how do you modify the optimization settings of the project?

Thanks,
Plloyd
  #10   Spotlight this post!  
Unread 07-02-2005, 00:01
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
Re: 32k controller limit

Quote:
Originally Posted by Plloyd
Also, how do you modify the optimization settings of the project?
There is a tool on the MPLAB toolbar for the build options, or find it under
the Project menu. There is a line like this:

-D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-

The -O*- settings are turning off various optomizations. Remove them
to turn things back on.
__________________
Don Reid
Closed Thread


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
Speed controllers won't communicate w/robot controller steven114 Control System 12 03-02-2005 21:26
Robot Controller File Size Limit ?? RoboGeek Programming 1 17-01-2005 19:59
2003 robot controller & interface LGuY Control System 3 04-04-2004 16:01
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
serious problem found - robot controller resets when jarred! KenWittlief Electrical 23 19-03-2003 13:30


All times are GMT -5. The time now is 17: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