JeffGray

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Import Esp8266 Arduino projects and/or libraries #25043
    JeffGray
    Participant

    After a 15 month hiatus, I am back to working with the ESP32.  I just renewed my VisualGDB license in the hopes that V5.4 would provide more support for using existing arduino libraries.  I would like to also take advantage of freertos, xTaskCreate, etc. rather than being constrained by the general format of .ino code.

    Are there any tutorials for how to include arduino libraries?  I went to github and downloaded arduino-esp32-master so that I could get the latest libraries.  Ultimately I would like to use code such as what was developed by Adafruit for the BMP280 sensor, rather than starting from scratch.  I had written a tutorial myself (mentioned earlier in this thread) but I find that it no longer works.

    in reply to: Import Esp8266 Arduino projects and/or libraries #13429
    JeffGray
    Participant

    In the words of Elvis, “thankyouverymuch” for the suggestion.  I do believe my quest to import Arduino libraries is at an end.  Including the *.c and *.cpp files into my project was the key.

    I wrote up a detailed response to this issue here: https://stackoverflow.com/questions/35167111/using-arduino-c-libraries-on-pc-platform/48244442#48244442

    It includes many references to VisualGDB, so I hope that Sysprogs gets some business from this.

    in reply to: Import Esp8266 Arduino projects and/or libraries #13403
    JeffGray
    Participant

    I have tried to troubleshoot and solve this issue myself with no positive results.  To simplify the problem I have done the following:

    1.  Use the Visual GDB embedded project wizard to create a “Blink” example that runs on my ESP32.  So far, so good.  Compiles, builds and loads OK.
    2. Put ALL the .h and .cpp files from the Arduino core for ESP32 (from https://github.com/espressif/arduino-esp32) into my project folder.
    3.  Add a line: #include <Arduino.h> to my blink180109.cpp source code.
    4. Add a line: Serial.begin(115200); inside app_main() in the source code.

    Intellisense does not indicate any errors.  Now when I build, I get errors during linking:

    1>Linking ../VisualGDB/Release/Blink180109...
     1>VisualGDB\Release\Blink180109.o : error : undefined reference to `Serial'
     1>VisualGDB\Release\Blink180109.o : error : undefined reference to `HardwareSerial::begin(unsigned long, unsigned int, signed char, signed char)'
     1>VisualGDB/Release/Blink180109.o: In function `app_main':
     1>c:\Users\Jeff\source\repos\Blink180109\Blink180109\Blink180109.cpp(54): error : undefined reference to `HardwareSerial::begin(unsigned long, unsigned int, signed char, signed char)'
     1>collect2 : error : ld returned 1 exit status

    If you can tell me what changes I need to make to the link settings in order to build without errors, that would be great.  If you need to charge a service fee, then send a quote to me.

    Thank you for your help.

    • This reply was modified 6 years, 11 months ago by support. Reason: formatting
    in reply to: Import Esp8266 Arduino projects and/or libraries #13392
    JeffGray
    Participant

    Here is an update of my <lack of> progress since my posting on 3 Dec 2017:

    I purchased a license for Visual Micro, which is a plug-in for Visual Studio that allows .ino code to be imported/used.

    For a vMicro project, under Project Properties, C/C++ additional include directories, there are a TON of files listed, separated by semicolons, which primarily come from the following folder (with subfolders):
    $(ProjectDir)..\Arduino\hardware\espressif\esp32\

    On the VisualGDB side, VisualGDB projects have a Toolchain of: ESP32 in C:\SysGCC\esp32 (VisualGDB Project Properties, MSBuild settings)

    So I thought I would get “tricky” and copy the entire list of include directories, and cut and paste it into a VisualGDB example project (my go-to is “blink”).

    In VisualGDB, under Project Properties, C/C++ additional include directories, the entry is blank.  When I typed “#include <Wire.h>” into the “blink” project code, if flagged an error.  After I cut and pasted the include directory paths into the project properties, the error went away, but only temporarily.  So when the error came up, I had Intellisense search for the folder: …\ESP32\source\Arduino and added it to the project properties by clicking the button.  It then automatically added the additional include directories and the error went away.  Still though, projects will not compile without errors.

    I have probably spent 40+ hours trying to make this work.  By “work”, I mean being able to somehow import .ino code into a VisualGDB project.  This is code that runs on an ESP32 when compiled/uploaded in the Arduino IDE.  I have successfully done this with Visual Micro, but I have not been able to get Visual Micro to compile using the C:\SysGCC\esp32 toolchain.  So on one side, I have half a solution (Visual Micro) and on the other side, I have half a solution (VisualGDB) but I can tell you with great certainty: two “half-solutions” do NOT make a whole solution.

     

    in reply to: Import Esp8266 Arduino projects and/or libraries #13146
    JeffGray
    Participant

    I would like to throw in my vote here:

    I have purchased a license for VisualGDB.  I made that decision because it seems that VisualGDB is a useful tool and has some support for ESP32.

    In the past, I have developed some code for Arduino Unos and Nanos using Arduino IDE.  It is extremely easy to use and has tons of libraries and community support.  I have also written code in AtmelStudio for non-arduino Atmel micros such as the mega645A.

    This past year, I have come to the conclusion that the Arduino hardware (Uno, etc.) are “toys”.  They are extremely useful, but the hardware and Arduino IDE create a false sense of understanding of code development methodology.

    The ESP32 is the next-generation platform for IoT “toys”.  While I have been moderately successful in creating some “toy” applications for the ESP32 using Arduino IDE, I want to get more serious and develop code that can be more easily debugged, in an environment that uses intellisense, and creates an experience similar to Visual Studio / Atmel Studio.  Hence the purchase of VisualGDB.

    However I am addicted to the “drug” of readily-available libraries, such as arduino.h, wire.h, etc. etc.  For me, there is a gap in my understanding of how to transition from Arduino IDE file/code organization, and development within Visual Studio.  I suspect that like me, there are a lot of more-sophisticated (but still amateur) programmers out there that have projects that are too complicated to develop within the limited Arduino IDE framework.

    I don’t mind paying for tools, because tools save time.  That being said, there is the VisualMicro option, but I am not sure that is what I need: yes you can import .ino files, but it seems to me that there is still a gap.  I guess what I am saying is that the community-developed libraries that are used within the Arduino IDE (mostly based on Atmel mircos, especially until recently) are an extremely valuable resource.  I would like to be able to use these Arduino based libraries in a more professional environment.

Viewing 5 posts - 1 through 5 (of 5 total)