Forum Replies Created
-
AuthorPosts
-
support
KeymasterHi,
No problem. Please let us know the exact message you get now (after installing pkg-config and resyncing the sysroot). Please also double-check that you have set environment variables mentioned in step #7.
support
KeymasterHi,
Strange. Could you please try locating the <vector> file manually (both on remote machine and locally in %LOCALAPPDATA%\VisualGDB) and check if the corresponding directory is listed on the IntelliSense Directories page?
support
KeymasterHi,
Normally you don’t need custom path mappings for ESP32 projects, as long as the general path style is set to “Cygwin” (the new wizard should set it automatically, but it the project was created with an earlier preview build, it could be set incorrectly).
If you cannot get the project to work without the custom mappings, please let us know more details (your .vgdbproj file, the exact mapping VisualGDB suggests and more context on where it happens) and we should be able to fix it.
support
KeymasterHi,
The local MSBuild projects are built directly without the use of GNU Make (for remote projects VisualGDB generates a temporary Makefile with a different structure than the regular Makefiles), so specifying TARGETTYPE won’t have any effect.
Instead please use the VS project properties (not VisualGDB Project Properties) -> Configuration Properties -> General -> Configuration Type.
support
KeymasterHi,
We tested it on an i7-5960X system with 64GB RAM and 4 Intel 730 Series SSDs in RAID0. Although it’s indeed a very fast box, the difference should not be a factor of 8. Generally we would advise running the build manually on the msys2 toolchain and on our toolchain (you can run the “time make -j8” command to record the run time of make) and comparing the timing.
- If the msys2 toolchain is considerably faster than our Cygwin-based toolchain, we can help you configure VisualGDB to use it.
- If the Cygwin toolchain builds the project faster from command line, than from VisualGDB, it could be a VisualGDB bug and we should be able to fix it (although we routinely compare the build times during our tests and have never observed any difference unless you use verbose mode).
Trying to use a different machine/disk, or disabling real-time antivirus protection might also improve the build time. You could also wait a couple of weeks until we release the preliminary CMake support for ESP-IDF.
support
KeymasterHi,
Thanks for sharing this. We don’t support it yet, but it looks like a good feature to have. We will consider adding it to one of the upcoming releases.
support
KeymasterHi,
Thanks for your input. We have rechecked the build times on ESP-IDF on the Msys2 toolchain vs our Cygwin-based toolchain on our side. Although we were not able to reproduce the 8 minute build times, we did measure 47 seconds for the Msys2-based toolchain vs. 65 seconds for our Cygwin-based toolchain. Using the Msys2 toolchain also results in a higher CPU utilization, so it looks like the version of GNU Make used in our toolchain works slower than the one in Msys2.
It also looks like Espressif has backported the CMake support to ESP-IDF 3.1, so we should be able to officially support it in one of the next VisualGDB preview builds. CMake paired with ninja provides much better build times than the original GNU Make.
Regarding the serial terminal, it is only provided in the VisualGDB Custom Edition or higher, however we made a special exception for Arduino projects as they are often used without a debugger and heavily rely on the serial terminal. Please consider using the new Arduino Project Subsystem with ESP32 support.
We also understand that PlatformIO is faster than ESP-IDF and will consider supporting it directly via a dedicated project subsystem in one of the next VisualGDB releases.
support
KeymasterHi,
Thanks, looks like one of the recent MSBuild builds changed the internal thread structure, so VisualGDB was not properly detecting the end-of-build event.
Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.4.2436.msi
support
KeymasterHi,
Sorry, this is not scheduled for any specific release yet. The best workaround currently would be to try creating a basic importer based on the other open-source importers we provide: https://github.com/sysprogs/BSPTools/tree/master/ProjectImporters
Once we will add an official importer for TrueStudio, we will publish its sources in the same repository and will update this thread.
support
KeymasterHi,
Thanks for the second comparison. Unfortunately a few things are still unclear. Do you get 4 or 8 minutes when running the Cygwin command line from our toolchain manually with the same -j8 flag as with your toolchain? What time would you get by running “mintty.exe -” and then manually navigating to the project folder and building it with “make -j8”?
Also are both toolchains using the same version of ESP-IDF? We had noticed a substantial increase of build time in v3.0 compared to v2.x.
support
KeymasterHi,
Strange, normally VisualGDB should run the same command. Could you please try checking the build output for the exact command line used by VisualGDB (in the very beginning of the output)? E.g.:
VisualGDB: Run "e:\SysGCC\esp32\bin\bash.exe --login -c "export IDF_PATH=/esp-idf/v3.1 && export BATCH_BUILD=1 && export -n PYTHONHOME && export LANG=en_US && cd /cygdrive/e/projects/temp/EmbeddedProject8 && make -j16 BUILD_DIR_BASE='/cygdrive/e/projects/temp/EmbeddedProject8/Debug' SDKCONFIG='/cygdrive/e/projects/temp/EmbeddedProject8/sdkconfig-debug' V=0"" in directory "" on local computer
Do you observe anything similar? Is the thread count set properly to the amount of CPU cores? Does it run faster when you run exactly the same command (including the bash.exe part) manually?
support
KeymasterHi,
Thanks for rechecking everything. Most likely VisualGDB creates a background thread that doesn’t properly exit after the normal MSBuild logic terminates. Please try attaching to the MSBuild process from Visual Studio in the Managed mode (ensure you select the correct one as VS itself may run several of them) and check the call stacks of all threads. Please post them here along with the exact VisualGDB build number and we should be able to tell what is going on and provide a fix/workaround.
support
KeymasterHi,
Thanks for uploading the video and sharing your concerns. We will try to explain what is going on.
Unlike many conventional ARM-based devices that are supported through our optimized MSBuild backend and a collection of tested BSP packages, the Advanced ESP32 projects are built directly by the ESP-IDF framework (official ESP32 SDK by Espressif). We decided to handle the ESP32 platform this way in order to accommodate the rapid release cycle of the ESP-IDF that often releases updates introducing new features, large structural changes and breaking backward compatibility.
I.e. instead of an optimized VisualGDB package based on a specific version of ESP-IDF (that would get obsoleted very quickly), VisualGDB can run on top of any recent ESP-IDF release of your choice and produce exactly the same results as meant by Espressif. It will inherit the original ESP-IDF build system and the configuration settings.
PlatformIO likely uses a different approach – includes a subset of ESP-IDF with its own build subsystem that is faster and requires less configuration settings, but is not equivalent to the latest ESP-IDF framework. Hence most of the differences you mentioned are rather the differences between ESP-IDF (full-scale ESP32 SDK) and PlatformIO (a lightweight SDK for smaller projects) and are not actually related to VisualGDB itself.
Although VisualGDB doesn’t support PlatformIO out-of-the-box yet, it does support the ESP32 Arduino core (see the new Arduino project wizard) that provides similar lightweight experience at a cost of offering fewer features. Espressif itself is also addressing the build speed issue by switching their IDF to CMake+Ninja. Once this switch is complete, the ESP-IDF projects will build much faster.
Regarding the other issues mentioned in the video, it looks like you did not specify valid debug settings when creating the project. If you don’t have a JTAG probe, simply select a COM port. VisualGDB will warn that no actual debugging will be possible, but will still allow programming the device via the COM port. You can change it for an existing project via VisualGDB Project Properties -> Debug Settings. Alternatively, please try right-clicking on the project node in Solution Explorer and select “Program FLASH Memory”. This will run the same FLASH programming routine as used by PlatformIO.
The COM port syntax (/dev/ttyS<port number – 1>) is to be expected – this is a valid Cygwin COM port syntax, so please do not change it. Please also note that changing the programming speed from 115200 might break programming, depending on the capabilities of the specific COM2USB chip used on your board.
Hope this helps. Let us know if you have any further questions.
support
KeymasterHi,
Yes, please click the lightning icon in the bottom left corner of the suggestion popup to enable this mode.
support
KeymasterHi,
Sorry, this doesn’t look like any known issue, so we can only suggest the generic steps to narrow it down. Please try checking if the problem can be reproduced on a basic LEDBlink project. If not, please try comparing the project structure – the created threads, called functions, configuration settings, etc. until you find the setting that triggers the issue.
You can also try creating a separate thread with just a loop of sleep() calls and see if setting breakpoints there works.
Let us know your findings and we will try to suggest a workaround.
-
AuthorPosts