Strange error when compiling

Hi :slight_smile: So, I have a strange error that started without even changing anything to my sketch :confused:

From what I understand, It's it is forgetting a file... the file is 'esc_codes'

here is my project: GitHub - AlexandreRouma/ArduinOS: Serial OS For any Arduino

Sorry for the bad english :frowning:

Anyway, hope someone can help :slight_smile:

Arduino : 1.6.8 (Windows 7), Carte : "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\PC\AppData\Local\Arduino15\packages" -hardware "C:\Users\PC\Documents\Arduino\hardware" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\PC\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\PC\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -ide-version=10608 -build-path "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\PC\Documents\GitHub\ArduinOS\AduinOS\AduinOS.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\PC\AppData\Local\Arduino15\packages" -hardware "C:\Users\PC\Documents\Arduino\hardware" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\PC\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\PC\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -ide-version=10608 -build-path "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\PC\Documents\GitHub\ArduinOS\AduinOS\AduinOS.ino"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\sketch\AduinOS.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\sketch\AduinOS.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\sketch\AduinOS.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\sketch\AduinOS.ino.cpp" -o "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\sketch\AduinOS.ino.cpp" -o "C:\Users\PC\AppData\Local\Temp\build9f1b3a5149c00182e610496499216f44.tmp\sketch\AduinOS.ino.cpp.o"
C:\Users\PC\Documents\GitHub\ArduinOS\AduinOS\utils.ino: In function 'void setup()':

utils:12: error: 'ESC_RESET' was not declared in this scope

           return data;

               ^

C:\Users\PC\Documents\GitHub\ArduinOS\AduinOS\utils.ino: In function 'void loop()':

utils:24: error: 'COLOR_BLACK' was not declared in this scope

               Serial.write(c);

                ^

utils:26: error: 'COLOR_GREEN' was not declared in this scope

             else {

                ^

Utilisation de la bibliothèque EEPROM version 2.0 dans le dossier: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM 
exit status 1
'ESC_RESET' was not declared in this scope

Looks like a typical case where the arduino builder is confused.

Rename esc_codes.ino to esc_codes.h and add an include in AduinOS.ino

//Putty Start Command: -serial COM15 -sercfg 115200,8,n,1,N

#include <EEPROM.h>
#include "esc_codes.h"
...
...

Thanks, that fixed it :slight_smile:

alexandrerouma:
Thanks, that fixed it :slight_smile:

I know, I tested it before posting :smiley: Although I'm still on IDE 1.6.6 on Windows 8.