Include identified but not found

Hi
Lots of include problems solved.
It is easier to program than to solve the problems of includes.

Now I have this problem with the UserSettings.h header which is defined in intelisense and also defined the path in c_cpp: propreties.json in the first line at:
“C: /. Platformio / packages / include / src / ssd1306_hal”,
Why do not compile and give a error ?
Tks
image

You seem to be trying to modify the Arduino core’s Wire/src/utility/io.h with a custom user settings include? Why? Are you 100% sure you want to do this?

Well, the compile error however comes from the fact that the files in src/ or include/ of the project are not exposed to the Arduino core during compilation. You have to add a build_flags expression to add the folder where UserSettings.h is, e.g. build_flags = -Isrc/ if it is in the src folder.

OK.
1 - I put the path “C: /. Platformio / packages / framework-arduino-sam / libraries / Wire / src”, just to access the io.h that I went to look for on my PC somewhere … :slight_smile:
2 - Interesting … I’ll put the flags to make the includes visible to the Arduino. I’m getting the idea, and I’m going to work on it.
However, I inform you that this program works in perfect conditions in the Arduino IDE and loads the Hardware with an Arduino Due in an antenna tracking system that is working.
See it @ https://github.com/MendoMiranda/TRACKUINO_PT.
All includes are accessible on the FrameWork Arduino.
The TRACKUINO.ino program was copied to Platformio’s main.cpp.
Thanks and I will let you know news.
Congratulations for the fantastic platformio.
Tks

The sketch 13000 lines long and repeats itself 9 times.

Also the cpp file has an error where it doesn’t declare void delay2S(); function (hence only works in the Arduino IDE) and uses an outdated function of the OneButton library (attachPress, renamed to attachLongPressStart per this, hence only works with an older OneButton library.

I can successfully compile the sketch using the modified source code and platformio.ini per main.cpp · GitHub

Linking .pio\build\due\firmware.elf
Building .pio\build\due\firmware.bin
Checking size .pio\build\due\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   9.3% (used 9128 bytes from 98304 bytes)
Flash: [=         ]  13.7% (used 72024 bytes from 524288 bytes)
==================== [SUCCESS] Took 2.82 seconds ====================

But this sketch doesn’t have UserConfiguration.h or anything in it?

Yes. Sorry.
A mistake upploading to GIT I will fix it.
The delay must be before all other functions in platformio :slight_smile:
I thik there was an upload error . This was the file of arduino. In Platformio I put delays before all .
Fantastic compilation.
No, It has no UserConfiguration.h. Do you recommend it ?
I must see what is happening here with W10 64Bits Version 20H2…VSCode and includes…
I will let you know my works on platformio and this sketch…
tks
Carlos

All right…
I had some problems with the libraries identification and location of the libraries.
Intelisense initially did not work well, I don’t know why, but now everything is in order. After adding the libraries, I had to disable li_deps to prevent the new versions from making it necessary to change the program.
Now everything works fine without errors or warnings. I will put the TRACKANTENUINO_PIO version on GitHub. I changed the name of the project that was TRACKUINO, because there is already a project for tracking Balloons in APRS with the same name.
Thank you and good work.
Carlos