Sign inSign up

modularmx/arm-none-eabi-gdb

By modularmx

•Updated over 1 year ago

Container with arm debugger for bare metal targets

Image
Internet of things
0

575

modularmx/arm-none-eabi-gdb repository overview

⁠Quick Reference

⁠Supported tags

  • 14.2.0, latest

⁠How to use this image

The image only comes with the gdb debugger just ro run a debugging session with a binary already build with another different tool like the gcc compiler using the image from here⁠. It is not part of the image because the goal was to keep the image as small as possible.

The image is based on Alpine and creates a user named "user", no working directory is defined but it is the responsability of the user to mount the appropiate directory in the user space.

docker run -it --rm -w /home/user/app --mount type=bind,src="$(pwd)",dst=/home/nonroot/app modularmx/arm-none-eabi-gdb:latest

Once the container is running, you can invoque the debugger from the comand line arm-none-eabi-gdb elf-to-debug.elf to compile your code, or just test the debugger is there

arm-none-eabi-gdb --version

The container start with the non root user named nonroot with id of 1000, it is done like this to avoid permission conflicts in you project directory. sudo is also installed in the container with no password set or needed. Even though this is a security breach it will remain like this for now.

⁠Using compose

You can also check our nice tutorial How to run images with compose⁠⁠

services:
  buildm:           # container name been used by the image to connect to make
    image: modularmx/arm-none-eabi-gdb:latest
    working_dir: /home/user/app
    volumes:        # volume mapping
      - type: bind
        source: ./
        target: /home/nonroot/app
    stdin_open: true      # equal to flag -t
    tty: true             # equal to flag -i

⁠Using a devcontainer

In case you like to use devcontianer⁠⁠ in VSCode or some other IDE with docker support, you can use the following configuration:

{
    // Name of the dev container
    "name": "debug", 
    // Dockerfile to use to build the image     
    "dockerComposeFile": "../../compose.yml",
    // indicate the container to run for the working directory
    "service": "debugtools",
    // indicate the working directory inside the container
    "workspaceFolder": "/home/user/app",

    // set some usefull vs code configuration only exsiting in our contianer
    "customizations": {
        "vscode": {
            // Add some extensions
            "extensions": [
                "mcu-debug.debug-tracker-vscode",
                "ms-vscode.cpptools",
                "marus25.cortex-debug"
            ],
            // Set some settings
            "settings": {
                "workbench.colorTheme": "One Dark Pro"
            }
        }
    }
}

Tag summary

Content type

Image

Digest

sha256:8711f387a…

Size

268.1 MB

Last updated

over 1 year ago

docker pull modularmx/arm-none-eabi-gdb