Forum Replies Created
-
AuthorPosts
-
support
KeymasterThanks for the explanation. VisualGDB 5.4+ still uses the templates under <VisualGDB>\ProjectTemplates, however instead of showing a plain list of templates in the wizard, it allows automatically picks the best template based on the project type/build subsystem choices. As a side effect, this indeed makes it impossible to add custom templates via this mechanism.
We have updated the logic that handles the .vgdbxpt files to substitute the $$PROJECTNAMEBASE$$ and $$PROJECTNAMEBASE_CPPID$$ variables. VisualGDB will also substitute those values inside the files that have the SubstituteProjectName property set to true in the template.xml file (re-create the template using the VisualGDB build below to see the new property).
Please try this build: VisualGDB-5.5.3.3457.msi
support
KeymasterThanks for pointing it out. We have quickly rechecked the default project generated for the STM32H750IBĀ device and it appeared to be fine (we don’t have this specific hardware to test it). Hence, the problem you are experiencing might be caused by one of the following issues:
- The layout of the project built by VisualGDB doesn’t match the target (e.g. you selected a slightly different device when building the project or there is a bug in our device definitions).
- Something is interfering with the debugging (e.g. unstable power).
The easiest way to narrow this down would be to try using VisualGDB to debug an application for the same board built with the ST’s IDE:
- Try building a similar project in the other IDE and locate the .elf file.
- Copy the elf file over the one built with VisualGDB (<Project directory>\VisualGDB\Debug\<Project Name>).
- Select Tools->Options->Projects and Solutions->Build and Run->On Run->Prompt to Build.
- Start debugging. When Visual Studio asks whether to rebuild the project, click “No”.
Please let us know if a project built outside VisualGDB runs as expected under the VisualGDB’s debugger and we will advise you on the further steps to diagnose this.
As a quick alternative, you can also try configuring VisualGDB to stop at the reset handler (VisualGDB Project Properties -> Embedded Debug Tweaking) and press F10 instead of F5 to start debugging. This will step into the very first instruction that gets executed after reset, letting you debug the initialization code.
support
KeymasterHi,
If you are using the Linker Options->Command Line to specify the libraries anyway, you can simply put -Wl,–whole-archive before the library names and -Wl,–no-whole-archive after them.
That said, the recommended way to reference libraries would be to right-click on the executable project in Solution Explorer and select Add->Reference. This will automatically add the libraries to the linker inputs and will also make sure that the libraries are built before the main application. If it helps, we could add a per-library option that will let VisualGDB automatically wrap its name with the –whole-archive/–no-whole-archive when building the linker command line for the main project.
support
KeymasterNo problem, we can add an option for wrapping library references with –whole-archive. Just to double-check, are you using MSBuild and referencing the libraries using the regular References window in VS?
support
KeymasterHi,
The CMSIS-DAP interface is generally very unreliable and slow, so we would recommend simply using ST-Link or J-Link instead.
You might be able to solve the U-Link issue by analyzing verbose OpenOCD log and patching the OpenOCD scripts, however it may not be practical given that ST-Link and J-Link will very likely just work out-of-the-box.
support
KeymasterHi,
The <VisualGDB>\ProjectTemplates\Linux folder is still present in VisualGDB 5.4 and 5.5 and the underlying logic has not changed much since v5.1.
The custom project templates are still supported, although only with the classic project types (i.e. not with Arduino, Mbed or ESP-IDF). If you believe the path substitution is not working, please share the exact steps to reproduce the issue and we will advise you on the workaround.
Regarding running custom code, it is not possible to run it during project creation, however it is possible to add it as a custom shortcut (VisualGDB Project Properties -> Custom Shortcuts) that will be available via the Project menu in Visual Studio. You can create a shortcut for the initialization commands that should be run after creating the project from the template and then run it after creating the project from the template.
support
KeymasterThanks for renewing your support.
If the firmware doesn’t start completely, we would advise checking the following points:
- Using Embedded Memory Explorer, check that the interrupt vector is present at the correct address (double-check the address in the device datasheet, or compare it with a working file).
- Double-check that the interrupt vector points to the correct Reset handler function. You can dump the contents of the section containing the interrupt vector by running arm-none-eabi-objdump or do it at runtime by evaluating *((void *)0xADDRESS) via the Watch window.
- You can configure VisualGDB to stop at the Reset handler via VisualGDB Project Properties – >Embedded Debug Tweaking and then starting debugging with F10 instead of F5.
- If nothing helps, you can also try hardcoding a breakpoint in the reset handler (asm(“bkpt 255”)) and issuing a manual reset via the GDB Session window (mon reset).
support
KeymasterHi,
It looks like your support period has expired. Please renew it here and will be happy to help you.
support
KeymasterYes, please refer to the following tutorial for details: https://visualgdb.com/tutorials/arm/semihosting/
support
KeymasterHi,
Yes, you can configure VisualGDB to extract the memory layout from your custom linker script.
Please try using the latest VisualGDB 5.5 Preview 2, open VisualGDB Project Properties on the Additional Memories page. The setting on top of the page controls whether VisualGDB will use the memory definition shipped with it, or will extract it from the linker script.
support
KeymasterSorry, this is something to check with Segger support. We are not affiliated with Segger and do not have any insights into their tools’ internals.
support
KeymasterThanks for pointing this out. Indeed the latest release of TinyEmbeddedTest added a new option that would require rebuilding the settings.
We have fixed the issue in the our development branch (VisualGDB-5.5.2.3450.msi). It will automatically pick default values for the new settings if they are not specified.
support
KeymasterNo problem, you can specify the key via registry:
HKEY_CURRENT_USER\Software\Sysprogs\VisualGDB\Settings\RegistrationKey
support
KeymasterNo problem. Most likely, the chip you are using handles the exceptions slightly differently from the way OpenOCD would expect them and hence prevents the breakpoints from being handled correctly. Normally, this should be fixed in one of the upcoming OpenOCD updates.
Either way, if J-Link software works better, you can use the following workaround to avoid the “Attach to crashed/frozen target”. Try creating a gdb script with the following contents:
target remote :2331 monitor go disconnect quit
It instructs gdb to connect to the J-Link gdb stub, resume the target and disconnect. You can run it via command line as shown below:
<VisualKernel directory>\KernelTools\arm\arm-linux-gnu-gdb.exe -s <script file>
Or alternatively, add it to VisualKernel Project Properties -> Custom Debug Steps -> Before Debugging. This will allow VisualKernel to connect to the target via SSH and handle deployment/module enumeration as if it does with regular debug sessions.
support
KeymasterThanks for sharing this. If the K210 OpenOCD does not support reading the peripheral registers, it might be worthwhile checking whether Segger J-Link supports it. J-Link comes with its own gdb stub that works better than OpenOCD in many non-trivial scenarios. VisualGDB supports working on top of either debug method, so if J-Link supports the K210 hardware registers, you should be able to switch very easily.
-
AuthorPosts