Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed Oct 21, 2023
1 parent 2a5e4cc commit 45f042e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ jobs:
cmd.stdout
cmd.stderr
agp_uart.txt
agp_renode.log
2 changes: 2 additions & 0 deletions agp.robot
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ Device Applies Valid Firmware Update
[Tags] firmware bootloader network device-protocol cli fota
Execute Command usart6 CreateFileBackend @${CURDIR}/agp_uart.txt true
Execute Command logFile @${CURDIR}/agp_renode.log true
Execute Command logLevel -1 file

Start Emulation

Expand Down
1 change: 1 addition & 0 deletions firmware/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions firmware/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ features = [
"socket-icmp",
"socket-udp",
"socket-tcp",
#"log",
#"verbose"
"log",
"verbose"
]

[dependencies.embedded-graphics]
Expand Down
5 changes: 5 additions & 0 deletions firmware/src/tasks/data_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ pub(crate) fn data_manager_task(ctx: data_manager_task::Context, arg: SpawnArg)
}
} else {
warn!("Socket cannot send");
debug!(
"DM socket info, send_cap {}, recv_cap {}",
socket.payload_send_capacity(),
socket.payload_recv_capacity(),
);
socket.close();
}

Expand Down
8 changes: 8 additions & 0 deletions libraries/update-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ impl UpdateManager {
}

pub fn update<D: Device>(&mut self, device: &mut D, socket: &mut TcpSocket) -> Result<()> {
debug!(
"UM socket info, send_queue {} ({}), recv_queue {} ({})",
socket.send_queue(),
socket.send_capacity(),
socket.recv_queue(),
socket.recv_capacity(),
);

self.manage_reboot_schedule(device, socket);

self.manage_socket(socket)?;
Expand Down

0 comments on commit 45f042e

Please sign in to comment.