arduino-1.6.5-r5 is the last that worked, 1.6.6 , 1.6.7 fail to compile this:

please see attached project.
Can be compiled between 1.0.6 and 1.6.5-r5 - not anymore :frowning:
please tell me why ?

MinimOSD.zip (116 KB)

1.6.6 and 1.6.7 responds very differently, 1.6.7 tries to suggests to load "FastSerial.h" before serial driver, but it's already in the beginning of the code.

I am hoping to remove fastserial altogether, but need to test whatever the native serial handling is good enough /(the reason it was once used, is that the internal serial port was blocking)

Please post the errors you get, and if it will fit, the code inside code tags. Try to make it convenient on the people you're asking for help from, by not making us download things (hell, some of us browse these forums on our phone - attachments are not viewable for us)

1.6.5r5 is what I'm currently recommending to people though - 1.6.6 introduced Arduino Builder and oodles of bugs that came with it, and 1.6.7 did not finish cleaning the mess.

that's funny, when I have a huge project with lots of libraries and extra data, that needs extra hardware to be useful, and ask a simple question about some small piece of code, a "grumpy" user we know always starts asking for the whole thing , until another user just answers.

Now that I post the whole (small) project, I am asked to just do a code snippet :slight_smile:

Any half-decent phone can download/extract this, and you can also compile it on Android.
But the issue here is very complex/many errors on 1.6.6 (no point spamming down the thread with 200 lines) , while 1.6.7 just says , like mentioned above, that a library (first thing) needs to be before serial driver..

Maybe you're misunderstanding.

I asked for you to post the errors that you got out of it and IF it would fit, the code to be posted in code tags. By all means, attach it if it's too big to fit. Snippets are useless, I would never ask you to post one of those.

The error output, however, is not useless - and presumably it's right at your fingertips, whereas I'd have to get to a computer with the Arduino IDE on it, install the version of the IDE that you say causes the problem (I use 1.6.5-r5 for my own projects, because 1.6.6 and 1.6.7 seem to have lots of problems), find and download all the libraries, and then click compile - to get a piece of information that is right in front of you that you need only copy/paste out.

The contents of error messages are very important, and whenever asking for any help with any computer problem, you should always post the complete content of any and all error messages. Paraphrasing error messages leads only to miscommunication and frustration, which is why I ask for exact text of the errors.

See also this:
http://forum.arduino.cc/index.php?topic=373545.0

with more info on the problems with 1.6.6 and later.

(apparently unable to post over 9000 characters, so I'll remove some similar warnings)

1.6.5-r5 (and older) compiles fine, with warnings.

1.6.6 errors:

In file included from sketch/ArduCam_Max7456.cpp:12:0:
/home/andre/Arduino/arduino-1.6.6/hardware/arduino/avr/libraries/EEPROM/EEPROM.h:43:30: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const uint8_t() const       { return **this; }
                              ^
/home/andre/Arduino/arduino-1.6.6/hardware/arduino/avr/libraries/EEPROM/EEPROM.h:92:26: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const int() const          { return index; }
                          ^
sketch/ArduCam_Max7456.cpp: In member function 'void OSD::write_NVM(int, uint8_t*)':
sketch/ArduCam_Max7456.cpp:271:25: warning: variable 'char_address_lo' set but not used [-Wunused-but-set-variable]
   byte char_address_hi, char_address_lo;
                         ^
In file included from /home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/MinimOsd_Extra_Copter_Pre_release_Beta.ino:58:0:
/home/andre/Arduino/projects/libraries/FastSerial/FastSerial.h:47:3: error: #error Must include FastSerial.h before the Arduino serial driver is defined.
 # error Must include FastSerial.h before the Arduino serial driver is defined.
   ^
In file included from /home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/MinimOsd_Extra_Copter_Pre_release_Beta.ino:58:0:
/home/andre/Arduino/projects/libraries/FastSerial/FastSerial.h:95:25: error: conflicting declaration 'FastSerial Serial'
 extern class FastSerial Serial;
                         ^
In file included from /home/andre/Arduino/arduino-1.6.6/hardware/arduino/avr/cores/arduino/Arduino.h:224:0,
                 from sketch/MinimOsd_Extra_Copter_Pre_release_Beta.ino.cpp:1:
/home/andre/Arduino/arduino-1.6.6/hardware/arduino/avr/cores/arduino/HardwareSerial.h:143:25: error: 'Serial' has a previous declaration as 'HardwareSerial Serial'
   extern HardwareSerial Serial;
                         ^

In file included from /home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/MinimOsd_Extra_Copter_Pre_release_Beta.ino:82:0:

 void setHomeVars(OSD &osd)
      ^
In file included from /home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/MinimOsd_Extra_Copter_Pre_release_Beta.ino:58:0:
/home/andre/Arduino/projects/libraries/FastSerial/FastSerial.h:306:18: error: conflicting declaration 'FastSerial Serial'
  FastSerial _name(_num,                                          \
                  ^
/home/andre/Arduino/projects/libraries/FastSerial/FastSerial.h:329:40: note: in expansion of macro 'FastSerialPort'
 #define FastSerialPort0(_portName)     FastSerialPort(_portName, 0)
                                        ^
/home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/MinimOsd_Extra_Copter_Pre_release_Beta.ino:95:1: note: in expansion of macro 'FastSerialPort0'
 FastSerialPort0(Serial);
 ^
In file included from /home/andre/Arduino/arduino-1.6.6/hardware/arduino/avr/cores/arduino/Arduino.h:224:0,
                 from sketch/MinimOsd_Extra_Copter_Pre_release_Beta.ino.cpp:1:
/home/andre/Arduino/arduino-1.6.6/hardware/arduino/avr/cores/arduino/HardwareSerial.h:143:25: error: 'Serial' has a previous declaration as 'HardwareSerial Serial'
   extern HardwareSerial Serial;
                         ^
In file included from /home/andre/Arduino/projects/libraries/FastSerial/FastSerial.h:56:0,
                 from /home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/MinimOsd_Extra_Copter_Pre_release_Beta.ino:58:
/home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/Font.ino: In function 'void uploadFont()':
/home/andre/Arduino/projects/libraries/FastSerial/BetterStream.h:33:28: error: 'class HardwareSerial' has no member named '_printf_P'
 #define printf_P(fmt, ...) _printf_P((const prog_char *)fmt, ## __VA_ARGS__)
                            ^
/home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/Font.ino:13:12: note: in expansion of macro 'printf_P'
     Serial.printf_P(PSTR("RFF\n"));
            ^
/home/andre/Arduino/projects/libraries/FastSerial/BetterStream.h:33:28: error: 'class HardwareSerial' has no member named '_printf_P'
 #define printf_P(fmt, ...) _printf_P((const prog_char *)fmt, ## __VA_ARGS__)
                            ^
/home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/Font.ino:46:20: note: in expansion of macro 'printf_P'
             Serial.printf_P(PSTR("CD\n"));
                    ^

  
....REMOVED SIMIALR STUFF HERE....

                     ^
exit status 1
Error compiling.

1.6.7:

Build options changed, rebuilding all
In file included from /home/andre/Arduino/projects/MinimOsd_Extra_Copter_Pre_release_Beta/MinimOsd_Extra_Copter_Pre_release_Beta.ino:58:0:
/home/andre/Arduino/projects/libraries/FastSerial/FastSerial.h:47:3: error: #error Must include FastSerial.h before the Arduino serial driver is defined.
 # error Must include FastSerial.h before the Arduino serial driver is defined.
   ^
exit status 1
Error compiling.

had to remove tons of warnings from the 1.6.6 log
hope this helps..

I frankly have no idea how that ever worked - it looks like they somehow managed to get the compiler to build FastSerial before it's build HardwareSerial, which is part of the core. In fact, it looks like a total replacement for HardwareSerial.

I think the new compiler toolchain they're using "arduino builder", doesn't have the same behavior in this case, and is pulling in all the core libraries before

Fixing this problem is too deep for me - that's still black magic for me. You might want to talk to the creator of the FastSerial library about how to make it compatible with new versions of the IDE.