MPLAB error

Thread Starter

knwnuts

Joined Mar 4, 2009
3
Hi...im using MPLAB IDE(lite) to program pic. But i have this error which i have no idea where to check. Anyone can help?
The error is as below:
Error [1347] ; 0. can't find 0x90 words (0x90 withtotal) for psect "text76" in segment "CODE" (largest unused contiguous range 0x31)
 

Thread Starter

knwnuts

Joined Mar 4, 2009
3
the code is quite long...and i've put bank1 to the arrays..the errors are lesser now..the errors:
Executing: "C:\Program Files\HI-TECH Software\PICC\LITE\9.60\bin\picl.exe" -C "C:\Documents and Settings\admin\Desktop\ZD\main.c" --chip=16F627A -P --opt=default -q -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Warning [348] C:\Documents and Settings\admin\Desktop\ZD\main.c; 36.23 auto variable "delay_addr" should not be qualified
Warning [348] C:\Documents and Settings\admin\Desktop\ZD\main.c; 37.23 auto variable "delay_cmd1" should not be qualified
Warning [348] C:\Documents and Settings\admin\Desktop\ZD\main.c; 38.23 auto variable "delay_cmd2" should not be qualified
Warning [348] C:\Documents and Settings\admin\Desktop\ZD\main.c; 39.23 auto variable "delay_cmd3" should not be qualified
Warning [348] C:\Documents and Settings\admin\Desktop\ZD\main.c; 40.23 auto variable "delay_cmd4" should not be qualified
Executing: "C:\Program Files\HI-TECH Software\PICC\LITE\9.60\bin\picl.exe" -oillum_fw.cof -millum_fw.map --runtime=default,-clear,-init,-keep,-osccal,-download,-ramtest,-resetbits main.obj "C:\Documents and Settings\admin\Desktop\ZD\illum_fw.hex" --chip=16F627A -P --opt=default -q -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [491] ; . can't find 0x114 words for psect "rbss_0" in segment "BANK0"
Error [491] ; . can't find 0x14 words for psect "rdata_0" in segment "BANK0"
Error [593] ; . can't find 0x3F6 words (0x3f6 withtotal) for psect "text10" in segment "CODE"


not so sure if putting bank1 is a gd idea.

Rich (BB code):
#include <pic.h>
#include "delay_.h"
 
char led_c=2;    
long counter = 0;    
char stepPointer = 0;  
bit flagA;
bit flagB;
bit flagP;
bit flagM;
char a;
char resol = 0xFE;    
int i;
#include "step_table.h"   
#define  button_A RA4
#define  button_B RA1
#define  button_P RA3
#define  button_M RA2
#define  G1_LED1  RB6  
#define  G1_LED2  RB2  
#define  G1_LED3  RB4  
#define  G2_LED1  RB1  
#define  G2_LED2  RB5 
#define  transmitted RB7 
#include "initialize.h"   
#include "buttonM.h"
#include "buttonP.h"
#include "buttonA.h"
#include "buttonB.h"  

void main(void)
{ 
 bank1 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
 bank1 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
 bank1 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
 bank1 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
 bank1 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
 __CONFIG(0x3E01);
 initialize(); 
 for (i=0; i<2; i++)
 {
  DelayUs(delay_addr);
 }
 for(i=2; i<18 ;i++)
 {
  G1_LED1=1;
  DelayUs(delay_addr[i*2-1]);
  G1_LED1=0;
  DelayUs(delay_addr[i*2]);
 }
  if (button_A==1) 
 {
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   DelayUs(delay_cmd1[i*3]);
   G1_LED1=0;
   DelayUs(delay_cmd1[i*3+1]); 
  }
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   DelayUs(delay_cmd1[i*3]);
   G1_LED1=0;
   DelayUs(delay_cmd1[i*3+2]); 
  }
 }
 if (button_B==1)
 {
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   DelayUs(delay_cmd2[i*3]);
   G1_LED1=0;
   DelayUs(delay_cmd2[i*3+1]); 
  }
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   G1_LED1=0;
   DelayUs(delay_cmd2[i*3+2]); 
  }
 }
 if (button_M==1)
 {
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   DelayUs(delay_cmd3[i*3]);
   G1_LED1=0;
   DelayUs(delay_cmd3[i*3+1]); 
  }
   DelayUs(delay_cmd2[i*3]);
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   DelayUs(delay_cmd3[i*3]);
   G1_LED1=0;
   DelayUs(delay_cmd3[i*3+2]); 
  } 
 }
 if (button_P==1)
 {
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   DelayUs(delay_cmd4[i*3]);
   G1_LED1=0;
   DelayUs(delay_cmd4[i*3+1]); 
  }
  for(i=0; i<8 ;i++)
  {
   G1_LED1=1;
   DelayUs(delay_cmd4[i*3]);
   G1_LED1=0;
   DelayUs(delay_cmd4[i*3+2]); 
  }
 }
 while(1)
 { 
  for(counter=0; counter<AUTOOFFTIME; counter++)   
  {
   DelayMs(5);   
   if(AUTOOFF==0) counter=0;
   if (button_A == 0) 
   {
    buttonA();  
    counter = 0; 
   }
   else if (button_B == 0) 
   {
    buttonB();    
    counter = 0;   
   }
 
   else if (button_P == 0) 
   {
    buttonP();     
    counter = 0;     
   }
 
   else if (button_M == 0) 
   {
    buttonM();     
    counter = 0;  
   } 
 
   else 
   {
    asm("nop"); 
   }
  }
 
 a = PORTB;
 PORTB =1;    
 CCP1CON = 0;  
 while (1)           
 {
  DelayMs (5);
  if ((PORTA & 30) != 30) 
  {
    DelayMs (10);
    CCP1CON = 0x1F;
    asm("nop");
    PORTB = a;
    asm("nop");
    counter = 0;
    DelayMs (30);
    break;
  }
 }
  }
}
 

Thread Starter

knwnuts

Joined Mar 4, 2009
3
Actually i made another program...but still the same kind of errors..
Error [1347] ; 0. can't find 0x90 words (0x90 withtotal) for psect "text76" in segment "CODE" (largest unused contiguous range 0x31)
Error [1347] ; 0. can't find 0x8C words (0x8c withtotal) for psect "text77" in segment "CODE" (largest unused contiguous range 0x31)
Error [1347] ; 0. can't find 0x6A words (0x6a withtotal) for psect "text75" in segment "CODE" (largest unused contiguous range 0x31)
Error [1347] ; 0. can't find 0x17 words (0x17 withtotal) for psect "text81" in segment "CODE" (largest unused contiguous range 0x0)


Rich (BB code):
Rich (BB code):
#include <pic.h>
#include "delay_.h"
#include "ir_.h"
 
char led_c=2;    
long counter= 0;   
char stepPointer = 0;  
bit flagA;
bit flagB;
bit flagP;
bit flagM;
char a;
char resol = 0xFE;   

#include "step_table.h"  

#define  button_A RA4
#define  button_B RA1
#define  button_P RA3
#define  button_M RA2
#define  G1_LED1  RB6  
#define  G1_LED2  RB2  
#define  G1_LED3  RB4 
#define  G2_LED1  RB1 
#define  G2_LED2  RB5  
#define  transmitted RB7 
#include "initialize.h"   
#include "buttonM.h"
#include "buttonP.h"
#include "buttonA.h"
#include "buttonB.h"  
void main(void)
{
 __CONFIG(0x3E01);
 initialize();  
 while(1)
 { 
     
 
  for(counter=0; counter<AUTOOFFTIME; counter++)    //an infinite loop for continuous reading of interrupts.
  {
   DelayMs(5);   
       
   if(AUTOOFF==0) counter=0;
   if (button_A == 0) //if button A press down
   {
    Send_IR_Command(0b0110000111010110,0b01001000);
    buttonA();  
    counter = 0; 
   }
   else if (button_B == 0) //if button B press down
   {
    Send_IR_Command(0b0110000111010110,0b01111000);
    buttonB();    
    counter = 0;  
   }
 
   else if (button_P == 0) //if button '+' press down
   {
    Send_IR_Command(0b0110000111010110,0b01011000);
    buttonP();     
    counter = 0;    
   }
 
   else if (button_M == 0) //if button '-' press down
   {
    Send_IR_Command(0b0110000111010110,0b10100000);
    buttonM();    
    counter = 0;   
   } 
 
   else 
   {
    asm("nop"); 
   }
  }
  a = PORTB;
 
  PORTB =1;   
  CCP1CON = 0;  
  while (1)    
        
  {
   DelayMs (5);
   if ((PORTA & 30) != 30) 
   {
    DelayMs (10);
    CCP1CON = 0x1F;
    asm("nop");
    PORTB = a;
    asm("nop");
    counter = 0;
    DelayMs (30);
    break;
   }
  }
 }
}
 

n9352527

Joined Oct 14, 2005
1,198
Usually the error means there is not enough memory location to place some variables. I see that you include other files, which are not posted above. It might be arrays in those other files are too large.
 

hatteet

Joined Mar 23, 2009
1
hello everybody......
how are you??
i need a necessery help ....
i need the wiper motor mplab code so that i can control it using the 16f877a pic..
thank u for helping me...
i need it in the nearest time plz....
thank u again


this is my e-mail for contact me
hatteet@yahoo.com
 
Top