Forum Replies Created
-
AuthorPosts
-
supportKeymaster
You cannot reliably combine code from MS C++ compiler and GCC in one module as those compilers have too many differences. However you can create shared library (.DLL) using VisualGDB and load it from your MSVC-compiled app (or vice versa). As long as those are 2 different modules, it should work.
supportKeymasterHi,
Simply add “-j <number of cores>” to the Make command line arguments in VisualGDB Project Properties to enable parallel building.
supportKeymasterThe easiest solution would be to pass the directory of the main makefile and then add further files to your project via <right click in Solution Explorer>->add->Add folder recursively.
supportKeymasterYes, you can follow this tutorial: http://visualgdb.com/tutorials/raspberry/qt-cross/
supportKeymasterHi,
Sorry for the delayed reply. Please find the answers to your questions below:
- If you are using VisualGDB 4.3r4, the TOOLCHAIN_ROOT should be set on-the-fly based on the current project toolchain. Please double-check that it’s defined with the ?= syntax in mcu.mak and that the environment variable is passed correctly (add ‘set’ to build commands in Makefile to get a dump of the environment).
- Visual Studio project variable system is different from VisualGDB variable system, so the IntelliSense includes cannot reference VisualGDB variables. Simply specify the relative paths to your include directories (e.g. ..\include) and they will be handled correctly.
- This is a known issue that has been fixed in the upcoming 5.0 release.
- This is caused by a bug in the texane-STLink tool that VisualGDB uses. Simply unplug your ST-Link and plug it back to get it fixed or switch to OpenOCD that does not have this problem.
- This is a limitation of VS. VisualGDB projects are Makefile projects, so Visual Studio has no way of determining whether any of the files have changed. We do have long-term plans of transparently supporting MSBuild, that will eliminate this problem, but currently the only workaround is to answer ‘no’ if you are 100% sure that the project has not been modified. VisualGDB will then debug the previously built binary.
- There is no special procedure. The installer simply unpacks an archive and registers the toolchain with VisualGDB. Simply delete the toolchain folder and VisualGDB will recognize that it’s gone.
- We do have plans to support HAL for other device families and also allow selecting between HAL and classic frameworks, however this is planned after the release of the new IntelliSense engine.
- You can easily achieve that by adding ‘-jXXX’ to VisualGDB Project Properties -> Build Settings -> Additional Arguments.
- This might be quite tricky to support properly (GDB/VS won’t support it natively, so we would have to add some special GUI for that) and it will only work with GDB stubs that provide a command interface that is separate from GDB. You should be able to achieve a similar result if you use OpenOCD, telnet to port 4444 while it is running, and run commands like “mdw <addr> <count>” to query memory contents directly from it (bypassing VS and GDB). Let us know if that works for you.
- We did experiment with ST-Link/V2 and SWW (built an open-source trace tool from https://github.com/obe1line/stlink-trace) and found out that at seemingly random points in time the ST-Link device enters some internal state where it simply starts producing garbage instead of the trace output. Furthermore, different firmware versions showed different behavior, so we gave up. If you are willing to experiment with it and could get the tool to work reliably, we could help you port its functionality to OpenOCD so that VisualGDB would support it directly. You can find the source with our modifications to get it working on STM32F4Discovery here: http://visualgdb.com/tmp/trace.zip (Disclaimer: we are not related to the author of the tool and find parts of its code as puzzling as you will).
- (Regarding the <MCUDefinitionFile>). Thanks for letting us know, we will include a fix in the upcoming 5.0 release.
March 17, 2015 at 05:44 in reply to: What is going on here – GCC flags, BSP's and shared files? #6248supportKeymasterHi,
You can convert your project to a stand-alone project to copy all shared files to the project directory. Alternatively you can remove the startup file from the device-specific files and add a local copy instead. VisualGDB project system is quite resilient and will not be broken by changes like that. The original startup file will be re-inserted into the project only if you change the MCU type (or MCU properties) via VisualGDB Project Properties forcing it to regenerate the settings files.
The gcc_Debug.h file contains macros that are defined by GCC itself (e.g. GCC version) and the macros specified via command line. The STM32F10X_MD_FL macro defines the current MCU family and comes from the stm32.mak file the stm32.mak file is generated from data in %LOCALAPPDATA%\VisualGDB\EmbeddedBSPs\arm-eabi\com.sysprogs.arm.stm32\BSP.XML and contains the basic settings expected by the STM32 code. When you change the current MCU type, VisualGDB will recompute the flags necessary to build the code for it and will regenerate stm32.mak. If you want to add your own preprocessor macros (e.g. controlling the clock settings), use the VisualGDB Project Properties dialog (Makefile Settings page) that will save them to the debug.mak file instead.
The source control integration should work transparently as long as your check in the .vgdbsettings files from your project directory. You can reference your external libraries using relative paths on the Makefile Settings page and check in them as well.
Setting up a different compiler like IAR would be a bit more complicated. VisualGDB uses the GNU Make tool to build the projects. The GNU Make reads the rules from Makefile and files included from it and uses them to determine which files are outdated and what commands are used to rebuild them. In order to use IAR you will need to replace the Make rules that invoke GCC with Make rules that invoke IAR. This will involve changing the GCC-specific command-line arguments to IAR-specific command-line arguments and updating regular expressions that VisualGDB uses to parse error messages.
The interrupt handlers are supported via the GCC “weak reference” mechanism. The shared startup_stm32xxx.c file contains definitions like this:
void NMI_Handler() __attribute__ ((weak, alias ("Default_Handler")));
Then it builds the interrupt vector table that is placed to the specified location in FLASH:
void * g_pfnVectors[0x6b] __attribute__ ((section (".isr_vector"))) = { &_estack, &Reset_Handler, &NMI_Handler,
If your project defines another implementation of NMI_Handler, the linker will replace the default “weak alias” with it and the interrupt vector table will point to it instead. Hence there is no need to modify the shared startup_stm32fxxx.c file – simply ensure that each project provides its own replacement of all necessary handlers.
If you want to have several different projects using different modifications of the startup file, simply modify it this way:
#ifdef USING_BOARD_1 //Code specific to board 1 #elif defined(USING_BOARD_2) //Code specific to board 2 #else #error Board not defined #endif
Then define USING_BOARD_1 or USING_BOARD_2 on the Makefile Settings page of your project settings. As different projects will have different macros defined, the same shared startup file will work differently for each of the projects.
supportKeymasterHi,
We’ve made the modification you suggested and it will be included in the next preview build of VisualGDB with our new IntelliSense engine. Would you like to get a test build to try it out before we release that?
Regarding the threads window, there is no public API to add further columns, or even get the currently selected threads. However, as it is WPF-based, you can use .Net reflection to hack things dynamically (e.g. add columns on-the-fly) without breaking VS functionality. This will however most likely break in subsequent VS versions and would require modifications to accommodate the changes in the internal structure of the threads window.
supportKeymasterHi,
The warning is shown when VisualGDB tries to set a breakpoint using the full path (e.g. “c:/dir/file.cpp”, but GDB refuses that). What toolchain are you using? Could you share the full GDB log as described here?
supportKeymasterCould you please post the contents of the “output” pane after trying to build your project? It should contain more information about the specific errors.
supportKeymasterYou can use the following URLs to manually download the BSP/EDP lists:
http://visualgdb.com/hwsupport/BSP/
http://visualgdb.com/hwsupport/EDP/?version=4.3
Then download the file pointed by the PackageURL element and install it by running VisualGDB.exe <package file name>
supportKeymasterHi,
This message could only appear if you have already entered an activation key. If you have not entered one, your registry may be corrupt. Please try installing VisualGDB on a different computer.
supportKeymasterFor a normal (non-standalone project) you can override the linker script by editing the <mcu>.mak file manually (-T argument in LDFLAGS). Note that it will be overridden next time your change your CPU type. To avoid that convert the project to a stand-alone one.
supportKeymasterHi,
Please forward your activation key to our support email so that we could see why it is not working.
March 10, 2015 at 00:59 in reply to: Invalid kernel source directory: cannot find C:\…\kernel\printk.c #6222supportKeymasterHi,
The error happens because the file has been moved in one of the recent versions of the kernel. As a workaround, simply copy it to the location where VisualKernel expects it.
We will release a fix resolving this once we are done with the new IntelliSense engine capable of handling all GNU-specific extensions.
-
AuthorPosts