openocd | The GNU MCU Eclipse OpenOCD | Code Editor library

 by   ilg-archived C Version: deprecated License: GPL-2.0

kandi X-RAY | openocd Summary

kandi X-RAY | openocd Summary

openocd is a C library typically used in Editor, Code Editor, Eclipse applications. openocd has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

The GNU MCU Eclipse OpenOCD project is a fork of OpenOCD, customised for a better/more convenient integration with the GNU MCU OpenOCD Debugging plug-in. Expect GNU MCU Eclipse OpenOCD to follow official OpenOCD releases, plus several intermediate releases, as needed.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              openocd has a low active ecosystem.
              It has 221 star(s) with 59 fork(s). There are 42 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 35 have been closed. On average issues are closed in 130 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of openocd is deprecated

            kandi-Quality Quality

              openocd has no bugs reported.

            kandi-Security Security

              openocd has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              openocd is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              openocd releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of openocd
            Get all kandi verified functions for this library.

            openocd Key Features

            No Key Features are available at this moment for openocd.

            openocd Examples and Code Snippets

            No Code Snippets are available at this moment for openocd.

            Community Discussions

            QUESTION

            Openocd GDB server configuration
            Asked 2021-Jun-14 at 14:29

            I am using Openocd to debug my code remotely for STM32 via Raspberry pi as detailed in this tutorial: https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi

            Whenever I run openocd it starts gdb server on port 3333 which is default of course as shown in the picture above. My question is that, is there a way to provide a different port number for openocd to start the gdb-debugger on... For example, if I want to run openocd where i want gdb server to start on 3334 instead of 3333 how can i do that.

            I intend to do that so that i can run multiple openocd instances for different targets simultaneously connected to a single raspberry pi. Any help will be greatly appreciated. Thanks in advance.

            ...

            ANSWER

            Answered 2021-Jun-14 at 14:29

            OpenOcd manual explains how to select a specific port number inside the configuration file as shown in image below:

            Source https://stackoverflow.com/questions/67927513

            QUESTION

            Cannot open source file avr/io.h (dependency of hal.h) with Visual Studio Code on windows 10
            Asked 2021-Jun-05 at 07:00

            I want to implement an embedded project using stm32F0 (arm-based) with VS Code. The project ran properly on other systems.

            1. I Added C/C++ extension to visual studio
            2. I installed a compiler for cortex-m0 arm: GNU Arm Embedded toolchain/gcc arm for windows.
            3. Makefiles installed: binaries file + dependencies file
            4. openOCD installed (open On Chip Debugger)
            5. tasks.json (build instructions), c_cpp_properties.json (compiler path and IntelliSense settings) were created. I modified the Include path because my program includes header files that aren't in my workspace, and that is not in the standard library path.

            c_cpp_properties.json file

            ...

            ANSWER

            Answered 2021-May-27 at 13:45

            Cannot open source file avr/io.h (dependency of hal.h)

            You appear to be using ChibiOS whhich has a file hal.h which includes halconf.h which includes mcuconf.h. Clearly you appear to have an AVR port of ChibiOS where you need STM32 or ARM Cortex-M support.

            But, how VS Code can find dependencies before compiling?

            The same way as the compiler/pre-processor do, by having include paths configured, parsing the project files and accounting for any externally defined (command line) macros.

            I also was wondering if I should add a path for main.cpp file and other C and CPP files in the configuration file of VS Code to solve these problems?

            I believe it will parse project files in any case. It only needs to find the header files included in a source file to provide context for the parsing of the sourcefile.

            For debugging, I don't see any debugger in the list, though I installed openOCD and add the path in the environment variable

            That is an entirely different question - post a new question for that.

            Source https://stackoverflow.com/questions/67715691

            QUESTION

            How to start openOCD on ARM M1 MacBook
            Asked 2021-May-02 at 18:00

            I'm having a hard time getting openocd to start. I attached an STM32F3 Discovery board. When I run openocd -f interface/stlink.cfg -f target/stm32f3x.cfg I get the following error:

            ...

            ANSWER

            Answered 2021-Apr-29 at 20:47

            Turned out that the cable I used was just a power cable which didn't support data transmission.

            With a proper mini USB cable that has all 4 lines it worked right away.

            Source https://stackoverflow.com/questions/67324561

            QUESTION

            ocd assertion fault when connecting gdb
            Asked 2021-Apr-26 at 01:45

            I am debugging board STM32f4 Discovery on Ubuntu 20.04 with openocd and arm-none-eabi-none. Things work well until yesterday. Today, when I connect the gdb to localhost:4444, following assertion happened and ocd quit:

            ...

            ANSWER

            Answered 2021-Apr-26 at 01:45

            I found the issue: I scale up the clock speed without switching to appropriate Flash Latency so the debugger will lose the track of program address as mentioned here, in Clocks and initial settings part: https://vjordan.info/log/fpga/first-steps-with-the-stm32f4.html

            Source https://stackoverflow.com/questions/67041370

            QUESTION

            OpenOCD GDB executable "arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" correctly
            Asked 2021-Feb-17 at 11:45

            I am using the Raspberry Pico and attempting to use the debugging tool in VS Code from VSCode on a Raspberry Pi 4, but I am getting the following error:

            OpenOCD GDB executable "arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" correctly.

            I have the following config for launch.json

            ...

            ANSWER

            Answered 2021-Feb-17 at 11:45

            There has been a fix recently in the documentation.

            As explained in this link: https://github.com/raspberrypi/pico-examples/issues/8

            When setting a Raspberry Pi up as described in the Getting Started guide, two problems arise when launching the debugger:

            Setting "gdbpath" in launch.json is marked as not allowed When launching the setting is ignored, and arm-none-eabi-gdb is used, which is unavailable It seems that setting "cortex-debug.gdbpath" can only be set in settings.json

            So remove.

            "gdbpath" : "gdb-multiarch" from launch.json and add "cortex-debug.gdbPath": "gdb-multiarch" to settings.json.

            Source https://stackoverflow.com/questions/65872178

            QUESTION

            OpenOCD multiadapter type configuration
            Asked 2021-Feb-10 at 18:17

            Some devs on our team have J-Link debuggers while others are working with ST-Link debuggers. All of us work on the same hardware with the same firmware, basically everything else is the same. The current setup requires to start OpenOCD with a different cfg file for each adapter. I would like to have this done automatically.

            Is there a way to configure OpenOCD to automatically choose the correct cfg file based on the connected adapter?

            ...

            ANSWER

            Answered 2021-Feb-02 at 13:47

            With linux you could use the USB-VendorID/ProductID to choose the config file.

            You could start via a shell script like

            Source https://stackoverflow.com/questions/66005814

            QUESTION

            Gdb: target remote connects at the wrong place?
            Asked 2021-Jan-15 at 16:39

            I'm learning how to use OpenOCD and GDB according to the Rust Embedded Book.

            There is a moment when you connect to the running OpenOCD:

            ...

            ANSWER

            Answered 2021-Jan-15 at 16:39

            When you connect to the target with target remote GDB asks the target for its current register state, including the $pc value. GDB does NOT (at that point) modify the remote state in any way.

            When you first connected the remote reported a $pc value of 0x0. If the remote changed state for some reason, lets say, you ran something on the remote, then the $pc value might change, say to 0x08000bbe.

            If you then disconnect and reconnect the remote target might still have a $pc value of 0x08000bbe which is what GDB will see.

            As was mentioned in the comments, GDB is just trying to map the $pc value onto the debug information in your program. The ?? shows that GDB can't find any symbols at address 0x0. While GDB did find the symbol __c_m_sh_syscall near to address 0x08000bbe. However, this is information doesn't mean much at this point, you've not yet loaded anything onto the target, so you're not really in the function __c_m_sh_syscall, it's just the current address of the remote.

            When you do the load command this is when GDB loads the executable onto the target, and writes to the $pc.

            TL;DR; If your work flow is target remote then load, don't worry about the state of the target immediately after the target remote, this is just whatever random state happens to be in the target when you connect.

            Source https://stackoverflow.com/questions/65738714

            QUESTION

            OpenOCD Tcl interface
            Asked 2021-Jan-13 at 17:12

            I am programming a C# application which will be used to program and test STM32 microcontrollers during production. I would like to program and verify the chip, then write some configuration to the flash memory and finally set the read-out protection. As a backend I decided to use OpenOCD and its Tcl interface running at port 6666.

            The problem: I am able to execute commands and get their results, but I don't know how to check if the command was successfully executed or not. E.g. the reset command returns empty string no matters the target is connected or not... Some other commands like mdw return data or error string, but I am looking for some generic way how to check if the command succeeded or not.

            Thank you for your ideas.

            ...

            ANSWER

            Answered 2021-Jan-13 at 17:12

            Assuming your Tcl code has a bit in its heart doing sendBack [eval $script], you'd change it to do this:

            Source https://stackoverflow.com/questions/65706427

            QUESTION

            Starting program from Reset_Handler without C code
            Asked 2020-Nov-14 at 18:45

            I want to be able to run and debug a binary generated from pure assembly on an ARM Cortex-M4 microcontroller without having to use inline assembly inside a C program.

            I have a linker script and some utility C startup code, which sets up the interrupt vector table, implements the Reset_Handler function, copies the .data section from flash to SRAM and then calls main(). This workflow works ok, but it's a bit clunky, and I would rather write assembly directly instead of inline in a C program that is nothing more than main() with the assembly mnemonics. I also want to know out of interest - maybe there is a better way altogether of going about this. The Reset_Handler function looks like this:

            ...

            ANSWER

            Answered 2020-Nov-14 at 18:45

            QUESTION

            How should I initialise my stm32 ( f215 )
            Asked 2020-Oct-24 at 10:45

            I am trying to make an extremely minimal stm32f215 firmware to teach myself its boot-up intricacies. As it is now I have this dump which, to my knowledge, should write the stack address to r0 and loop forever:

            ...

            ANSWER

            Answered 2020-Jul-01 at 15:23

            And the culprit has been found! It appears the st-util debugger (from the project mentioned above) causes an error somehow. openocd works like a charm and with that the minimal code above works.

            Anyway, bug reports to write and all that...

            Thank you all so much for verifying my assembler and helping me with dotting all the t's and crossing all the i's!

            Source https://stackoverflow.com/questions/62642314

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install openocd

            How to build (using Docker containers)
            How to publish
            Change log
            See the releases page. Binaries for most platforms can be downloaded from GitHub Releases.
            Credit to Shields IO and Somsubhra/github-release-stats.
            GitHub gnu-mcu-eclipse/openocd.git latest release all releases
            xPack @gnu-mcu-eclipse/openocd latest release, per month all releases
            individual file counters (grouped per release)

            Support

            After RISC-V support was upstreamed, GNU MCU Eclipse OpenOCD no longer tracks the changes from the RISC-V OpenOCD fork, since some of them interfered with other targets.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries