-
Notifications
You must be signed in to change notification settings - Fork 275
Description
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:
For example, in that output the hex value 0x0000003f should decode to float value 0.5, but instead it is decoding to 1056964608
Reproduction:
- Target has SEGGER RTT enabled and is sending raw float32 values to channel 0.
- launch.json configured to display a single RTT channel 0. type=binary. encoding=float
- Click Run and Debug in VS Code. Launch.
- Open RTT terminal in VS Code. You can see the values being read over RTT.
- 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: