Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Arduino paths on first application entry

3 posters

Go down  Message [Page 1 of 1]

1Arduino paths on first application entry Empty Arduino paths on first application entry Tue May 10, 2022 5:49 pm

n3645



Recently I had a problem with linux and needed to reinstall all...

I have noticed that when first time add Arduino binary path and then try to add library path, there is several problems.

Firstly, after adding binary and library path (copy and paste), project and source, it did not compile it properly, it said no library. I have though I have added wrong path, but actually on button click to add library path, it opened dialog with binary path.

Further, after choosing correct dir, I have tried compilation again - it failed. I have though again that I have missed dir, but it was correct. Trying again to choose library dir it open dialog with binary path... However, after exiting the app and starting again it was not problem in compilation.

arcachofo

arcachofo

I will have a look...

arcachofo

arcachofo

I can't reproduce this issue.
Are you sure that Arduino files were in a accesible disk (or perhaps in an unmounted partition)?

n3645



Quite sure...

Where is located config file, in order to delete it and try to write step by step to reproduce this?

arcachofo

arcachofo

Where is located config file, in order to delete it and try to write step by step to reproduce this
File explorer->Settings will show you where it is.

n3645



Something is definitely wrong. Now I cannot even set any...

Just copy and paste paths and click on button to open load dialog, then watch which directory it shows...
Set correct one and try again...

When open dialog, it should be located on that directory in the tree, not some previously stored. For instance, When click on library path button on right side, it open bin directory in the tree.

Quite confusing. Also "Apply" button missing here as well, If made a mistake, it is real trouble to set all correctly again, without copy and paste, which doesn't do anything - so that and try to compile - many errors will be shown, from that that arduino tool is not found, to that thaht many libraries cannot be found...

n3645



For instance:

Arduino root dir:  [some dir]/arduino-1.8.19/
LIbray path: [some dir]/ArduinoProjects/libraries/

Most of the problems also makes discrepancy of that what is in ArduinoIDE. Now I deleted and reinstalled Arduino. In their settings, projects location is default. As long as I not changed that tp be the same as set in SimulIDE, it shows error that libraries missing...

I'm using multiple project directories as well, with different set of libraries for testing purposes... Thus, many, many headache...

Arduino base directory is a project directory, not libraries. Library dir is inside project directory, and that is what is used. That is also the reason of all these problems, as is Arduino used silently for compilation, not AVR-GCC directly...

arcachofo

arcachofo

No idea what could be happening.
If everything is as default you just need to set Arduino path and that is all.
You don't need to deal with path to libraries.

In any case have a look at the bottom panel, there you will see which path is actually using.

ilhan likes this post

ilhan

ilhan

Hi guys, here the fix:

I was getting same problem during day. I have the fix I think. The problem is path for libraries. With the Arduino IDE v2 release they stopped creating folder of libraries. They attach libraries dynamically during compile with library manager. If we define a path, compiler will use it otherwise it will use a temp location. I copied the library folder to the C:\Users\userAbc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\.

Arduino IDE ignores it but we need this libraries in this location for our Simulide. I hope this will work for you. If it is right I can check the bug in our code and create a pull request for a solution.

Code:

Multiple libraries were found for "LiquidCrystal.h"
  Used: C:\Users\userAbc\proj\_IG_Libraries\libraries\LiquidCrystal
  Not used: C:\Users\userAbc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\LiquidCrystal
Using library LiquidCrystal at version 1.0.7 in folder: C:\Users\userAbc\proj\_IG_Libraries\libraries\LiquidCrystal


Full log is below for more details:

Code:

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\userAbc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\userAbc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\sketch\\rtc_time_demo.ino.cpp" -o nul
Alternatives for LiquidCrystal.h: [LiquidCrystal@1.0.7 LiquidCrystal@1.0.7]
ResolveLibrary(LiquidCrystal.h)
  -> candidates: [LiquidCrystal@1.0.7 LiquidCrystal@1.0.7]
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "-Ic:\\Users\\userAbc\\proj\\_IG_Libraries\\libraries\\LiquidCrystal\\src" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\sketch\\rtc_time_demo.ino.cpp" -o nul
Using cached library dependencies for file: c:\Users\userAbc\proj\_IG_Libraries\libraries\LiquidCrystal\src\LiquidCrystal.cpp
Generating function prototypes...
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "-Ic:\\Users\\userAbc\\proj\\_IG_Libraries\\libraries\\LiquidCrystal\\src" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\sketch\\rtc_time_demo.ino.cpp" -o "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "-Ic:\\Users\\userAbc\\proj\\_IG_Libraries\\libraries\\LiquidCrystal\\src" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\sketch\\rtc_time_demo.ino.cpp" -o "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\sketch\\rtc_time_demo.ino.cpp.o"
Compiling libraries...
Compiling library "LiquidCrystal"
Using previously compiled file: C:\Users\userAbc\AppData\Local\Temp\arduino\sketches\E793E5741201888F502DF49E96A43A60\libraries\LiquidCrystal\LiquidCrystal.cpp.o
Compiling core...
Using precompiled core: C:\Users\userAbc\AppData\Local\Temp\arduino\cores\arduino_avr_uno_479982af4b7f539f731ba1f79d2b8688\core.a
Linking everything together...
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60/rtc_time_demo.ino.elf" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\sketch\\rtc_time_demo.ino.cpp.o" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60\\libraries\\LiquidCrystal\\LiquidCrystal.cpp.o" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60/..\\..\\cores\\arduino_avr_uno_479982af4b7f539f731ba1f79d2b8688\\core.a" "-LC:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60" -lm
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60/rtc_time_demo.ino.elf" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60/rtc_time_demo.ino.eep"
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60/rtc_time_demo.ino.elf" "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60/rtc_time_demo.ino.hex"
Multiple libraries were found for "LiquidCrystal.h"
  Used: C:\Users\userAbc\proj\_IG_Libraries\libraries\LiquidCrystal
  Not used: C:\Users\userAbc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\LiquidCrystal
Using library LiquidCrystal at version 1.0.7 in folder: C:\Users\userAbc\proj\_IG_Libraries\libraries\LiquidCrystal
"C:\\Users\\userAbc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\userAbc\\AppData\\Local\\Temp\\arduino\\sketches\\E793E5741201888F502DF49E96A43A60/rtc_time_demo.ino.elf"
Sketch uses 2198 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 61 bytes (2%) of dynamic memory, leaving 1987 bytes for local variables. Maximum is 2048 bytes.

https://rustynotes.com/

arcachofo

arcachofo

I think these are different problems.
n3645 was using Arduino 1.8.19, not Arduino 2.

To compile in Simulide using a library in Arduino 2 you just need to install it in Arduino 2 IDE (or manually).
But in general it will not work with the same paths than Arduino 1.

As far as I know, adding the library to: your_sketchbook/libraries/ works for all versions.


About the initial problem:
At the moment I didn't understand which was exactly the problem.
Now, after reading again, I realize that he was trying to use a custom Library path using the "Include Path" box, which makes sense but doesn't work for Arduino compiler.

Path to libraries is not an include path, is a place for Arduino to search for libraries, which are compiled separately.

Compiling with a library specific for a project was not supported, but it makes sense to add this functionality, so I repurposed the "Include Path" box:

Arduino paths on first application entry Ard11

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum