pyocd_read_symbol
Reads a global variable value by symbol name, combining ELF symbol lookup and memory read to return address, raw bytes, and interpreted value.
Instructions
Read a global variable's value by symbol name. Combines ELF symbol lookup and memory read in one call. Returns address, raw bytes, and interpreted value. For structs/arrays, returns a hex dump.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Symbol/variable name (e.g. 'm_u16RxLen', 'g_stcConfig') | |
| size | No | Override read size in bytes. If omitted, uses ELF symbol size (capped at 256). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |