ESP32: Not possible to create valid empty esp32 arduino project

Sysprogs forums Forums VisualGDB ESP32: Not possible to create valid empty esp32 arduino project

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #25802
    cvalentin
    Participant

    Hi,

    I’m not able to create an empty ESP32 solution project without build errors. I have Arduino IDE 1.8.10 installed. The IDE installed the arduino toolchain for the boards esp32 and esp8266 in this folder:
    …\AppData\Local\Arduino15\packages\esp32
    …\AppData\Local\Arduino15\packages\esp8266

    When I create an empty Arduino project with VisualGDB I use these Arduino location settings:

    After I have completed the new project wizard, the project always show build errors:

    When I build the project I get this error:

    How can I fix this?

    Kind Regards,
    Christian

    #25803
    support
    Keymaster

    Hi,

    Please try temporarily removing the package directories and creating a new project via the VisualGDB Arduino Project Wizard. This should re-download the necessary packages and get everything to work.

    If not, please check the Output window (not just error list) – it should contain a detailed build log, providing more details about the cause of it (most likely some other component is missing or corrupt and the Arduino builder tool should mention it in the log).

    #25808
    cvalentin
    Participant

    Hi,

    I have deleted the Arduino15 directory under ..\AppData\Local. When I created a new Arduino Project with VisualGDB I got the message that the ESP32 package needs to be installed by VisualGDB. I clicked on install. The package was downloaded and installed correctly. But after I have finished the new project wizard, I got exactly the same error. Arduino.h cannot be found.

    What can I check next?

    Kind Regards,
    Christian

    PS: This is the content of the output window:

    —— Build started: Project: ArduinoProject1, Configuration: Debug ESP32_Dev_Module ——
    Launching Arduino builder…
    VisualGDB: Run “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe -compile -logger=machine -fqbn=esp32:esp32:esp32:PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -build-path C:\Work\ESP32\ArduinoProject1\Output\ESP32_Dev_Module\Debug -unoptimize=sketch -hardware “C:/Program Files (x86)/Arduino/hardware” -hardware C:\Users\chris\Documents/ArduinoData/packages -tools “C:/Program Files (x86)/Arduino/tools-builder” -tools C:\Users\chris\Documents/ArduinoData/packages -built-in-libraries “C:/Program Files (x86)/Arduino/libraries” -libraries C:\Users\chris\Documents/Arduino/Libraries -prefs=runtime.tools.esptool_py.path=C:\Users\chris\Documents\ArduinoData\packages\esp32\tools\esptool_py\2.6.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\chris\Documents\ArduinoData\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0 sketches/ArduinoProject1.ino” in directory “C:\Work\ESP32\ArduinoProject1” on local computer
    info: Progress 0.00
    info: Progress 2.94
    info: Progress 5.88
    info: Progress 8.82
    info: Progress 9.03
    info: Progress 9.24
    info: Progress 9.45
    info: Progress 9.66
    info: Progress 9.87
    info: Progress 10.08
    info: Progress 10.29
    info: Progress 10.50
    info: Progress 10.71
    info: Progress 10.92
    info: Progress 11.13
    info: Progress 11.34
    info: Progress 11.55
    info: Progress 11.76
    info: Progress 14.71
    info: Progress 17.65
    info: Progress 20.59
    info: Progress 23.53
    info: Progress 26.47
    info: Progress 29.41
    info: Progress 32.35
    info: Progress 35.29
    info: Progress 0.00
    error: ctags pattern is missing

    ————————————————————-
    Command exited with code 1
    Executable: C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe
    Arguments: -compile -logger=machine -fqbn=esp32:esp32:esp32:PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -build-path C:\Work\ESP32\ArduinoProject1\Output\ESP32_Dev_Module\Debug -unoptimize=sketch -hardware “C:/Program Files (x86)/Arduino/hardware” -hardware C:\Users\chris\Documents/ArduinoData/packages -tools “C:/Program Files (x86)/Arduino/tools-builder” -tools C:\Users\chris\Documents/ArduinoData/packages -built-in-libraries “C:/Program Files (x86)/Arduino/libraries” -libraries C:\Users\chris\Documents/Arduino/Libraries -prefs=runtime.tools.esptool_py.path=C:\Users\chris\Documents\ArduinoData\packages\esp32\tools\esptool_py\2.6.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\chris\Documents\ArduinoData\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0 sketches/ArduinoProject1.ino
    Directory: C:\Work\ESP32\ArduinoProject1
    VisualGDB: Error: Command-line action failed
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    • This reply was modified 4 years, 6 months ago by cvalentin.
    #25810
    support
    Keymaster

    Thanks for checking this. It looks like the low-level Arduino tools fail to build the project due to some missing components, and hence VisualGDB fails to load the code model (leading to the missing Arduino.h).

    We have just rechecked everything on a clean machine (re-downloading Arduino ESP32 package 1.0.1) and the build had succeeded, so the issue is caused by some broken component on your computer. Please consider temporarily moving out the Arduino directory (and removing all directories mentioned in the command line from the output window) to fully reset the Arduino-related state.

    If nothing helps, please ensure you can build a newly created sketch with Arduino IDE. If this is the case, please follow the steps below to pinpoint the difference between the 2 IDEs causing the issue:

    1. Please try running the build command line shown in the output window manually (from the Command Prompt window) and confirm that the problem still exists.
    2. Then try creating/building a basic sketch using the Arduino IDE and check the command line used by it (you can capture it using Process Monitor).
    3. Try running the working command line from the same command prompt window and ensure it results in a successful build.
    4. Adjust the successful command line to use VisualGDB’s version of the arduino-builder.exe and ensure it works.
    5. Try comparing the 2 command lines and running combinations of them to pinpoint a specific argument that causes the problem.

    If it still doesn’t help, please share your findings (e.g. the exact command lines and their outcomes) and we will advise you further.

    #25847
    cvalentin
    Participant

    Hi,

    I can’t get the command line by using Process Monitor. Can you tell me how I can retrieve it?
    I have some more information for you:

    I still use the Arduino ESP32 package from the Arduino IDE because the version supported by VisualGDB is 1.0.1 which does not have some important bug fixes especially for SPI slave mode.

    If I close Visual Studio and delete this folder “C:\Users\chris\AppData\Local\VisualGDB” and restart Visual Studio, I can create a new ESP32 Arduino project with VisualGDB which is valid and can successfully compile the code. But as soon as I close the solution and re-open it, VisualGDB again shows the project as corrupt and compilation fails. VisualGDB shows this error after the solution is loaded:

    Failed to parse code model from D:\Work\ESP32\PinballESP32\VisualGDBCache\PinballESP32-Debug-ESP32_Dev_Module\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at ix.h1.c_2(IEnumerable`1 a)
    Compiler output:

    Please can you give me further advice? (Also it would be good if you could update your ESP32 Arduino package to version 1.0.3 then I can use this).

    Regards,
    Christian

    • This reply was modified 4 years, 6 months ago by cvalentin.
    #25865
    support
    Keymaster

    Thanks for the update. We have rechecked everything and it looks like the Arduino tools indeed don’t work as expected when having both 1.0.1 and 1.0.3 packages installed.

    We have updated our package lists to show the latest 1.0.3 package. Please install it via Tools->VisualGDB->Manage VisualGDB Packages and then remove the older 1.0.1 package via the same window and you should be able to build the projects as expected.

    #25866
    cvalentin
    Participant

    Hi,

    I don’t see the 1.0.3 esp32 package in the list under “Online”. I only see the 1.0.1 package. Is the 1.0.3 package already deployed?

    Regards,
    Christian

    #25867
    support
    Keymaster

    Please try checking under “Updates”. If you have 1.0.1 already installed, 1.0.3 will appear there.

    #25868
    cvalentin
    Participant

    Updates is completely empty. Maybe the updated list isn’t online, already?

    #25869
    cvalentin
    Participant

    Please could you re-check internally if the arduino esp32 package version 1.0.3 is really online? The package is still not visible in the package manager.

    #25870
    support
    Keymaster

    Hi,

    We have double-checked it and the new package is online. If it doesn’t appear, please try deleting the %LOCALAPPDATA%\VisualGDB\ArduinoPackageCache directory and restart VisualGDB so that it reloads all Arduino package definitions.

    #25871
    cvalentin
    Participant

    Thanks very much, deleting the cache did the trick. I got the update from 1.0.1 => 1.0.3.

    Kind Regards,
    Christian

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.