Forum Replies Created
-
AuthorPosts
-
June 21, 2017 at 04:27 in reply to: VisualGDB not displayed in Visual Studio 2017 Professional #11550
support
KeymasterHi,
This could happen if you had Visual Studio instances open while installing VisualGDB and the installer did not automatically close them. Normally installing or removing any other extension should force VS to refresh its cache and repair any menus.
support
KeymasterHi,
It looks like the program starts and exits normally. Please try stepping into it by pressing F10 instead of F5 and then stepping through.
support
KeymasterHi,
Strange, it looks like the libcompactcpp library is specified in the command line, but is not linked.
In order to troubleshoot this, please try creating a new project from scratch with the following code:
#include <exception> int main(void) { std::terminate(); }
Then link it with libcompactcpp. If the map file shows that the _ZSt9terminatev function is taken from libcompactcpp.a, please try understanding the differences between your main project and the test project. If not, please try re-downloading our latest toolchain.
If nothing helps, please add “-Wl,-verbose” to LDFLAGS and post the following:
- The full Map file
- The full verbose link log
This should help understand why libcompactcpp.a is not included.
support
KeymasterHi,
This looks like a gdb bug, so our best advice would be to try a different toolchain with a different gdb version. If this does not help, feel free to send us your ELF file so that we could try reproducing this on our side and checking why it crashes.
support
KeymasterHi,
You can import a project generated by mbed-cli into VisualGDB by first generating a Makefile-based project and then selecting Import->Import a project built with command-line tools. VisualGDB will then not make any assumptions about the project structure and will just run “make” to build the project.
The downside will be that you would need to manually synchronize the list of sources between the Makefiles and the VisualGDB project and also manually set the preprocessor macros and include directories in VisualGDB Project Properties so that VisualGDB IntelliSense could understand the code properly.
support
KeymasterHi,
Just to double-check, the board works with the Arduino core, but not with C/C++ projects, right? If yes, please try experimenting with the FLASH settings (mode/speed/size) via VisualGDB Project Properties to see if there is a combination of settings (start with the slowest frequency, smallest FLASH size and the dio mode) that works with the board.
support
KeymasterHi,
OK, this looks like the libcompactcpp.a is actually not being compiled in. Please check the verbose link log (if you are using MSBuild, simply check the .link.rsp file) for the linker command line and ensure it contains the “-lcompactcpp” argument. If you are not sure, please post the linker command line here and we will help you resolve this.
support
KeymasterHi,
Perhaps you were using semihosting instead? Basically, VisualGDB supports 3 ways of getting output from an Embedded target:
- Normal semihosting. It works similar to setting a breakpoint inside printf() and other functions, automatically reading the printed data and resuming the program. It’s fairly slow as the program is stopped on each event, but does not require any extra configuration (as long as you are using a C library that supports it).
- Fast semihosting. It uses our own implementation of the low-level _write() function that sends printed data to VisualGDB using an in-memory buffer without stopping the target (unless an overflow occurs). This mode can be enabled by referencing the “Fast Semihosting and Profiler” framework and is the recommended way.
- Using a COM port. The target physically outputs the data to a COM port and VisualGDB connects to it and shows the data. This requires manually configuring the COM port and the speed via VisualGDB Project Properties (Embedded Terminal page) and only works on the Custom edition and higher. If you have a lower edition, you can just run the free SmarTTY tool in the background to get the same effect.
The code shown in the previous post uses the mbed API for accessing serial ports, so it will only work in the 3rd mode (with either Embedded Terminal or a separate instance of SmarTTY or any other terminal program) and requires a physical connection, a driver for the USB-to-COM interface and a correct baud rate setting.
If your setup is not working, please double-check that:
- You are actually outputting the data to the correct UART interface on the board (step into the printf() method to see which one is used and then check the board schematic to ensure this UART is connected to the ST-Link COM-to-USB interface)
- You are opening the correct COM port from VisualGDB Project Properties (check which of the COM ports disappears in Device Manager when you unplug the board).
- The baud rate in VisualGDB Project Properties is explicitly set to 9600
Hope this helps.
support
KeymasterHi,
This looks like a bug of the Linux kernel itself. The easiest workaround would be to manually override the optimization level for the function that is causing the problem:
void __attribute__((optimize("O2"))) func() { //... }
-
This reply was modified 8 years ago by
support.
support
KeymasterHi,
That does indeed look like our toolchain. Please try enabling the map file generation via Linker Properties and ensure that the _ZSt9terminatev (std::terminate) function is coming from the libcompactcpp.a:
.text 0x08000188 0xa4 e:/sysgcc/arm-eabi/bin/../lib/gcc/arm-eabi/6.2.0/thumb/cortex_m4/crtbegin.o .text 0x0800022c 0xc e:/sysgcc/arm-eabi/bin/../lib/gcc/arm-eabi/6.2.0/../../../../arm-eabi/lib/thumb/cortex_m4\libcompactcpp.a(libcompactcpp.o) 0x0800022c __cxa_pure_virtual 0x08000232 _ZSt9terminatev
support
KeymasterHi,
If you are using a 3rd-party toolchain, it may be configured slightly differently and the compactcpp library won’t override the necessary symbols. Please try switching to our ARM toolchain.
support
KeymasterHi,
Just to double-check, the serial port output of the board is connected to a USB-to-COM adapter, you are using a terminal program like SmarTTY to view the transmitted data and you can confirm that the adapter works properly with other boards, right?
June 17, 2017 at 19:23 in reply to: Value no longer displaying when floating over variable in debug #11494support
KeymasterHi,
Please switch the GDB Session window to “All GDB interaction” and check if VisualGDB issues any gdb commands when you are trying to hover the mouse over a variable. If no, please check if this is broken for non-VisualGDB projects as well. If yes, please let us know if gdb reports any errors.
support
KeymasterHi,
It looks like your toolchain might be missing some libraries. Please try running C:\SysGCC\Beaglebone\arm-linux-gnueabihf\sysroot\usr\local\qt5\bin\uic.exe manually. Does it run successfully, or does it report that some DLL files are missing?
support
KeymasterHi,
You can do that, but the VisualGDB will treat the project as a black box. I.e. when you add new files to Solution Explorer, it won’t automatically update your Makefiles and if you want to change some settings like include directories, you will have to manually edit both the Makefiles and the IntelliSense settings in order to change them. You will also need to manually set the preprocessor macros and include directories generated by mbed-cli in the IntelliSense settings, as VisualGDB won’t detect them automatically.
You can try using our mbed BSP generator to build a first-class BSP that will be fully synchronized with Visual Studio, although it may need some adjustment due to changes to mbed codebase since the release it officially supports.
-
AuthorPosts