Expressions and memory: evaluate, memory, symbol
An expression value of the required type; SRAM/Flash bytes at a symbol address.
since 0.3.0
Methods
API 3 changes (0.5.0)
No await. memory is limited to SRAM and Flash windows; a short response is an error.
Recommended
Snapshot an object as bytes before an intervention and restore it afterwards.
version = t.evaluate("app_info.version", as_type=str)
state = t.symbol("app_state")
snapshot = t.memory(state["address"], state["size"])
t.call("app_step", timeout=2) # changes app_state
t.memory(state["address"], snapshot)Avoid
memory at a peripheral address is refused: it is not an MMIO bypass. A function call inside evaluate is refused — use call.
t.memory(0x40020014, 4) # peripheral window: refused
t.evaluate("crc32(buffer, 16)") # hidden call: refusedThe fragments show refused or discouraged patterns, not a working recipe.
Fragments for a scenario body; firmware symbols are illustrative.