Jump to content
Matze

Compile error

Recommended Posts

Hello guys,

I need help. I trust to program one LED with three Buttons on an MSP430, but when I compile the programme it shows an error. I have no Idea. In the following document you can see the code and the error report. Thank you.

 

int R1 = P2_1;                  // LED Rot
int G1 = P2_0;                  // LED Grün
int Blau1 = P1_5;               // LED Blau
int T1 = P1_4;                  // Taster 1
int T2 = P1_3;                  // Taster 2
int T3 = P1_2;                  // Taster 3

int Time = 300;                 // Variable 1
int Zeit = 100;                 // Variable 2


void setup() {
  pinMode(R1, OUTPUT);
  pinMode(G1, OUTPUT);
  pinMode(Blau1, OUTPUT);
  pinMode (T1, INPUT_PULLUP);
  pinMode (T2, INPUT_PULLUP);
  pinMode (T3, INPUT_PULLUP);

}

void loop() {

if(digitalRead(T1)==LOW) 
{  int i;

  for(i=0;i<=30;i++){
   digitalWrite(Blau1,HIGH);
   delay(50);
   digitalWrite(Blau1,LOW);
   delay(50);
   int i =+ 1;
  }
  
  for(i=0;i<=30;i++){
   digitalWrite(R1,HIGH);
   delay(50);
   digitalWrite(R1,LOW);
   delay(50);
   int i =+ 1;
  }
  
  for(i=0;i<=30;i++){
   digitalWrite(G1,HIGH);
   delay(50);
   digitalWrite(G1,LOW);
   delay(50);
   int i =+ 1; 
  }
}
 else{
    digitalWrite(G1,LOW);
    digitalWrite(R1,LOW);
    digitalWrite(Blau1,LOW);  
  }

if(digitalRead(T2)==LOW) 
   {
   digitalWrite(R1,HIGH);
   delay(Time);
   digitalWrite(R1,LOW);
   delay(Zeit);
   digitalWrite(R1,HIGH);
   delay(Time);
   digitalWrite(R1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);
   delay(Zeit);
   digitalWrite(G1,HIGH);
   delay(Time);
   digitalWrite(G1,LOW);
   delay(Zeit);
   digitalWrite(G1,HIGH);
   delay(Time);
   digitalWrite(G1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);


   digitalWrite(R1,HIGH);
   delay(Time);
   digitalWrite(R1,LOW);
   delay(Zeit);
   digitalWrite(R1,HIGH);
   delay(Time);
   digitalWrite(R1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);
   delay(Zeit);
   digitalWrite(G1,HIGH);
   delay(Time);
   digitalWrite(G1,LOW);
   delay(Zeit);
   digitalWrite(G1,HIGH);
   delay(Time);
   digitalWrite(G1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);
   delay(Zeit);
   digitalWrite(Blau1,HIGH);
   delay(Time);
   digitalWrite(Blau1,LOW);
   }

if(digitalRead(T3)==LOW) 
   {
     digitalWrite(R1,HIGH);
     delay(Time);
     digitalWrite(G1,HIGH);
     delay(Time);
     digitalWrite(R1,LOW);
     delay(Time);
     digitalWrite(Blau1,HIGH);
     delay(Time);
     digitalWrite(G1,LOW);
     delay(Time);
     digitalWrite(R1,HIGH);
     delay(Time);
     digitalWrite(R1,LOW);
     digitalWrite(Blau1,LOW);  
     delay(Time);
   }
   
   else{
     digitalWrite(G1,LOW);
     digitalWrite(R1,LOW);
     digitalWrite(Blau1,LOW);  
     }
 

}

JUSTUS.ino

Neues Textdokument.txt

Share this post


Link to post
Share on other sites

Just read the error report. It is pretty clear.

c:/users/ju-kr/documents/schule/facharbeit technik/energia/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld.exe: C:\Users\Ju-kr\AppData\Local\Temp\arduino_build_960527/JUSTUS.ino.elf 
section `.text' will not fit in region `rom'

Also of interest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×