support

Forum Replies Created

Viewing 15 posts - 6,661 through 6,675 (of 7,816 total)
  • Author
    Posts
  • in reply to: VisualGDB with own build chain (make) #7261
    support
    Keymaster

    Hi,

    You can do it in 2 different ways:

    • Select “Specify the toolchain manually” in the project wizard. VisualGDB will try to guess the right parameters for your toolchain and setup a Makefile for you.
    • Use the Custom project wizard to just specify the build command line. VisualGDB will run it “as is” and won’t ask for anything else.
    in reply to: VisualGDB not flashing device #7255
    support
    Keymaster

    Hi,

    Yes, the addresses look normal. The .bss section contains uninitialized variables, so it does not have the LOAD attribute by design.

    Then the problem is either in the faulty hardware or in your OpenOCD settings. Please try creating a new project for the same chip using default settings and programming it. Does this work?

    If yes, please replace the ELF file of the project that is broken with the ELF file from the project that works. Then run the project without rebuilding it (Debug->Start debugging with GDB). Does VisualGDB load the other project file using the current project settings correctly? Does compare-sections succeed? If no, what is different between the 2 projects’ settings. If yes, what is different between the 2 ELF files (you can enable the .map file generation to dump a general overview of the ELF file structure during building)?

    in reply to: VisualGDB not flashing device #7252
    support
    Keymaster

    Hi,

    Based on a quick look, you are using a custom linker script, so the problem might be inside it.

    Please use the GDB Session window to run the following commands:

    • compare-sections
    • maint info sections

    The first command will compare each section of the ELF file (e.g. code, data, interrupt handlers) to the memory contents on the device and will pinpoint the mismatching ones.

    The second command will list all sections in the ELF file. Please check that each section marked with the LOAD attribute is within your device FLASH or RAM bounds, e.g.:

     [1]     0x0400->0x092c at 0x00008400: .text ALLOC LOAD READONLY CODE HAS_CONTENTS

    Section size = 0x92c – 0x400 = 0x52C, range = 0x8400 – 0x892C => within FLASH range (0x0000 – 0xFFFF). The RAM and FLASH addresses and sizes can be found in your device datasheet.

    If this does not help solve the problem, please let us know the exact device you are using and attach the output of both commands.

    Note that sections like .debug_info do not have the LOAD attribute and hence do not need to be checked as they are not loaded into the device.

    in reply to: Using the QuadSPI on STM32F7 Discovery #7248
    support
    Keymaster

    Hi,

    In order to support the .textqspi section, you will need to edit the linker script:

    1. Go to the Makefile Settings of VisualGDB Project Properties, find the “linker script” field, click “create a local copy”.
    2. Find the MEMORY section and add the QSPI entry there specifying the address and size of the QSPI memory on your device
    3. Find the statement that places the .text section into FLASH. Copy it replacing .text with .textqspi and FLASH with QSPI. This will place the img6 variable into the QSPI memory.

    Note that this will make your code expect the variable to be placed into the QSPI FLASH, but won’t instruct OpenOCD to program the QSPI memory. You will need to program the QSPI memory separately using the STLink tool (you can extract the contents of the .textqspi section from the ELF file into a separately programmable binary file by running the following command:

    arm-elf-objcopy -O binary --only-section=.textqspi project.elf qspi.bin

     

    in reply to: Problem with visualgdb on beaglebone black #7247
    support
    Keymaster

    If you can otherwise connect to the board (e.g. with SmarTTY), the USB cable should be OK. Most likely the problem is caused by insufficient permission on the /tmp folder.

    Can you upload files there using SmarTTY? If yes, could you share a screenshot of the error displayed by VisualGDB?

    in reply to: Remote console window? #7246
    support
    Keymaster

    Hi,

    Please use the Debug->Windows->Remote Program Console command. Note that unless a remote debugging is active, this command will not appear.

    in reply to: VisualGDB not flashing device #7245
    support
    Keymaster

    Hi,

    Sure, please share the gdb log showing the commands VisualGDB is issuing and the GDB responses so that we could help you figure out why programming is broken.

    in reply to: Openocd jtag driver problem #7238
    support
    Keymaster

    Hi,

    The settings should normally be merged. Can you attach an archive of a sample project where the settings are not propagated properly?

    in reply to: How to update files in VS? #7237
    support
    Keymaster

    Hi,

    If the file is on Windows machine in a directory specified as the source directory via VisualGDB Project Properties, VisualGDB will transfer it automatically.

    If not, please double-check the name and location of the file and your current file transfer settings.

    in reply to: Error 'Importing Specs' #7232
    support
    Keymaster

    Hi,

    Sorry for the confusion. Did I understand you correctly that:

    • Building of your project produces a valid executable, but shows the “The system cannot find the path specified” error
    • Manually deploying and running the project works
    • Debugging your project works
    • Testing toolchain fails at the “importing specs” stage and IntelliSense does not get configured properly

    If yes, please try adding “-d” to the GNU Make arguments on the Build Settings page of VisualGDB Project Properties. This should force GNU Make to print detailed log on every action it is doing, hopefully revealing what is causing the error message.

    If the debugging actually does not start, please enable verbose mode in Tools->Options->VisualGDB->General->Tweaking, start debugging and check for detailed error messages. You can also check the VisualGDB Launcher Output in the Output pane in Visual Studio. Do any of those places contain any extra information about the problem?

     

    support
    Keymaster

    Hi,

    The VisualGDB variables are only resolved directly in command lines. Variables that are saved in Makefiles will not be resolved unless you specify them explicitly in Make command line (e.g. make SourceDir=$(SourceDir)). That said, you don’t need to use the $(SourceDir) in your settings. Simply specify the relative paths (e.g. subdir/LinkerScript.lds).

    in reply to: How to update files in VS? #7230
    support
    Keymaster

    Hi,

    There is currently no standard way of doing this, so we would recommend one of the following:

    • Use a source control system like Git or SVN to merge the changes from Linux and Windows
    • Use SmarTTY to download the entire source folder or individual files from your Linux machine
    • Add a custom shortcut via VisualGDB Project properties to download the source folder and then use the VisualGDB toolbar to invoke it quickly (requires Custom or Ultimate edition)
    in reply to: Openocd jtag driver problem #7229
    support
    Keymaster

    Hi,

    The settings from VisualGDB Project Properties are saved in debug.mak/release.mak, while esp8266.mak contains settings that are common for all configurations.

    Please double-check the settings in debug.mak and see if they are actually included in compilation command line.

    in reply to: Openocd jtag driver problem #7225
    support
    Keymaster

    Hi,

    It’s hard to guess what exactly went wrong, but reasons could vary from files simply not rebuilding to some typos in the preprocessor macros.

    We would recommend something like this:

    1. Add a static variable pre-initialized to a certain string (e.g. “test123”), use this variable from user_init() so that it gets referenced. At the same time comment out the call to gdbstub initialization.
    2. Does the binary image contain your string (test123)? If no, it did not get rebuilt properly. Note that the ESP8266 .bin images are only rebuilt when you start debugging with VisualGDB, not when you build the project.
    3. Do you still get the gdb stub message? If yes, some other code is calling it. Perhaps user_init() is defined in 2 different places and one takes precedence over the other one?

    The JTAG debugging would be held by gdbstub because gdbstub essentially installs a handler to some debug-related interrupts, then triggers an interrupt and that interrupt handler waits for a reply via the COM port. The JTAG debugger does not prevent interrupts from being handled, i.e. the stub will still catch it and start waiting for gdb to attach. Once gdb attaches, however, you can still use the JTAG debugger to see what’s going on inside the stub and inside your code.

    in reply to: Debugging impossible when timer interrupts are enabled #7219
    support
    Keymaster

    Hi,

    You can try using the OpenOCD’s “cortex_m maskisr” command to disable interrupts during stepping as described here: http://openocd.org/doc/html/GDB-and-OpenOCD.html

    However this will not work when using high-level debug adapters like ST-Link.

Viewing 15 posts - 6,661 through 6,675 (of 7,816 total)