Forum Replies Created
-
AuthorPosts
-
support
KeymasterPlease try obtaining the call stack of the main Visual Studio’s thread as shown here: http://visualgdb.com/support/callstack and share it in this thread along with the VisualGDB build number. This should explain what is going on.
support
KeymasterThis is rather strange, as normally OpenOCD should not suddenly switch to another board.
In order to troubleshoot this, please check if the problem can be reproduced outside VisualGDB, with just one OpenOCD instance running. If not, please try understanding what set of circumstances triggers the problem (e.g. 2 OpenOCD instances are running and VisualGDB confuses the TCP ports of them).
If the problem happens with just 1 instance reliably, please double-check whether using the same command line (having the serial number hardcoded), but actually unplugging the second device changes anything. Please also let us know what exactly you observe when the call to ProgramAsync() jumps to the second board. Perhaps, something else is happening to the board that looks like it’s trying to run ProgramAsync().
Edit: there could be another source of issues when using multiple ST-Link adapters of different versions. Because historically OpenOCD had different internal drivers for ST-Link 1, 2 and 2.1, VisualGDB internally treats them as separate incompatible devices. So if you have just one instance of ST-Link v2 and one instance of ST-Link v2.1, VisualGDB would assume that each interface is unique and would not pass the serial number to OpenOCD. As OpenOCD now considers both devices equivalent, this would let it pick one interface arbitrarily. That said, it should happen at the beginning of the debug session and not between erasing and programming the FLASH memory.
We have also added a “Pass the USB serial number to OpenOCD even if just 1 device is present” setting to our OpenOCD GUI (VisualGDB Project Properties -> Debug -> Advanced) that will override the default serial number behavior. Please feel free to install the OpenOCD update via the VisualGDB Package Manager and enable the new setting.
-
This reply was modified 6 years, 2 months ago by
support. Reason: mentioned the new OpenOCD setting
support
KeymasterSorry, this is a limitation of the way Clang performs C++ parsing. At the time the lambda body is parsed, the template argument deduction for any_of() hasn’t happened yet, so “f” is not yet resolved. Specifying it explicitly indeed provides enough information for auto-completion.
support
KeymasterThanks for pointing this out. Indeed, the older ST-Link v2 do not report the serial number in a USB-compliant way and hence the stock OpenOCD doesn’t properly work with multiple instances of them.
The ST’s branch of OpenOCD uses very non-trivial modifications to its USB logic to support querying the serial number using a vendor-specific hack, however those changes were never merged into the mainstream OpenOCD and may break compatibility with other debug probes (hence our OpenOCD fork doesn’t include them).
As the issue only affects the older ST-Link 2.0 devices (not St-Link 2.1 or 3.x), we suggest simply moving on to the newer St-Link 2.1 (that uses newer firmware and also typically has a built-in COM port).
October 17, 2019 at 17:32 in reply to: Example Tutorial for OpenCV using Python and VisualGDB #26207support
KeymasterHi,
Sorry, we do not have a Python tutorial for OpenCV and have not explicitly tested this scenario yet.
support
KeymasterSorry, the first issue looks like you are trying to debug an STM32 device that is not supported by OpenOCD yet. Ynfortunately, OpenOCD relies on a hardcoded list of STM32 device IDs in order to detect the FLASH parameters. ST usually contributes push requests to the OpenOCD repository providing the updates, and then our packaging system picks them up, but that typically takes a few months since a new device is released.
It is also hard to say why the external NOR FLASH driver would be failing. If it’s using our OpenOCD FLASH driver plugin system, we can suggest a few things to check. However if it is something that comes with OpenOCD, our best advice would be to build a debug build of OpenOCD from sources and try stepping through it in order to understand what is going on.
Another option would be to switch from ST-Link to Segger J-Link. It is more expensive than ST-Link, however it allows Segger to maintain and regularly update their own proprietary replacement to OpenOCD that does not have many of the USB driver issues known to OpenOCD and also typically introduces support to new devices much faster than open-source tools like OpenOCD. VisualGDB supports both OpenOCD and the Segger J-Link debug stack the same way, so simply select J-Link in the Debug Settings once you plug it in and VisualGDB will switch the existing project to use it.
October 17, 2019 at 17:23 in reply to: ESP-IDF, arduino as component : Where to place third party librairies ? #26204support
KeymasterArduino libraries use a rather specific sematics (including one header file automatically pulls the entire library) and hence only work out-of-the-box with the Arduino project builder. This is fully supported and works out-of-the-box when using the Arduino Project Subsystem.
The ESP-IDF projects are based on a different framework that is not 100% compatible with the Arduino ecosystem. It is possible to add the Arduino core to ESP-IDF projects because Espressif has specifically designed their ESP32 core to be both a valid Arduino core and a valid ESP-IDF component that can be imported into ESP-IDF projects. This does not mean that any Arduino library can be automatically added to ESP-IDF projects without any adjustments, because the ESP-IDF build system is still different from the Arduino build system.
In order to import an Arduino library to an ESP-IDF project, it needs to be manually converted to an ESP-IDF component. Once you have performed the conversion, you can add the component to the project by selecting Add->Existing Item in Solution Explorer->Project->Components.
October 16, 2019 at 22:22 in reply to: ESP-IDF, arduino as component : Where to place third party librairies ? #26188support
KeymasterSorry, if you need help understanding the role of libraries and components in ESP-IDF projects, please contact Espressif for further support.
We can help you locate specific VisualGDB settings that correspond to specific properties of the components, however we are not able to offer help understanding the inner workings of ESP-IDF or other 3rd-party frameworks that are not directly maintained by us.
October 16, 2019 at 21:22 in reply to: CMSIS-DAP device showing up multiple times and debug fails #26185support
KeymasterHi,
The “debugging exited without any breakpoint hits” error was caused by incorrect propagation of CMAKE_C_FLAGS that might got cached on your side. Please try deleting the entire VisualGDB\Debug directory and rebuilding the project.
If the breakpoint still doesn’t work please try hardcoding asm(“int3”) in the main() function to trigger an unconditional breakpoint. If the breakpoint triggers, but the source code is not shown, please double-check that the build.ninja file contains the -g”, tine FLAGS statement for the main file, e.g.:
build src/CMakeFiles/openocd.dir/main.c.obj: C_COMPILER__openocd ../../src/main.c || cmake_object_order_depends_target_openocd FLAGS = -std=gnu99 -Werror=incompatible-pointer-types -g -DPKGBLDDATE=\"2019-10-08\" -DRELSTR=\"\" -DGITVERSION=\"\"support
KeymasterHi,
Although we have not specifically checked the inner workings of Simplicity Studio, the AXF extension does typically correspond to the regular ELF files.
Indeed, you can override the file extension via VS Project Properties, although due to the internal VS limitations the default extension needs to be the same for all project types, hence we picked the Linux-style empty extension as the default.
The “-g” option should normally not affect the linking and is only used during compilation, hence VisualGDB does not pass it to the linker. You can override this behavior via VS Project Properties -> Linker -> Command Line.
That said, the VisualGDB-level command line you mentioned is missing a linker script (the .ld file) that should be normally picked automatically once you select a device in the VisualGDB wizard. If this is a manually created stand-alone project, please ensure you have a linker script specified on the first page of VisualGDB Project Properties (and also ensure you have the -mcpu, -mfpu and -mfloat-abi passed to the linker as well, as those options affect the type of the pre-built standard C library used to link the executable).
support
KeymasterHi,
Sorry, the fully automatic renaming of the ESP-IDF projects is not yet supported. Hence, you would need to edit the Makefile (or CMakeLists.txt file if your are using CMake) in your project directory manually in order to rename the project. Simply search for the project name in that file, replace it and save the file. VisualGDB should automatically reload the project structure and show the new name.
October 16, 2019 at 15:23 in reply to: Arduino as components : Where to define global variable ESP32 ? #26180support
KeymasterHi,
For Arduino projects please use the first page of VisualGDB Project Properties to manage preprocessor definitions and other global options.
For ESP-IDF projects please use the VS Project Properties of a specific ESP-IDF component to define exported preprocessor macros (those macros will apply to all components in a project, not just the selected component). You can access the properties of the main component via the Properties command for the project node itself.
October 16, 2019 at 15:22 in reply to: ESP-IDF, arduino as component : Where to place third party librairies ? #26179support
KeymasterHi,
ESP-IDF projects do not use automatic library discovery like Arduino ones and require the libraries to be wrapped as ESP-IDF components. You can read more about the components in the ESP-IDF documentation. Once you get an understanding of the component structure you need for your project, simply use VisualGDB’s Add New Item command in the component list to create the necessary components.
support
KeymasterHi,
It is still on the roadmap, however it is hard to give any estimates currently, we are prioritizing a few other features over it, sorry.
support
KeymasterThanks for the repro. We have added this to our investigation queue, however due to the current amount of investigated issues and their priorities, it may take 2-4 weeks to fully process this.
-
This reply was modified 6 years, 2 months ago by
-
AuthorPosts