implements PLN-0109
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good

This commit is contained in:
2026-06-15 10:47:34 +01:00
parent 117a18ee72
commit 9cf9fa6163
11 changed files with 60 additions and 351 deletions
@@ -1,5 +1,5 @@
use prometeu_drivers::hardware::Hardware;
use prometeu_firmware::{BootTarget, Firmware};
use prometeu_hal::RuntimePlatform;
use prometeu_hal::cartridge_loader::CartridgeLoader;
use prometeu_hal::debugger_protocol::*;
use prometeu_hal::telemetry::{CertificationConfig, TelemetryFrame};
@@ -99,7 +99,7 @@ impl HostDebugger {
/// Main maintenance method called by the HostRunner every iteration.
/// It handles new connections and processes incoming commands.
pub fn check_commands(&mut self, firmware: &mut Firmware, hardware: &mut Hardware) {
pub fn check_commands(&mut self, firmware: &mut Firmware, platform: &mut dyn RuntimePlatform) {
// 1. Accept new client connections.
if let Some(listener) = &self.listener
&& let Ok((stream, _addr)) = listener.accept()
@@ -154,7 +154,7 @@ impl HostDebugger {
continue;
}
if let Ok(cmd) = serde_json::from_str::<DebugCommand>(trimmed) {
self.handle_command(cmd, firmware, hardware);
self.handle_command(cmd, firmware, platform);
}
}
}
@@ -182,7 +182,7 @@ impl HostDebugger {
&mut self,
cmd: DebugCommand,
firmware: &mut Firmware,
hardware: &mut Hardware,
platform: &mut dyn RuntimePlatform,
) {
match cmd {
DebugCommand::Ok | DebugCommand::Start => {
@@ -201,7 +201,7 @@ impl HostDebugger {
DebugCommand::Step => {
// Execute exactly one instruction and keep paused.
firmware.os.vm().set_paused(true);
let _ = firmware.os.vm().debug_step_instruction(&mut firmware.vm, hardware);
let _ = firmware.os.vm().debug_step_instruction(&mut firmware.vm, platform);
}
DebugCommand::StepFrame => {
// Execute until the end of the current logical frame.