Go to Post And THAT is why they have safety manuals. - Eria4044 [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 12-03-2009, 01:58
skiz skiz is offline
Registered User
no team
 
Join Date: Mar 2009
Location: Singapore
Posts: 5
skiz is an unknown quantity at this point
MPLAB error segment

Hi...I'm currently using MPLAB to program pic. I've managed to correct the errors except when this error comes up instead..

Error [1347] ; 0. can't find 0x90 words (0x90 withtotal) for psect "text76" in segment "CODE" (largest unused contiguous range 0x31)

I do not even know where to start? Anyone knows? Thanks!
  #2   Spotlight this post!  
Unread 12-03-2009, 02:19
engunneer's Avatar
engunneer engunneer is offline
Alumni turned Mentor
AKA: Branden Gunn
FRC #4761
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1996
Location: Reading, MA
Posts: 877
engunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond repute
Re: MPLAB error segment

sounds like you have too many variables, or are using too much space in the EEPROM.

look to see where you are defining that variable, (or including the file that does) and see if you can remove it temporarily.

You may also consider reducing the size of any arrays or strings you are using that are taking more than absolutely needed.


Reminds me of my FIRST days, programming in PBASIC. We only had 26 BYTES of general purpose RAM for variables. I will admit to storing bit flags in extra direction registers and unused pins...
__________________
Student FRC23 (1996-1999), Mentor FRC246 (2000), Mentor FRC1318 (2007-2009), Mentor FRC93 (2011), Mentor FRC2151 (2012), Mentor FRC23 (2013), Mentor FRC4761 (2014-2017)
1998 - National Chairman's Award and Woodie Flowers Award (FRC23, Mike Bastoni ) | 2007 - PNW SF (488, 1595) | 2008 - Oregon RCA - Seattle #2 Seed, SF (488, 1696) | 2009 - Oregon #1 Seed, Winners (1983, 2635) - Seattle SF (945, 2865) - Galileo #2 Seed, SF (973, 25) | 2012 Midwest F (111, 71) | 2014 RIDE Winners (78, 125), Inspector - NEU #24, QF (3479, 3958) - NECMP #35 | 2015 Reading #11, SF (1058, 190), Inspector - RIDE #17, QF(4055, 5494), Inspector - NECMP #57 | 2016 Reading #4, SF (133, 4474), DCA, Inspector - Ride #22, SF (1735, 2067), Creativity, Inspector - NECMP #48, RCA - Archimedes
  #3   Spotlight this post!  
Unread 12-03-2009, 03:27
skiz skiz is offline
Registered User
no team
 
Join Date: Mar 2009
Location: Singapore
Posts: 5
skiz is an unknown quantity at this point
Re: MPLAB error segment

i was thinking of the variables sizes are over the limit too...but i have no idea how to reduce it. haa..

hmmm...is there a pro version at internet without evaluation period? hee..
  #4   Spotlight this post!  
Unread 12-03-2009, 07:49
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: MPLAB error segment

If you have a "variable" that doesn't change (e.g. a text string), it can be placed in ROM instead of the CODE segment by using the rom keyword at the beginning of the variable declaration.
  #5   Spotlight this post!  
Unread 15-03-2009, 22:01
skiz skiz is offline
Registered User
no team
 
Join Date: Mar 2009
Location: Singapore
Posts: 5
skiz is an unknown quantity at this point
Re: MPLAB error segment

what if its array instead of a text string? for example:
Code:
int delay_addr[]= {9000,4500,560,560,560,1690,560,1690,560,560,560,560,560,560,560,560,560,1690,560,1690,2250,560,560,560,1690,560,560,560,1690,560,1690,560,560};	//0x61d6
int delay_cmd1[]= {560,560,1690, 560,1690,560, 560,560,1690, 560,560,1690, 560,1690,560, 560,560,1690, 560,560,1690, 560,560,1690};	//0x48
int delay_cmd2[]= {560,560,1690, 560,1690,560, 560,1690,560, 560,1690,560, 560,1690,560, 560,560,560,  560,560,560, 560,560,560};	//0x78
int delay_cmd3[]= {560,560,1690, 560,1690,560, 560,560,1690, 560,1690,560, 560,1690,560, 560,560,560,  560,560,560, 560,560,560};	//0x58
int delay_cmd4[]= {560,1690,560, 560,560,1690, 560,1690,560, 560,560,1690, 560,560,1690, 560,560,1690, 560,560,1690, 560,560,1690};	//0xA0
  #6   Spotlight this post!  
Unread 16-03-2009, 08:00
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: MPLAB error segment

Quote:
Originally Posted by skiz View Post
what if its array instead of a text string?
Lookup tables are actually the most common thing I've seen placed in ROM. Joystick value mapping and trig function arrays (sine, arctangent, etc.) are typical.

Code:
rom const int delay_addr[]= {9000,4500,560,560,560,1690,560,1690,560,560,560,560,560,560,560,560,560,1690,560,1690,2250,560,560,560,1690,560,560,560,1690,560,1690,560,560};	//0x61d6
  #7   Spotlight this post!  
Unread 16-03-2009, 20:42
skiz skiz is offline
Registered User
no team
 
Join Date: Mar 2009
Location: Singapore
Posts: 5
skiz is an unknown quantity at this point
Re: MPLAB error segment

But i get these errors when i change the code as above.
Warning [374] C:\Documents and Settings\admin\Desktop\ZD\main.c; 33.5 missing basic type; int assumed
Error [314] C:\Documents and Settings\admin\Desktop\ZD\main.c; 33.5 ";" expected


Btw, i put the above code outside void main (void). Because when i put it inside, there are more errors.
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
Generic error in MPLAB domoarigato Programming 11 01-12-2008 14:21
MPLAB build error cabbagekid2 Programming 7 12-01-2005 13:36
MPLAB IDE 6.60 Error mchan1111 Programming 8 08-11-2004 20:17
MPlab error ryan_f Programming 9 24-05-2004 07:30
Mplab startup error Team 869 Programming 6 25-01-2004 10:41


All times are GMT -5. The time now is 01:57.

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