Skip to content

Float decoder not being called when using RTTConfig #1196

@tyouard

Description

@tyouard

I have set up the 'rttConfig' with a decoder which should output float values into the RTT terminal in VS Code

my launch.json enables RTT like this:

 "rttConfig": {
          "enabled": true,
          "address": "auto",
          "decoders": [{"type": "binary", "port": 0, "label": "RTT0", "encoding": "float"}]
      },

However, the RTT terminal in VS Code is only decoding the values as unsigned instead of float:

Image

For example, in that output the hex value 0x0000003f should decode to float value 0.5, but instead it is decoding to 1056964608

Reproduction:

  1. Target has SEGGER RTT enabled and is sending raw float32 values to channel 0.
  2. launch.json configured to display a single RTT channel 0. type=binary. encoding=float
  3. Click Run and Debug in VS Code. Launch.
  4. Open RTT terminal in VS Code. You can see the values being read over RTT.
  5. Values are not being formatted as floats, but as unsigned.

Environment:

  • Cortex-Debug Version 1.12.1
  • OS: Linux Ubuntu 24.04.4 LTS
  • GDB Version: gdb-multiarch (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
  • Compiler Toolchain Package: gcc-arm-none-eabi Version: 15:13.2.rel1-2

Launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "launch app",
"cwd": "${workspaceFolder}",
"executable": "${workspaceFolder}/application/XXX.elf",
"runToEntryPoint": "main",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "XMC4400-512",
"interface": "swd",
"gdbPath": "gdb-multiarch",
"armToolchainPath": "/usr/bin",
"svdFile": "${workspaceFolder}/.vscode/XMC4400.svd",
"rttConfig": {
"enabled": true,
"address": "auto",
"decoders": [{"type": "binary", "port": 0, "label": "RTT0", "encoding": "float"}]
},
"breakAfterReset": true,
"showDevDebugOutput": "raw"
},
]
}

`

Debug console:

debug_console_output.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions