Author Topic: Arduino: libraries are missing  (Read 12655 times)

Online AZ

  • Almost regular
  • **
  • Posts: 133
Arduino: libraries are missing
« on: June 15, 2016, 03:26:00 am »
i created a project using the AVR project wizard.
added an elementary "led on/off" sketch and tried to compile but :
Code: [Select]
-------------- Clean: Arduino Uno in Test (compiler: GNU GCC Compiler for AVR)---------------

Cleaned "Test - Arduino Uno"

-------------- Build: Arduino Uno in Test (compiler: GNU GCC Compiler for AVR)---------------

avr-g++ -DF_CPU=16000000L -DARDUINO=103 -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Wall -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I. -I/usr/bin/arduino/libraries/EEPROM -I/usr/bin/arduino/libraries/Ethernet -I/usr/bin/arduino/libraries/Firmata -I/usr/bin/arduino/libraries/Flash -I/usr/bin/arduino/libraries/LCD4884 -I/usr/bin/arduino/libraries/LCD4Bit_mod -I/usr/bin/arduino/libraries/LiquidCrystal -I/usr/bin/arduino/libraries/OBD -I/usr/bin/arduino/libraries/SD -I/usr/bin/arduino/libraries/SD/utility -I/usr/bin/arduino/libraries/Servo -I/usr/bin/arduino/libraries/SevenSegment -I/usr/bin/arduino/libraries/SoftwareSerial -I/usr/bin/arduino/libraries/SPI -I/usr/bin/arduino/libraries/Stepper -I/usr/bin/arduino/libraries/TinyGPS -I/usr/bin/arduino/libraries/Wire -I/usr/bin/arduino/libraries/Wire/utility -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -I/home/az/Dropbox/work/Arduino/libraries -c cores/CDC.cpp -o .objs/cores/CDC.o
avr-g++ -DF_CPU=16000000L -DARDUINO=103 -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Wall -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I. -I/usr/bin/arduino/libraries/EEPROM -I/usr/bin/arduino/libraries/Ethernet -I/usr/bin/arduino/libraries/Firmata -I/usr/bin/arduino/libraries/Flash -I/usr/bin/arduino/libraries/LCD4884 -I/usr/bin/arduino/libraries/LCD4Bit_mod -I/usr/bin/arduino/libraries/LiquidCrystal -I/usr/bin/arduino/libraries/OBD -I/usr/bin/arduino/libraries/SD -I/usr/bin/arduino/libraries/SD/utility -I/usr/bin/arduino/libraries/Servo -I/usr/bin/arduino/libraries/SevenSegment -I/usr/bin/arduino/libraries/SoftwareSerial -I/usr/bin/arduino/libraries/SPI -I/usr/bin/arduino/libraries/Stepper -I/usr/bin/arduino/libraries/TinyGPS -I/usr/bin/arduino/libraries/Wire -I/usr/bin/arduino/libraries/Wire/utility -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -I/home/az/Dropbox/work/Arduino/libraries -c cores/HardwareSerial.cpp -o .objs/cores/HardwareSerial.o
avr-g++ -DF_CPU=16000000L -DARDUINO=103 -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Wall -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I. -I/usr/bin/arduino/libraries/EEPROM -I/usr/bin/arduino/libraries/Ethernet -I/usr/bin/arduino/libraries/Firmata -I/usr/bin/arduino/libraries/Flash -I/usr/bin/arduino/libraries/LCD4884 -I/usr/bin/arduino/libraries/LCD4Bit_mod -I/usr/bin/arduino/libraries/LiquidCrystal -I/usr/bin/arduino/libraries/OBD -I/usr/bin/arduino/libraries/SD -I/usr/bin/arduino/libraries/SD/utility -I/usr/bin/arduino/libraries/Servo -I/usr/bin/arduino/libraries/SevenSegment -I/usr/bin/arduino/libraries/SoftwareSerial -I/usr/bin/arduino/libraries/SPI -I/usr/bin/arduino/libraries/Stepper -I/usr/bin/arduino/libraries/TinyGPS -I/usr/bin/arduino/libraries/Wire -I/usr/bin/arduino/libraries/Wire/utility -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -I/home/az/Dropbox/work/Arduino/libraries -c cores/HID.cpp -o .objs/cores/HID.o
cc1plus: error: /usr/bin/arduino/libraries/EEPROM: Not a directory
cc1plus: error: /usr/bin/arduino/libraries/Ethernet: Not a directory
cc1plus: error: /usr/bin/arduino/libraries/Firmata: Not a directory

Indeed there are no libraries in that location (usr/bin/arduino/libraries/). All libraries were installed at a different location.

How do i point the compiler to the right path?
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #1 on: June 15, 2016, 08:35:25 am »
Have you looked in Project -> Build options -> your target -> Search directories -> Compiler?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #2 on: June 15, 2016, 08:43:28 am »
Have you looked in Project -> Build options -> your target -> Search directories -> Compiler?

nope. But i see now that :
Simulator -Debug and Release set to use gnu gcc as a compiler. And in "search directories" -> compiler there are references to $ARDUINO_DIR, which i do not have set in the shell.

The rest of the targets (UNO etc) use gnu gcc for AVR. And also have exact same list of the dirs in the "Search directories"

I also noticed, that when i open/add ino file to the project i get :
Code: [Select]
Project's base path: /home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ/test/
Project's common toplevel path: /home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ/test/
Mozilla universal detection engine detected 'Pure *ASCII*'.
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Editor Open
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::GetGCCCompilerDirs(): Cannot get compiler dirs due to invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]: /usr/lib64/ccache/bin/avr-g++
NativeParser::DoFullParsing(): AddCompilerPredefinedMacros failed!
NativeParser::DoFullParsing(): Adding cpp/c files to batch-parser
NativeParser::DoFullParsing(): Added 21 source file(s) for project 'test' to batch-parser...
ClassBrowser::UpdateClassBrowserView(): No active project available.
NativeParser::GetAllPathsByFilename(): Traversing '/home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ/test' for: sketch.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- /home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ/test/sketch.cpp
NativeParser::CreateParser(): Finish creating a new parser for project 'test'
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
NativeParser::OnParserStart(): Starting batch parsing for project 'test'...
NativeParser::OnParserEnd(): Project 'test' parsing stage done!
Project 'test' parsing stage done (22 total parsed files, 20 tokens in 0 minute(s), 0.007 seconds).
NativeParser::GetAllPathsByFilename(): Traversing '/home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ/test' for: sketch.*
NativeParser::GetAllPathsByFilename(): Traversing ' - /home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ/test/' for: sketch.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- /home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ/test/sketch.cpp
SystemHeadersThread: /home/az/Dropbox/work/Arduino/libraries/ , 0
SystemHeadersThread: Total number of paths: 1
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.

/usr/lib64/ccache/bin/avr-g++ exists and part of the ccache-3.2.3-1.fc22.x86_64 rpm...
« Last Edit: June 15, 2016, 08:46:30 am by AZ »
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #3 on: June 15, 2016, 05:13:01 pm »
As far as I know this is the most up to date arduino wizard: https://github.com/obfuscated/cb_arduino_template
But I don't know if the simulator targets work at all, I've never tried them.

To debug you problems you can run the arduino ide and see what commands and options are executed.
Then you can try to replicate them in C::B.

did that . original arduino's ide 1.65. picks up the libraries with no issue. So i'm sure i didn't configured CB correctly.  just not sure what i need to configure....

P.S. I take that back - arduino is not compiling too.

So... the original Arduino IDE 1.6.5 with an empty sketch, compiles just fine:
Code: [Select]
void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

compiles fine :
Code: [Select]
Build options changed, rebuilding all

/home/az/bin/arduino-1.6.5-r5/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/az/bin/arduino-1.6.5-r5/hardware/arduino/avr/cores/arduino -I/home/az/bin/arduino-1.6.5-r5/hardware/arduino/avr/variants/standard /tmp/build4579544749990199953.tmp/sketch_jun15a.cpp -o /tmp/build4579544749990199953.tmp/sketch_jun15a.cpp.o
/home/az/bin/arduino-1.6.5-r5/hardware/tools/avr/bin/avr-gcc -c -g -x assembler-with-cpp -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/az/bin/arduino-1.6.5-r5/hardware/arduino/avr/cores/arduino
<skip>

 There are 3 installations of arduino on this laptop :
 a. system wide - using rpm
 b. this one - specific to "az" user   @/home/az/bin/arduino-1.6.5-r5/
 c. platformio - specific to "az" user @ /home/az/work/arduino/


Arduino IDE references only local, to its installation, files - /home/az/bin/arduino-1.6.5-r5/*
CB uses compiler from a system wide installation, but references libraries from 2 installations - system wide and "user's home":
Code: [Select]

-------------- Clean: Arduino Uno in test (compiler: GNU GCC Compiler for AVR)---------------

Cleaned "test - Arduino Uno"

-------------- Build: Arduino Uno in test (compiler: GNU GCC Compiler for AVR)---------------

avr-g++ -DF_CPU=16000000L -DARDUINO=103 -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Wall -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I. -I[b]/usr/bin/arduino/libraries/EEPROM[/b] -I/usr/bin/arduino/libraries/Ethernet -I/usr/bin/arduino/libraries/Firmata -I/usr/bin/arduino/libraries/Flash -I/usr/bin/arduino/libraries/LCD4884 -I/usr/bin/arduino/libraries/LCD4Bit_mod -I/usr/bin/arduino/libraries/LiquidCrystal -I/usr/bin/arduino/libraries/OBD -I/usr/bin/arduino/libraries/SD -I/usr/bin/arduino/libraries/SD/utility -I/usr/bin/arduino/libraries/Servo -I/usr/bin/arduino/libraries/SevenSegment -I/usr/bin/arduino/libraries/SoftwareSerial -I/usr/bin/arduino/libraries/SPI -I/usr/bin/arduino/libraries/Stepper -I/usr/bin/arduino/libraries/TinyGPS -I/usr/bin/arduino/libraries/Wire -I/usr/bin/arduino/libraries/Wire/utility -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -I/home/az/Dropbox/work/Arduino/libraries -c cores/CDC.cpp -o .objs/cores/CDC.o
avr-g++ -DF_CPU=16000000L -DARDUINO=103 -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Wall -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I. -I/usr/bin/arduino/libraries/EEPROM -I/usr/bin/arduino/libraries/Ethernet -I/usr/bin/arduino/libraries/Firmata -I/usr/bin/arduino/libraries/Flash -I/usr/bin/arduino/libraries/LCD4884 -I/usr/bin/arduino/libraries/LCD4Bit_mod -I/usr/bin/arduino/libraries/LiquidCrystal -I/usr/bin/arduino/libraries/OBD -I/usr/bin/arduino/libraries/SD -I/usr/bin/arduino/libraries/SD/utility -I/usr/bin/arduino/libraries/Servo -I/usr/bin/arduino/libraries/SevenSegment -I/usr/bin/arduino/libraries/SoftwareSerial -I/usr/bin/arduino/libraries/SPI -I/usr/bin/arduino/libraries/Stepper -I/usr/bin/arduino/libraries/TinyGPS -I/usr/bin/arduino/libraries/Wire -I/usr/bin/arduino/libraries/Wire/utility -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -I/home/az/Dropbox/work/Arduino/libraries -c cores/HardwareSerial.cpp -o .objs/cores/HardwareSerial.o
avr-g++ -DF_CPU=16000000L -DARDUINO=103 -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Wall -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I. -I/usr/bin/arduino/libraries/EEPROM -I/usr/bin/arduino/libraries/Ethernet -I/usr/bin/arduino/libraries/Firmata -I/usr/bin/arduino/libraries/Flash -I/usr/bin/arduino/libraries/LCD4884 -I/usr/bin/arduino/libraries/LCD4Bit_mod -I/usr/bin/arduino/libraries/LiquidCrystal -I/usr/bin/arduino/libraries/OBD -I/usr/bin/arduino/libraries/SD -I/usr/bin/arduino/libraries/SD/utility -I/usr/bin/arduino/libraries/Servo -I/usr/bin/arduino/libraries/SevenSegment -I/usr/bin/arduino/libraries/SoftwareSerial -I/usr/bin/arduino/libraries/SPI -I/usr/bin/arduino/libraries/Stepper -I/usr/bin/arduino/libraries/TinyGPS -I/usr/bin/arduino/libraries/Wire -I/usr/bin/arduino/libraries/Wire/utility -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include [b]-I/home/az/Dropbox/work/Arduino/libraries[/b] -c cores/HID.cpp -o .objs/cores/HID.o
cc1plus: error: /usr/bin/arduino/libraries/EEPROM: Not a directory
cc1plus: error: /usr/bin/arduino/libraries/Ethernet: Not a directory
cc1plus: error: /usr/bin/arduino/libraries/Firmata: Not a directory
<skip>

so i have :
Code: [Select]
-I/usr/bin/arduino/libraries/EEPROM
<skip>
-I/home/az/Dropbox/work/Arduino/libraries

I would think that next question will be - where CB gets the configuration for arduino from ?
And why does it think that EEPROM ( for eaxmple ) should be a file ?



 
« Last Edit: June 15, 2016, 05:53:11 pm by AZ »
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: Arduino: libraries are missing
« Reply #4 on: June 15, 2016, 05:33:53 pm »
Quote
I would think that next question will be - where CB gets the configuration for arduino from ?

Check the toolchain settings for the compiler.

http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler#Compiler-neutral_setup_steps

Quote
And why does it think that EEPROM ( for eaxmple ) should be a file ?
For this I would first check the Project settings.
If not there, then likely the Adv. Compiler Settings is the cause.

Tim S.
« Last Edit: June 15, 2016, 05:43:47 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #5 on: June 15, 2016, 06:40:48 pm »
Quote
I would think that next question will be - where CB gets the configuration for arduino from ?

Check the toolchain settings for the compiler.

http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler#Compiler-neutral_setup_steps

Quote
And why does it think that EEPROM ( for example ) should be a file ?
For this I would first check the Project settings.
If not there, then likely the Adv. Compiler Settings is the cause.

Tim S.

Thank you Tim.
The compiler is detected correctly - auto detection -> /usr/lib64/ccache.
Search directories has only"/usr/lib64/ccache/include"

I found and removed the var that was pointing to the second installation of the arduino's libraries. HAd to go thru all menus in the "Settings->Compiler"



Oh.... So if i check the "project build options" under "Search directories" i see _all_ libraries listed in the form of :
$(ARDUINO_DIR)/libraries/EEPROM etc etc.
If i select "Arduino Uno" under the probject -> there are only :
$(ARDUINO_DIR)/libraries
$(ARDUINO_DIR)/hardware/arduino/cores/arduino
$(ARDUINO_DIR)/hardware/arduino/variants/standard

listed. After i cleaned that up and tried to build:
Code: [Select]
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/CDC.cpp -o .objs/cores/CDC.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/HardwareSerial.cpp -o .objs/cores/HardwareSerial.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -mmcu=atmega328p -D__AVR_ATmega328P__ -Os -I/usr/bin/arduino/hardware/arduino/cores/arduino -I/usr/bin/arduino/libraries -I/usr/bin/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/HID.cpp -o .objs/cores/HID.o
cc1plus: error: /usr/bin/arduino/hardware/arduino/cores/arduino: Not a directory
cc1plus: error: /usr/bin/arduino/libraries: Not a directory
cc1plus: error: /usr/bin/arduino/hardware/arduino/variants/standard: Not a directory
Process terminated with status 1 (0 minute(s), 0 second(s))
 

It is clearly looking @ the wrong location for the libraries...
« Last Edit: June 15, 2016, 06:56:08 pm by AZ »
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #6 on: June 15, 2016, 07:05:28 pm »
I override the ARDUINO_DIR in the Project_build options -> Arduino Uno -> Custom Variables to point to the correct location :
/usr/share/arduino.

That seemed to help partially. For the standard ( generated by the "Arduino project" wizard ) sketch.cpp:
Code: [Select]
#include <Arduino.h>

/*
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
*/

void setup()
{
Serial.begin(9600);

// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}

void loop()
{
Serial.println("Hello world!");

digitalWrite(13, HIGH);   // set the LED on
delay(1000);              // wait for a second
digitalWrite(13, LOW);    // set the LED off
delay(1000);              // wait for a second
}
I've got :
Code: [Select]

-------------- Build: Arduino Uno in Test (compiler: GNU GCC Compiler for AVR)---------------

avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/CDC.cpp -o .objs/cores/CDC.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/HardwareSerial.cpp -o .objs/cores/HardwareSerial.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/HID.cpp -o .objs/cores/HID.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/IPAddress.cpp -o .objs/cores/IPAddress.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/main.cpp -o .objs/cores/main.o
In file included from cores/HardwareSerial.cpp:3:0:
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:98:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (i != buffer->tail) {
         ^
In file included from cores/HardwareSerial.cpp:3:0:
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp: In function 'void __vector_18()':
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:127:21: warning: unused variable 'c' [-Wunused-variable]
       unsigned char c = UDR0;
                     ^
In file included from cores/HardwareSerial.cpp:3:0:
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp: In member function 'void HardwareSerial::begin(long unsigned int, byte)':
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:368:11: warning: unused variable 'current_config' [-Wunused-variable]
   uint8_t current_config;
           ^
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp: In member function 'virtual size_t HardwareSerial::write(uint8_t)':
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:467:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while (i == _tx_buffer->tail)
            ^
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/new.cpp -o .objs/cores/new.o
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/IPAddress.cpp:21:0,
                 from cores/IPAddress.cpp:3:
/usr/share/arduino/hardware/arduino/cores/arduino/IPAddress.h: In member function 'IPAddress::operator uint32_t()':
/usr/share/arduino/hardware/arduino/cores/arduino/IPAddress.h:45:55: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     operator uint32_t() { return *((uint32_t*)_address); };
                                                       ^
/usr/share/arduino/hardware/arduino/cores/arduino/IPAddress.h: In member function 'bool IPAddress::operator==(const IPAddress&)':
/usr/share/arduino/hardware/arduino/cores/arduino/IPAddress.h:46:75: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     bool operator==(const IPAddress& addr) { return (*((uint32_t*)_address)) == (*((uint32_t*)addr._address)); };
                                                                           ^
/usr/share/arduino/hardware/arduino/cores/arduino/IPAddress.h:46:108: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     bool operator==(const IPAddress& addr) { return (*((uint32_t*)_address)) == (*((uint32_t*)addr._address)); };
                                                                                                            ^
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/Print.cpp -o .objs/cores/Print.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/Stream.cpp -o .objs/cores/Stream.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/Tone.cpp -o .objs/cores/Tone.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/USBCore.cpp -o .objs/cores/USBCore.o
In file included from cores/Stream.cpp:1:0:
/usr/share/arduino/hardware/arduino/cores/arduino/Stream.cpp: In member function 'bool Stream::find(char*)':
/usr/share/arduino/hardware/arduino/cores/arduino/Stream.cpp:78:30: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
   return findUntil(target, "");
                              ^
avr-gcc -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/WInterrupts.c -o .objs/cores/WInterrupts.o
avr-gcc -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/wiring.c -o .objs/cores/wiring.o
avr-gcc -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/wiring_analog.c -o .objs/cores/wiring_analog.o
avr-gcc -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/wiring_digital.c -o .objs/cores/wiring_digital.o
avr-gcc -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/wiring_pulse.c -o .objs/cores/wiring_pulse.o
avr-gcc -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/wiring_shift.c -o .objs/cores/wiring_shift.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/WMath.cpp -o .objs/cores/WMath.o
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c cores/WString.cpp -o .objs/cores/WString.o
WARNING: Can't read file's timestamp: /home/az/Dropbox/work/Arduino/Sketches/Examples/CB_PRJ_TEST/Test/libraries/libraries.cpp
avr-g++ -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -Os -mmcu=atmega328p -D__AVR_ATmega328P__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/libraries -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/lib64/ccache/include -c sketch.cpp -o .objs/sketch.o
avr-g++ -L/usr/lib64/ccache/lib -o bin/Release/Test.elf .objs/cores/CDC.o .objs/cores/HardwareSerial.o .objs/cores/HID.o .objs/cores/IPAddress.o .objs/cores/main.o .objs/cores/new.o .objs/cores/Print.o .objs/cores/Stream.o .objs/cores/Tone.o .objs/cores/USBCore.o .objs/cores/WInterrupts.o .objs/cores/wiring.o .objs/cores/wiring_analog.o .objs/cores/wiring_digital.o .objs/cores/wiring_pulse.o .objs/cores/wiring_shift.o .objs/cores/WMath.o .objs/cores/WString.o .objs/libraries/libraries.o .objs/sketch.o  -Wl,--gc-sections -s -mmcu=atmega328p 
avr-g++: error: .objs/libraries/libraries.o: No such file or directory
Process terminated with status 1 (0 minute(s), 3 second(s))
1 error(s), 9 warning(s) (0 minute(s), 3 second(s))
 
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #7 on: June 15, 2016, 07:19:18 pm »
also the libraries.cpp ( supplied by the wizard) is missing altogether from the directory structure....
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #8 on: June 15, 2016, 07:54:04 pm »
according to https://github.com/obfuscated/cb_arduino_template:
added link to arduino from ~/.config/codeblocks. no effect.
Can not locate  ~/.codeblocks/share/codeblocks/templates/wizard/ .

seems like cb_arduino_template project is needed a refresh.
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #9 on: June 15, 2016, 09:57:21 pm »
What do you mean by refresh?
The ~/.codeblocks/share/codeblocks/templates/wizard/ is probably ~/.config/codeblocks/share/codeblocks/templates/wizard/ ...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #10 on: June 15, 2016, 10:22:32 pm »
What do you mean by refresh?
The ~/.codeblocks/share/codeblocks/templates/wizard/ is probably ~/.config/codeblocks/share/codeblocks/templates/wizard/ ...

Well  libraries.cpp is missing. The links are pointing to nonexistent locations. The project wizard refers to the fork owner without any mention of your work/template..
I spent close to 12 hours trying to get to make sense and get the initial setup right. 
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #11 on: June 15, 2016, 11:29:27 pm »
Are you talking about the wizard here: https://github.com/obfuscated/cb_arduino_template ?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #12 on: June 15, 2016, 11:53:38 pm »
FIY: My template seems to be outdated and doesn't work with the latest master of arduion. Only arduino 1.0.x and not 1.5 or 1.6!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online AZ

  • Almost regular
  • **
  • Posts: 133
Re: Arduino: libraries are missing
« Reply #13 on: June 16, 2016, 04:13:45 am »
FIY: My template seems to be outdated and doesn't work with the latest master of arduion. Only arduino 1.0.x and not 1.5 or 1.6!
Ohh... :( hmmm.. then I'd guess the base question is - does cb works with arduino with its current project wizard "arduino project"?
CB: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: Arduino: libraries are missing
« Reply #14 on: June 20, 2016, 01:12:28 am »
FIY: My template seems to be outdated and doesn't work with the latest master of arduion. Only arduino 1.0.x and not 1.5 or 1.6!

Some changes that got it to compile; but, it then gets a link error of "wiring.c:(.text.delay+0x26): undefined reference to `yield'".

Changed the compiler search paths to this.

Code: [Select]
$(ARDUINO_DIR)/hardware/arduino/avr/cores/arduino
$(ARDUINO_DIR)/libraries
$(ARDUINO_DIR)/hardware/arduino/avr/variants/standard
$(ARDUINO_DIR)/hardware/arduino/avr/libraries/HID

I think this was the prior values.
Code: [Select]
$(ARDUINO_DIR)/hardware/arduino/cores/arduino
$(ARDUINO_DIR)/libraries
$(ARDUINO_DIR)/hardware/arduino/variants/standard

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #15 on: June 20, 2016, 09:53:28 am »
Some changes that got it to compile; but, it then gets a link error of "wiring.c:(.text.delay+0x26): undefined reference to `yield'".
You need to add hooks.c to the project.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: Arduino: libraries are missing
« Reply #16 on: June 20, 2016, 01:43:50 pm »
Thank you; I have now gotten edited wizard code and project to build on Windows using Arduino 1.6.9.

I had to remove "-x c++" for other compiler options after doing your fix below.

Some changes that got it to compile; but, it then gets a link error of "wiring.c:(.text.delay+0x26): undefined reference to `yield'".
You need to add hooks.c to the project.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #17 on: June 20, 2016, 08:57:03 pm »
Post a patch if you think your work could be integrated into the repo.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: Arduino: libraries are missing
« Reply #18 on: June 21, 2016, 02:38:11 am »
Post a patch if you think your work could be integrated into the repo.

I still have work to do before submitting a patch.

Need to add version page 1.0 or 1.5/1.6
Any idea if it should be 1.5 or 1.6? I plan to use 1.6; since I have NOT found an good 1.5 to test on Debian Linux.

Need to add code that makes the Wizard works for Windows PCs.

NOTE: I think I have found all the differences between the 4 things I am testing
1. Windows and Arduino 1.0.6
2. Windows and Arduino 1.6.9
3. Debian Linux and Arduino 1.0.5
4. Debian Linux and Arduino 1.6.? (Self Built Arduino)

I will do an Git pull request; when, I get it done. But, likely be a couple of weeks.
Unless I feel too bad to do my paid coding work.

Tim S.

« Last Edit: June 21, 2016, 02:46:57 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #19 on: June 21, 2016, 07:37:19 am »
I still have work to do before submitting a patch.
Ether you post a patch today or your work is wasted, because I'm going to work on the wizard tonight.
I plan to do major changes, so merging might be tough.

Need to add version page 1.0 or 1.5/1.6
Any idea if it should be 1.5 or 1.6? I plan to use 1.6; since I have NOT found an good 1.5 to test on Debian Linux.
I see no reason to support 1.0 or 1.5.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: Arduino: libraries are missing
« Reply #20 on: June 21, 2016, 07:21:08 pm »
Edit: Just noticed your post was from yesterday; so, I was likely too late on my pull request.

I just did a pull request; I have NOT had time to double check the changes; they break 1.0.5 usage.

I had to add an "/src" sub folder to the HID include to get Wizard created project Windows 1.6.9 to build.
(Linux did NOT need the sub folder). Also had to do several other changes that I forget what they were.

Tim S.

I still have work to do before submitting a patch.
Ether you post a patch today or your work is wasted, because I'm going to work on the wizard tonight.
I plan to do major changes, so merging might be tough.

Need to add version page 1.0 or 1.5/1.6
Any idea if it should be 1.5 or 1.6? I plan to use 1.6; since I have NOT found an good 1.5 to test on Debian Linux.
I see no reason to support 1.0 or 1.5.
« Last Edit: June 21, 2016, 08:18:33 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #21 on: June 21, 2016, 10:08:47 pm »
Edit: Just noticed your post was from yesterday; so, I was likely too late on my pull request.
It is not too late. Why remove the -x c++ option? What error does it fix?

I had to add an "/src" sub folder to the HID include to get Wizard created project Windows 1.6.9 to build.
(Linux did NOT need the sub folder). Also had to do several other changes that I forget what they were.
It is required on my linux, too. Don't know why you think it is not.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: Arduino: libraries are missing
« Reply #22 on: June 21, 2016, 10:12:29 pm »
On windows the C code was having some link errors; that was one of the things I tried to fix the error.
It might or might NOT be needed; feel free to skip it.

In Arduino 1.0.5 and Windows; I had to do "-lc -lm -lc" and that got rid of a weird link error.

Tim S.

Edit: Just noticed your post was from yesterday; so, I was likely too late on my pull request.
It is not too late. Why remove the -x c++ option? What error does it fix?

I had to add an "/src" sub folder to the HID include to get Wizard created project Windows 1.6.9 to build.
(Linux did NOT need the sub folder). Also had to do several other changes that I forget what they were.
It is required on my linux, too. Don't know why you think it is not.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12096
    • Travis build status
Re: Arduino: libraries are missing
« Reply #23 on: June 22, 2016, 09:21:13 am »
I hope you know that the second -lc is redundant. As far as I can see the wizard adds -lm and the compiler should add -lc automagically, but who knows.

p.s. Why are you top posting in the forum too? In an email I can sort of accept it, but in the forum?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: Arduino: libraries are missing
« Reply #24 on: June 22, 2016, 10:26:51 am »
I hope you know that the second -lc is redundant. As far as I can see the wizard adds -lm and the compiler should add -lc automagically, but who knows.

p.s. Why are you top posting in the forum too? In an email I can sort of accept it, but in the forum?

Sorry, the other forum I post a lot on requires top posting.

It fixes the linking issue on Windows when using the Arduino 1.0.6 AVR compiler. Found the solution in an internet post.

Tim S.
« Last Edit: June 22, 2016, 10:28:57 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org