Arduino IDE hangs on compiling

Hello, everyone. I’ve got some code that causes my Arduino IDE to hang when I try to compile it. I get no errors - it just sits there saying “Compiling sketch…”

If anyone can see this issue, I sure would appreciate their help!

Many, many thanks in advance!

[quote]


#include <Wire.h>     // I2C LIBRARY FOR MPR121
#include "mpr121.h"   // MPR121 register definitions
#include "fingerings.h" // FINGERING TABLES
#include "samples.h" // SOUND SAMPLES

// SELECT HERE WICH INSTRUMENT TO USE
//#define GAITA_GALEGA
//#define GAITA_ASTURIANA
#define GHB
//#define UILLEANN
//#define SACKPIPA

// DISABLE DRONE COMMENTING THE FOLLOWING LINE
//#define ENABLE_DRONE

// THE FOLLOWING LINES ASSOCAITES FINGERINGS AND SOUND SAMPLES FOR EVERY INSTRUMENT
#ifdef GAITA_GALEGA
  #define FINGERING FINGERING_GAITA_GALEGA
  #define INSTRUMENT INSTRUMENT_GAITA_GALEGA
  //#define INSTRUMENT INSTRUMENT_SINUSOIDS
#endif

#ifdef GAITA_ASTURIANA
  #define FINGERING FINGERING_GAITA_ASTURIANA
  #define INSTRUMENT INSTRUMENT_GAITA_ASTURIANA
#endif

#ifdef GHB
  #define FINGERING FINGERING_GREAT_HIGHLAND_BAGPIPE  
  #define INSTRUMENT INSTRUMENT_GHB
#endif

#ifdef UILLEANN
  #define FINGERING FINGERING_UILLEANN_PIPE
  #define INSTRUMENT INSTRUMENT_UILLEANN
#endif

#ifdef SACKPIPA
  #define FINGERING FINGERING_SACKPIPA
  #define INSTRUMENT INSTRUMENT_SACKPIPA
#endif


#define REBOOT_ON_SILENCE
#define DEBOUNCE_DELAY 10
#define SAMPLE_RATE 44100 // THIS PARAMETER MUST MATCH THE CORRESPONDING ONE IN samples.py

/* AUDIO/VISUAL OUTPUT PINS */
int LED = 13;
int speakerPin = 11;

// GLOBAL VARIABLES
uint16_t fingers;
uint16_t control;
uint8_t previous_note,note;
uint8_t previous_sample,sample, drone_sample;
uint8_t sample_index, drone_index;
uint16_t drone_sample_length;
unsigned long * fingering_table;
sample_t* samples_table;
uint8_t playing;

int timestamp;

void setup()
{
  Serial.begin(115200);
  Serial.println("SETUP...");
  Serial.print("FINGERING: ");
  Serial.println(fingerings[FINGERING].name);
  fingering_table=fingerings[FINGERING].table;
  //Serial.print("INSTRUMENT: ");
  //Serial.println(instruments[INSTRUMENT].name);
  //samples_table=instruments[INSTRUMENT].samples;
  samples_table=INSTRUMENT;
  
#ifdef ENABLE_DRONE
  Serial.print("DRONE NOTE: ");
  Serial.print(fingering_table[2],DEC);
  Serial.print(" DRONE SAMPLE: ");
  drone_sample=note_to_sample(fingering_table[2]);
  Serial.print(drone_sample,DEC);
  drone_sample_length=samples_table[drone_sample].len;
  Serial.print(" LENGTH: ");
  Serial.println(drone_sample_length,DEC);
#endif
  

  pinMode(LED,OUTPUT);
  
  pinMode(A3,OUTPUT);
  pinMode(A2,OUTPUT);
  pinMode(12,OUTPUT);
  
  
  digitalWrite(A3, LOW); //GND
  digitalWrite(A2, HIGH);   //VCC
  digitalWrite(12, LOW); //SPEAKER GND
  

  Wire.begin();
  mpr121QuickConfig();
  startPlayback();

  previous_note=0xFF;
  sample_index=0;
  drone_index=0;
  previous_sample=0;
  
  playing=0;
  
  // UNCOMMENT FOR SOUND SAMPLE DEBUG OUTPUT
  /*
  int i;
  int16_t tmp;
  for (i=0; i< samples_table[previous_sample].len; i++){
    tmp=samples_table[previous_sample].sample[i];
    tmp = pgm_read_byte_near(((uint8_t*)samples_table[previous_sample].sample) + i);
    Serial.println(tmp);
  }
  */
     
}


// I HAD TO REMOVE SOME CODE DUE TO THE MESSAGE BEING TOO LONG

Often when it hangs, it’s due to a missing " at the end of a Serial.print.
Next time, use code tags , the </> button.
You can also Reply and then use the Attach feature to attach your file if when it’s too long to fit.

If anyone can see this issue

Without seeing all the libraries? Not likely.

If you're using an older version of the Arduino IDE, especially 1.6.4, try updating to a newer version. There was a bug causing this that has been fixed.

Thanks, everyone. Looks like pert nailed it - I had to update my IDE.

Take care!