-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Currently teleprobe is mostly used as a remote CI tool, where one continuously flashes same devices with different firmwares - ie static devices and dynamic firmware.
Another scenario for teleprobe would be series testing/flashing of devices together with certain data-logging and calibration tests where one wants to save some device-specific information into database: ie chip-specific information like serial numbers and calibration results and also include data from companion chips (flashes, RTCs etc.).
I have a minimal draft PoC implemented in #20:
Demo:
INFO teleprobe::run > run_from_ram: true
INFO teleprobe::run > flashing program...
INFO teleprobe::run > flashing done!
INFO device > 0.000000 Hello World!
INFO device > 0.100128 slept for 100 ms
INFO device > 0.100433 old: _TELEPROBE_INFO_VAR1: ptr = 0x20001732, val = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
INFO device > 0.101745 new: _TELEPROBE_INFO_VAR1: ptr = 0x20001732, val = [119, 48, 48, 116, 119, 48, 48, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
INFO device > 0.103210 Test OK
INFO teleprobe::run > Found: _TELEPROBE_INFO_VAR1 -> w00tw00t
From firmware side the changes are currently minimal:
- Define a
static mutarray and make sure it's not demangled and kept in firmware:
#[used]
#[no_mangle]
static mut _TELEPROBE_INFO_VAR1: [u8; 64] = [0; 64];- Populate this array with data:
async fn main(..) {
unsafe {
let data = b"w00tw00t";
_TELEPROBE_INFO_VAR1[..data.len()].copy_from_slice(data);
// info!("_TELEPROBE_INFO_VAR1: ptr = {:?}, val = {:?} ", &mut _TELEPROBE_INFO_VAR1 as * mut _, _TELEPROBE_INFO_VAR1);
}
}Some ideas that I have:
Symbol autodiscovery instead of harcoded list - use.teleprobe.exportssection and some macro magic from Rust side to populate the section with a list of exported variables (and ideally their addresses). (I tried to implement something, but my rust- and ld-foo isn't strong enough).- Client side vs server side handling - there's already some section parsing happening in the client side, so we should create a list of "required" symbols and pass this info to server.
- Support for other data types than byte arrays (via symbol demangling?).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels