Sysprogs forums › Forums › VisualGDB › Arduino project Referenced Libraries missing sub folders for Source files
- This topic has 5 replies, 2 voices, and was last updated 5 years, 5 months ago by support.
-
AuthorPosts
-
November 22, 2018 at 16:34 #22816dazipeParticipant
Arduino project Referenced Libraries have two virtual folders “Source files” and “Header files”.
If I expand “Header files” I can see the header files and all sub folders. If I open sub folder I can see the nested files and folders.
However it doesn’t work for the “Source Files” folder. It only lists the *.cpp files located in root folder of the library and there is no sub folders.
I’m using VisualGDB 5.4 preview 7.
November 23, 2018 at 01:53 #22828supportKeymasterHi,
This could be caused by your library not using the “src” folder format. Please refer to the Arduino library specification for details.
November 23, 2018 at 11:44 #22846dazipeParticipantHello,
I’m using TFT_eSPI library downloaded in Arduino IDE with the library manager. It is working and compiling fine. It is one of the most popular display library and I did not modify it.
The file I wanted to debug located in /Extensions folder and it is included as “Extensions/Smooth_font.cpp”
So the Arduino can include files from sub folders..
This looks like a bug from in your IDE. Since, like I mentioned, the Header File virtual folder has all the sub folders of the project.
November 23, 2018 at 11:46 #22847dazipeParticipantAlso there is a note in the link you provided:
“For backward compatibility with Arduino 1.0.x, the library author may opt to place source code into the root folder, instead of the folder called src. In this case the 1.0 library format is applied and the source code is searched from the library root folder and the utility folder, for example:”
November 23, 2018 at 13:36 #22849dazipeParticipantI checked and it behaves the same way when I move everything in the “src” folder.
No sub folders displayed for “Source Files”
It is a bug!
I’m now on the latest VisualGDB 5.4 preview 10.
November 23, 2018 at 19:17 #22861supportKeymasterHi,
Thanks for sharing details about the library; we will try to clarify what is going on.
VisualGDB gets the list of Arduino source files to show in Solution Explorer directly from the Arduino tools – it is exactly the same files that participate in the build. As header files do not participate in the build directly, VisualGDB simply scans the source directories for headers and shows them in Solution Explorer as well.
Specifically for the TFT_eSPI library, the TFT_eSPI.cpp file is the only source file that actually participates in the build of the sketch. You can double-check this by searching for .o files in the Output\SparkFun_ESP32_Thing\Debug\libraries\TFT_eSPI directory. The Extensions/smooth_font.cpp file is actually not compiled directly, instead it’s #included-d from the main source file:
#ifdef SMOOTH_FONT #include "Extensions/Smooth_font.cpp" #endif
We might eventually be able to show the included files in Solution Explorer as well (they could be queried using our Clang IntelliSense engine), although we won’t promise any specific deadlines for this as it would require a fairly large change on our side.
Hope this explains. Let us know if you have any further questions.
-
AuthorPosts
- You must be logged in to reply to this topic.