jantje / hardware

Arduino eclipse plugin hardware support folders
6 stars 24 forks source link

localdebug does not compile with sloeber43 #20

Closed hyuni closed 5 years ago

hyuni commented 5 years ago

Eclipse Version: Eclipse IDE for C/C++ Developers Version: 2019-03 (4.11.0) Build id: 20190314-1200

Arduino C++ Tools 9.7.0.201903011129 Sloeber, the Eclipse Arduino IDE (plugin version) 4.3.1.201810101819

Describe the bug

I debugging MWC2.2 flight control for Flexbot quad board.

localdebug build below error message

In file included from ../sloeber.ino.cpp:105: ../HexNanoMWC_QUAD.ino:799:9: error: expression is not assignable ADCSRA |= _BV(ADPS2) ; ADCSRA &= ~_BV(ADPS1); ADCSRA &= ~_BV(ADPS0); // this speeds up analogRead without loosing too much resolution: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11


../HexNanoMWC_QUAD.ino:799:32: error: expression is not assignable
        ADCSRA |= _BV(ADPS2) ; ADCSRA &= ~_BV(ADPS1); ADCSRA &= ~_BV(ADPS0); // this speeds up analogRead without loosing too much resolution: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11
                               ~~~~~~ ^
../HexNanoMWC_QUAD.ino:799:55: error: expression is not assignable
        ADCSRA |= _BV(ADPS2) ; ADCSRA &= ~_BV(ADPS1); ADCSRA &= ~_BV(ADPS0); // this speeds up analogRead without loosing too much resolution: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11
                                                      ~~~~~~ ^
In file included from ../sloeber.ino.cpp:112:
../Output.ino:357:14: error: expression is not assignable
      TCCR4A |= (1<<WGM41); // phase correct mode
      ~~~~~~ ^
../Output.ino:358:14: error: expression is not assignable
      TCCR4A &= ~(1<<WGM40);
      ~~~~~~ ^
../Output.ino:363:14: error: expression is not assignable
      TCCR4A |= _BV(COM4A1); // connect pin 6 to timer 4 channel A
      ~~~~~~ ^
In file included from ../sloeber.ino.cpp:113:
../RX.ino:384:21: error: use of undeclared identifier 'cli'
    oldSREG = SREG; cli(); // Let's disable interrupts
                    ^
In file included from ../sloeber.ino.cpp:114:
../Sensors.ino:156:8: error: expression is not assignable
  TWSR = 0;                                    // no prescaler => prescaler = 1
  ~~~~ ^
../Sensors.ino:157:8: error: expression is not assignable
  TWBR = ((F_CPU / I2C_SPEED) - 16) / 2;       // change the I2C clock rate
  ~~~~ ^
../Sensors.ino:158:8: error: expression is not assignable
  TWCR = 1<<TWEN;                              // enable twi module, no interrupt
  ~~~~ ^
../Sensors.ino:162:8: error: expression is not assignable
  TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN) ; // send REPEAT START condition
  ~~~~ ^
../Sensors.ino:164:8: error: expression is not assignable
  TWDR = address;                              // send device address
  ~~~~ ^
../Sensors.ino:165:8: error: expression is not assignable
  TWCR = (1<<TWINT) | (1<<TWEN);
  ~~~~ ^
../Sensors.ino:170:8: error: expression is not assignable
  TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
  ~~~~ ^
../Sensors.ino:175:8: error: expression is not assignable
  TWDR = data;                                 // send data to the previously addressed device
  ~~~~ ^
../Sensors.ino:176:8: error: expression is not assignable
  TWCR = (1<<TWINT) | (1<<TWEN);
  ~~~~ ^
../Sensors.ino:181:8: error: expression is not assignable
  TWCR = (1<<TWINT) | (1<<TWEN) | (ack? (1<<TWEA) : 0);
  ~~~~ ^
../Sensors.ino:201:12: error: expression is not assignable
      TWCR = 0;                  //and we force a reset on TWINT register
      ~~~~ ^
../Sensors.ino:801:8: error: expression is not assignable
  TWBR = ((F_CPU / 400000L) - 16) / 2; // change the I2C clock rate to 400kHz, ADXL435 is ok with this speed
  ~~~~ ^
jantje commented 5 years ago

Local debug is meant to debug "business logic" and "hardware code" should be excluded from the build.