Git Product home page Git Product logo

csse3010-debug's Introduction

Cortex Debug

Visual Studio Code with Cortex-Debug Installed

This is a modification of (https://github.com/Marus/cortex-debug/). All credit goes to the original author.

Debugging support for ARM Cortex-M Microcontrollers with the following features:

  • Support J-Link, OpenOCD GDB Server
  • Initial support for STMicroelectronic's ST-LINK GDB server (no SWO support yet)
  • Partial support for PyOCD and textane/stlink (st-util) GDB Servers (SWO can only be captured via a serial port)
  • Initial support for the Black Magic Probe (This has not been as heavily tested; SWO can only be captured via a serial port)
  • Cortex Core Register Viewer
    • In some cases the st-util GDB server can report incomplete/incorrect registers, so there may be some issues here.
  • Peripheral Register Viewer (Defined through standard SVD file)
  • SWO Decoding - "console" text output and binary data (signed and unsigned 32-bit integers, Q16.16 fixed point integers, single percision floating point values)
    • The registers that are part of the DWT, TPIU, and ITM debug components will automatically be configured and do not need to be set in firmware.
    • Firmware may still need to enable the SWO output pin - as this part of the setup is microcontroller dependant.
    • Decoding ETM data over the SWO pin is not currently supported.
  • Support for Custom ITM Data Decoders:
    • Ability to define JavaScript modules to decode complex data formats streamed over one or more ITM ports. Data can be printed to a output window, or sent to the graphing system.
  • Live graphing of decoded ITM data.
  • Raw Memory Viewer ("Cortex-Debug: View Memory" command)
  • Ability to view and step through the disassembled binary. There are three ways that disassembled code will be shown:
    • Disassembly code will automatically be shown if it cannot locate the corresponding source code.
    • You can manually see the disassembly for a particular function ("Cortex-Debug: View Disassembly (Function)" command)
    • You can set the debugger to always show show disassembly ("Cortex-Debug: Set Force Disassembly" command)
  • Globals and Static scopes in the variables view
  • Initial support for Rust code (most functionality is working; disassembly views and variables view may still have issues)
  • RTOS Support (J-Link and OpenOCD - RTOS supported depends on GDB server support)
    • As a general rule do not try to use stepping instructions before the scheduler of your RTOS has started - in many cases this tends to crash the GDB servers or leave it in an inconsistent state.

Planned Features

  • Additional Graphing Options
  • Enhanced SVD Auto-selection
  • Semihosting Support

Installation

Requirements:

  • ARM GCC Toolchain (https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads) - provides arm-none-eabi-gdb and related tools
  • At least one of:
    • J-Link Software Tools - provides the J-Link GDB Server for J-Link based debuggers (https://www.segger.com/downloads/jlink)
    • OpenOCD - provides a GDB Server that can be used with a number of debuggers (http://openocd.org)
      • NOTE: On macOS do not use the default version of OpenOCD provided by homebrew, this is not compatible with releases V0.2.4 and newer. You can either install from source using homebrew (brew install open-ocd --HEAD) or the packages from https://github.com/gnu-mcu-eclipse/openocd/releases will also work. Some linux versions and Windows may also need a more up-to-date version of OpenOCD from the gnu-mcu-eclipse releases.
    • Texane's st-util GDB server - Only supports ST-Link Debug Probes (https://github.com/texane/stlink)
    • ST-LINK GDB server - This server is packaged with the STM32CubeIDE which must be installed. The location of the STM32CubeIDE and related tools is automatically resolved but also can be overridden using configuration settings (armToolchainPath, stm32cubeprogrammer and serverpath).
    • pyOCD GDB Server - GDB server that supports the CMSIS-DAP debugger on a number of mbed boards (https://github.com/mbedmicro/pyOCD)
    • Black Magic Probe

Usage

See https://github.com/Marus/cortex-debug/wiki for usage information. This needs some help from the community

Acknowledgments

Parts of this extension are based upon Jan Jurzitza's (WebFreak) code-debug extension (https://github.com/WebFreak001/code-debug). His project provided an excellent base for GDB MI parsing and interaction.

csse3010-debug's People

Contributors

marus avatar haneefdm avatar john5f35 avatar gentoo90 avatar bbenoist avatar webfreak001 avatar dependabot[bot] avatar manuargue avatar ndk4 avatar kadw avatar hwmaier avatar mrmaxmeier avatar ryanplusplus avatar sebastian-bartkowiak avatar kohada-t2 avatar diegoherranz avatar rookwood101 avatar alexclewontin avatar pavel-kur avatar ssimek avatar nxyd avatar nicbytes avatar nzsmartie avatar resonantworks avatar marsrock4 avatar markushx avatar mryndzionek avatar montaguk avatar kylewlacy avatar pelrun avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.