Forum Replies Created
-
AuthorPosts
-
March 13, 2019 at 23:30 in reply to: How to specify program to use when debugging a shared library on Linux #24234
support
KeymasterSorry about that, our bug. Please try this build: VisualGDB-5.4.103.3008.msi
support
KeymasterOK, we have tried reproducing this issue with the default linker script file for STM32F030F4 (unfortunately, the project link you shared does not work without a login and generally we are not able to review the code/projects that does not come from us unless it triggers bugs in VisualGDB itself), using several variations of the attributes. Generally, unless you declare the variable as volatile, gcc optimizes it away (you can verify it with the offline disassembly). If you do declare it as volatile, you do get a linker error as expected.
We have used the following definition (tried data/rodata and also with/without const):
volatile __attribute__((section(".rodata"))) const char g_LargeVar[32 * 1024] = {1, 2, 3}; int main() { volatile int test = g_LargeVar[0]; }
Please double-check if you can reproduce the problem with the default linker script coming from our STM32 BSP and with minimal modifications to the default LEDBlink source (i.e. just adding one global variable and the line accessing it). If not, the problem is likely caused by some other setting specific to your project.
March 13, 2019 at 20:52 in reply to: Can VisualGDB import existing CMake projects and target Linux? #24229support
KeymasterThanks for the update. The .vgdbcmake file you attached looks very similar to the one we tested, so the crash is likely caused by some plugin, or Visual Studio component that is present on your machine, but not in our test environments.
The easiest way to narrow it down would be to try reproducing the problem on a different machine (or a different user account) and if it doesn’t crash, comparing the other VS extensions and VS versions. Please also consider installing VS2019 Preview, as it will also start with a clean environment and VisualGDB now fully supports it.
Alternatively, please try re-creating your project using the “Store files on Windows and upload them via SSH” mode. It will completely eliminate the “vgdb://” file paths used by VisualGDB, so the problem might stop triggering.
BTW, sorry for the hiccups with the file attachment system. It is on our list, although we are currently prioritizing a few product updates over it.
March 13, 2019 at 19:22 in reply to: How to specify program to use when debugging a shared library on Linux #24228support
KeymasterThanks for sharing the details of your setup. Indeed the Advanced CMake Project System expects that the debugged executable would be a part of the CMake project, so that you could easily select it as a startup target via the Solution Explorer.
To support your configuration better, we have added a new command for the top-level CMake project: Add->Add a Debug-only Target. This will allow importing an arbitrary executable on the target machine into the project, as if it was one of the regular CMake targets. Please try this build: VisualGDB-5.4.103.3006.msi
Then the setup for the scenario you described will be much easier:
- Add the mono executable as a debug-only target.
- Set it as a startup target (also set the VisualGDB’s CMake project as a startup project).
- Specify the command-line arguments via VS project properties for that target (not VisualGDB Project Properties for the entire project).
You would still need the custom actions to deploy the managed binaries (long-term we are planning to add a special Solution Explorer folder for deployed artifacts, but it has currently a relatively low priority compared to other scheduled features). If you would like to reuse the custom actions between multiple projects and don’t want to create them from scratch each time, please consider using the reusable action list files (you can create them from the regular custom action GUI).
support
KeymasterBased on the output log from your first message in the thread, the project fails to build. Hence, the problem is likely not related to IntelliSense at all. Please double-check your code and your settings and ensure the project can be built successfully. If the IntelliSense errors are still shown even after the projects builds successfully, please try reopening the solution so that VisualGDB resets the temporary caches.
support
KeymasterThanks for sharing this. We will investigate it and get back to you in the next 24 hours.
support
KeymasterThanks for the update. The easiest way to change the project to Make would be to re-import it via the VisualGDB IDF Project Wizard as a Make project.
However, this will only work if your project directory has the build scripts for GNU Make (e.g. project.mk). If not, please try creating a new project and adding the source files to it via Add->Existing Items so that VisualGDB automatically updates the build scripts.
March 12, 2019 at 03:18 in reply to: Can VisualGDB import existing CMake projects and target Linux? #24210support
KeymasterSorry about that. We have tried reproducing this, however could not get it to crash (please the attached screenshot and let us know if you spot some critical differences from your setup).
We will also try to suggest a few things to try that might help, but that’s a fairly wild guess:
- First of all, please update to VisualGDB 5.4R3. It uses a different initialization mechanism that might no longer trigger the bug.
- Please try disabling Tools->Options->VisualGDB->General->Debug->Hook ‘Start Debugging (F5)’. This is not needed for advanced CMake projects and is one of the few parts of VisualGDB that is using native code. You will need to restart VS after that.
- Please try completely uninstalling Visual Assist, not just disabling it.
- Please try creating a CMake-based Windows project instead of the Linux one. If it helps, try creating a Windows project and store the sources on the Windows side. The ssh:// paths used by VisualGDB for projects with direct file access might confuse some C#-related logic.
Also please try attaching to the crashing VS using both native and managed debug engines and try to get the full (native + managed) stack trace of the crash. You will need to load the symbols for native DLLs by right-clicking at them in Call Stack in order to get a meaningful trace. Feel free to post it here even if it doesn’t contain any VisualGDB frames and we might be able to suggest something.
Finally, as we could not reproduce it on our side, completely resetting your VS environment (i.e. removing all plugins, %LOCALAPPDATA% folders, etc) might solve this completely. It could be faster than trying to pinpoint the problem (you can quickly check it by installing VisualGDB on another machine).
Attachments:
You must be logged in to view attached files.support
KeymasterFirst of all, please note that we don’t advise trying pre-release builds of ESP-IDF unless you are prepared to do non-trivial troubleshooting, as they are often unreliable and might not be backward compatible.
We normally test VisualGDB with stable IDF releases only, as the internal structure of the pre-release IDF branches changes way too often to be reasonably supported.
That said, we have rechecked the current pre-release v3.3 branch and updated VisualGDB to accommodate the changes introduced in it. Please try this build [VisualGDB-5.4.103.3003.msi].
Also if you encounter problems with CMake projects with this IDF version, please try applying the fix from the github issue we created.
support
KeymasterHi,
Most likely the new variable gets optimized away or placed into a different section. Please try following our linker script tutorial to familiarize yourself with customizing the linker-related settings and techniques used to troubleshoot them.
support
KeymasterThe “loading” element is shown when the component was just added and ESP-IDF is still trying to update the build files. If it disappears afterwards, the component’s makefiles might be incompatible with the ESP-IDF version you are using. Please try building the project and check that the Arduino component does actually get built and your project is able to call functions from it.
If yes, please share your VisualGDBCache\<Project name>-Debug-VisualGDB\BuildCommandLines.txt file. If the project doesn’t build, the issue might be on the ESP-IDF level and the Espressif support might be able to provide some clues.
Edit: if you are using a pre-release ESP-IDF 3.3 branch, VisualGDB will indeed not be able to locate the components due to changes in the internal ESP-IDF structure. We have added support for it in this build: VisualGDB-5.4.103.3003.msi
support
KeymasterThe issue with the VC project looks like the RTE_Components.h file got included in the project twice. We have rechecked the scenario you described, however it did not trigger on our side, so it could have been caused by some changes you previously made to the project file. Either way, removing the second reference to the header file from the .vcxproj file should get it back to work.
The behavior with the project importer is a known limitation – as of March 2019, the Keil project importer can recognize files, preprocessor macros and include directories, but not specific Keil frameworks. As a workaround, please specify them manually after you import the project.
Regarding the build issues from the beginning of the thread, please carefully follow the instructions we posted earlier and you should be able to narrow the issue down to a specific flag that is different between the working and non-working project.
support
KeymasterThanks for your suggestions. The new mbed project subsystem is relatively new and is indeed very basic, compared to the regular embedded workflow. We added it in order to support the latest mbed releases and libraries without needing to convert them into MSBuild, that was error-prone due to the large amount of files, custom steps and board-specific hooks.
We do have plans of making it more usable and appreciate your feedback. We will try to add a graphical editor for common build flags in one of the next preview builds after the upcoming v5.4R3 update next week.
We have rechecked the Embedded Memory Explorer, but could not reproduce any problems. If you could share more details or attach a screenshot, we should be able to suggest how to fix the issue you encountered.
Regarding the build profiles, VisualGDB already supports separate debug and release configurations for mbed projects, automatically applying the debug-only build configuration file for the debug configuration. Are you looking for something different (e.g. multiple debug/release configurations for the same target)?
The __cplusplus version is actually queried directly from g++, hence if you edit the mbed configuration files to add those flags to g++ and reload the project (delete the Build and VisualGDBCache directories if simple reloading doesn’t work), it should get the correct values. If it doesn’t happen, please check the command lines in the VisualGDBCache\<…>\CodeSenseDir\MbedCommandLines.txt file. Do they contain the correct -std setting?
support
KeymasterYou could try using our latest daily build [VisualGDB-5.4.103.2978.msi]
If it doesn’t help, please refer to the previous thread you created regarding IntelliSense issues: https://sysprogs.com/w/forums/topic/dear-developers-please-add-this-major-functionality/
support
KeymasterPlease refer to the previous thread you created regarding this issue: https://sysprogs.com/w/forums/topic/dear-developers-please-add-this-major-functionality/
-
AuthorPosts