please input the serial port (e.g. /dev/ttyUSB0): /dev/ttyUSB0
/dev/ttyUSB0
[0x00] Connected success! [0x01] Download stub success! [0x02] No need to re-download, skip! [0x03] Need to re-download Error: Custom { kind: TimedOut, error: “Timeout” }
thread ‘main’ panicked at sftool/src/main.rs:260:32:
called Result::unwrap()
on an Err
value: Custom { kind: TimedOut, error: “Timeout” }
stack backtrace:
0: 0x5d5a19290882 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hc04c8f544ab24d66
1: 0x5d5a192b4dd3 - core::fmt::write::hfe57b7174b7d8eab
2: 0x5d5a1928dff3 - std::io::Write::write_fmt::h154385efa8565236
3: 0x5d5a192906d2 - std::sys::backtrace::BacktraceLock::print::h0c8f24e22f5873a8
4: 0x5d5a19291602 - std::panicking::default_hook::{{closure}}::hd07d57e6a602c8e4
5: 0x5d5a19291405 - std::panicking::default_hook::h63d12f7d95bd91ed
6: 0x5d5a19291fa2 - std::panicking::rust_panic_with_hook::h33b18b24045abff4
7: 0x5d5a19291d4a - std::panicking::begin_panic_handler::{{closure}}::hf8313cc2fd0126bc
8: 0x5d5a19290d89 - std::sys::backtrace::__rust_end_short_backtrace::h57fe07c8aea5c98a
9: 0x5d5a192919dd - __rustc[95feac21a9532783]::rust_begin_unwind
10: 0x5d5a190798d0 - core::panicking::panic_fmt::hd54fb667be51beea
11: 0x5d5a19079c96 - core::result::unwrap_failed::he8e27e02739cd3d2
12: 0x5d5a1908658c - sftool::main::h26c822b1419d833e
13: 0x5d5a190a61c3 - std::sys::backtrace::__rust_begin_short_backtrace::hd12d55bd4fc996ff
14: 0x5d5a190a35b9 - std::rt::lang_start::{{closure}}::h6d3e0e56167d3dd3
15: 0x5d5a19288890 - std::rt::lang_start_internal::h418648f91f5be3a1
16: 0x5d5a1908ebd5 - main
17: 0x78184f22a1ca - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
18: 0x78184f22a28b - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
19: 0x5d5a1907a02e - _start
20: 0x0 -
2025-06-25T16:07:58.142423Z DEBUG sftool_lib::sifli_debug: Waiting for frame start marker…
2025-06-25T16:07:58.144330Z DEBUG sftool_lib::sifli_debug: Frame start marker found: [7E, 79]
2025-06-25T16:07:58.144342Z DEBUG sftool_lib::sifli_debug: Reading frame header…
2025-06-25T16:07:58.144346Z DEBUG sftool_lib::sifli_debug: Received packet length: 2 bytes
2025-06-25T16:07:58.144349Z DEBUG sftool_lib::sifli_debug: Reading payload data (2 bytes)…
2025-06-25T16:07:58.144352Z INFO sftool_lib::sifli_debug: Received memory write response
2025-06-25T16:07:58.144368Z INFO sftool_lib::sifli_debug: Command: MEMWrite { addr: 0xE000EDF8, data: [0x2005A4E5] }
2025-06-25T16:07:58.147074Z DEBUG sftool_lib::sifli_debug: Waiting for frame start marker…
2025-06-25T16:07:58.148358Z DEBUG sftool_lib::sifli_debug: Frame start marker found: [7E, 79]
2025-06-25T16:07:58.148375Z DEBUG sftool_lib::sifli_debug: Reading frame header…
2025-06-25T16:07:58.148381Z DEBUG sftool_lib::sifli_debug: Received packet length: 2 bytes
2025-06-25T16:07:58.148385Z DEBUG sftool_lib::sifli_debug: Reading payload data (2 bytes)…
2025-06-25T16:07:58.148392Z INFO sftool_lib::sifli_debug: Received memory write response
2025-06-25T16:07:58.148405Z INFO sftool_lib::sifli_debug: Command: MEMWrite { addr: 0xE000EDF4, data: [0x1000F] }
2025-06-25T16:07:58.150605Z DEBUG sftool_lib::sifli_debug: Waiting for frame start marker…
2025-06-25T16:07:58.152651Z DEBUG sftool_lib::sifli_debug: Frame start marker found: [7E, 79]
2025-06-25T16:07:58.152667Z DEBUG sftool_lib::sifli_debug: Reading frame header…
2025-06-25T16:07:58.152671Z DEBUG sftool_lib::sifli_debug: Received packet length: 2 bytes
2025-06-25T16:07:58.152678Z DEBUG sftool_lib::sifli_debug: Reading payload data (2 bytes)…
2025-06-25T16:07:58.152683Z INFO sftool_lib::sifli_debug: Received memory write response
2025-06-25T16:07:58.163287Z INFO sftool_lib::sifli_debug: Command: MEMWrite { addr: 0xE000EDF8, data: [0x200437D8] }
2025-06-25T16:07:58.165896Z DEBUG sftool_lib::sifli_debug: Waiting for frame start marker…
2025-06-25T16:07:58.167750Z DEBUG sftool_lib::sifli_debug: Frame start marker found: [7E, 79]
2025-06-25T16:07:58.167761Z DEBUG sftool_lib::sifli_debug: Reading frame header…
2025-06-25T16:07:58.167765Z DEBUG sftool_lib::sifli_debug: Received packet length: 2 bytes
2025-06-25T16:07:58.167767Z DEBUG sftool_lib::sifli_debug: Reading payload data (2 bytes)…
2025-06-25T16:07:58.167771Z INFO sftool_lib::sifli_debug: Received memory write response
2025-06-25T16:07:58.167781Z INFO sftool_lib::sifli_debug: Command: MEMWrite { addr: 0xE000EDF4, data: [0x1000D] }
2025-06-25T16:07:58.169903Z DEBUG sftool_lib::sifli_debug: Waiting for frame start marker…
2025-06-25T16:07:58.171731Z DEBUG sftool_lib::sifli_debug: Frame start marker found: [7E, 79]
2025-06-25T16:07:58.171740Z DEBUG sftool_lib::sifli_debug: Reading frame header…
2025-06-25T16:07:58.171744Z DEBUG sftool_lib::sifli_debug: Received packet length: 2 bytes
2025-06-25T16:07:58.171746Z DEBUG sftool_lib::sifli_debug: Reading payload data (2 bytes)…
2025-06-25T16:07:58.171749Z INFO sftool_lib::sifli_debug: Received memory write response
2025-06-25T16:07:58.182591Z INFO sftool_lib::sifli_debug: Command: MEMWrite { addr: 0xE000EDF0, data: [0xA05F000D] }
2025-06-25T16:07:58.185187Z DEBUG sftool_lib::sifli_debug: Waiting for frame start marker…
2025-06-25T16:07:58.187197Z DEBUG sftool_lib::sifli_debug: Frame start marker found: [7E, 79]
2025-06-25T16:07:58.187207Z DEBUG sftool_lib::sifli_debug: Reading frame header…
2025-06-25T16:07:58.187210Z DEBUG sftool_lib::sifli_debug: Received packet length: 2 bytes
2025-06-25T16:07:58.187212Z DEBUG sftool_lib::sifli_debug: Reading payload data (2 bytes)…
2025-06-25T16:07:58.187215Z INFO sftool_lib::sifli_debug: Received memory write response
[0x01] ⠠ Download stub… 2025-06-25T16:07:58.197337Z INFO sftool_lib::sifli_debug: Command: MEMWrite { addr: 0xE000EDF0, data: [0xA05F0001] }
2025-06-25T16:07:58.200468Z DEBUG sftool_lib::sifli_debug: Waiting for frame start marker…
2025-06-25T16:07:58.202324Z DEBUG sftool_lib::sifli_debug: Frame start marker found: [7E, 79]
2025-06-25T16:07:58.202335Z DEBUG sftool_lib::sifli_debug: Reading frame header…
2025-06-25T16:07:58.202339Z DEBUG sftool_lib::sifli_debug: Received packet length: 2 bytes
2025-06-25T16:07:58.202342Z DEBUG sftool_lib::sifli_debug: Reading payload data (2 bytes)…
2025-06-25T16:07:58.202345Z INFO sftool_lib::sifli_debug: Received memory write response
[0x01] Download stub success! 2025-06-25T16:07:58.313090Z INFO sftool_lib::sifli_debug: Command: Exit
[0x02] ⠁ Checking whether a re-download is necessary at address 0x12010000… 2025-06-25T16:07:58.456499Z DEBUG sftool_lib::ram_command: command: Verify { address: 302055424, len: 57440, crc: 811831032 }
[0x02] ⠁ Checking whether a re-download is necessary at address 0x12010000… 2025-06-25T16:07:58.468799Z DEBUG sftool_lib::ram_command: Response buffer: “0 0x30638ef8\r\naddr:0x12010000, size:0x1000000 sector:0x1000 page:0x0 id:0x18400b\r\nV: 0x30638ef8 vs 0x30638ef8, TIMR:0xff DCR:0x800000\r\nOK”
[0x02] No need to re-download, skip! [0x03] ⠁ Checking whether a re-download is necessary at address 0x12020000… 2025-06-25T16:07:58.469014Z DEBUG sftool_lib::ram_command: command: Verify { address: 302120960, len: 301284, crc: 3911276137 }
[0x03] ⠁ Checking whether a re-download is necessary at address 0x12020000… 2025-06-25T16:07:58.505429Z DEBUG sftool_lib::ram_command: Response buffer: “4 0xe9215669\r\naddr:0x12020000, size:0x1000000 sector:0x1000 page:0x0 id:0x18400b\r\nV: 0xe9215669 vs 0x2ff9cb6a, TIMR:0xff DCR:0x800000\r\nFail”
[0x03] Need to re-download [0x04] Download at 0x12020000… ---------------------------------- 0 B/s 0.000%2025-06-25T16:07:58.505565Z DEBUG sftool_lib::ram_command: command: WriteAndErase { address: 302120960, len: 301284 }
2025-06-25T16:07:58.512464Z DEBUG sftool_lib::ram_command: Response buffer: “0498e4\r\naddr:0x12020000, size:0x1000000 sector:0x1000 page:0x0 id:0x18400b\r\next_flash -1, g_baseRX_WAIT”
[0x04] Download at Download success!.. =================== 29.70 KiB/s 100.000%[0x05] ⠁ Verifying data… 2025-06-25T16:08:08.376346Z DEBUG sftool_lib::ram_command: command: Verify { address: 302120960, len: 301284, crc: 3911276137 }
[0x05] ⠁ Verifying data… 2025-06-25T16:08:08.427136Z DEBUG sftool_lib::ram_command: Response buffer: “4 0xe9215669\r\naddr:0x12020000, size:0x1000000 sector:0x1000 page:0x0 id:0x18400b\r\nV: 0xe9215669 vs 0xe9215669, TIMR:0xff DCR:0x800000\r\nOK”
[0x05] Verify success! [0x06] ⠁ Checking whether a re-download is necessary at address 0x12000000… 2025-06-25T16:08:08.427390Z DEBUG sftool_lib::ram_command: command: Verify { address: 301989888, len: 11288, crc: 305364500 }
[0x06] ⠁ Checking whether a re-download is necessary at address 0x12000000… 2025-06-25T16:08:08.435218Z DEBUG sftool_lib::ram_command: Response buffer: “8 0x12337e14\r\naddr:0x12000000, size:0x1000000 sector:0x1000 page:0x0 id:0x18400b\r\nV: 0x12337e14 vs 0x782a07fc, TIMR:0xff DCR:0x80\r\nFail”
[0x06] Need to re-download [0x07] Download at 0x12000000… ---------------------------------- 0 B/s 0.000%2025-06-25T16:08:08.435312Z DEBUG sftool_lib::ram_command: command: WriteAndErase { address: 301989888, len: 11288 }
2025-06-25T16:08:13.447491Z DEBUG sftool_lib::ram_command: Response buffer: “1000000 sector:0x1000 page:0x0 iext_flash -1, g_base_addr 0x0, g”
Error: Custom { kind: TimedOut, error: “Timeout” }
2025-06-25T16:08:13.447565Z DEBUG sftool_lib::ram_command: command: SoftReset
2025-06-25T16:08:18.469521Z DEBUG sftool_lib::ram_command: Response buffer: “”
thread ‘main’ panicked at sftool/src/main.rs:260:32:
called Result::unwrap()
on an Err
value: Custom { kind: TimedOut, error: “Timeout” }
stack backtrace:
0: 0x59cc162c9882 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hc04c8f544ab24d66
1: 0x59cc162eddd3 - core::fmt::write::hfe57b7174b7d8eab
2: 0x59cc162c6ff3 - std::io::Write::write_fmt::h154385efa8565236
3: 0x59cc162c96d2 - std::sys::backtrace::BacktraceLock::print::h0c8f24e22f5873a8
4: 0x59cc162ca602 - std::panicking::default_hook::{{closure}}::hd07d57e6a602c8e4
5: 0x59cc162ca405 - std::panicking::default_hook::h63d12f7d95bd91ed
6: 0x59cc162cafa2 - std::panicking::rust_panic_with_hook::h33b18b24045abff4
7: 0x59cc162cad4a - std::panicking::begin_panic_handler::{{closure}}::hf8313cc2fd0126bc
8: 0x59cc162c9d89 - std::sys::backtrace::__rust_end_short_backtrace::h57fe07c8aea5c98a
9: 0x59cc162ca9dd - __rustc[95feac21a9532783]::rust_begin_unwind
10: 0x59cc160b28d0 - core::panicking::panic_fmt::hd54fb667be51beea
11: 0x59cc160b2c96 - core::result::unwrap_failed::he8e27e02739cd3d2
12: 0x59cc160bf58c - sftool::main::h26c822b1419d833e
13: 0x59cc160df1c3 - std::sys::backtrace::__rust_begin_short_backtrace::hd12d55bd4fc996ff
14: 0x59cc160dc5b9 - std::rt::lang_start::{{closure}}::h6d3e0e56167d3dd3
15: 0x59cc162c1890 - std::rt::lang_start_internal::h418648f91f5be3a1
16: 0x59cc160c7bd5 - main
17: 0x7f04ade2a1ca - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
18: 0x7f04ade2a28b - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
19: 0x59cc160b302e - _start
20: 0x0 -
根据日志行为看起来似乎是sftool没有收到足够的数据。不过目前暂时没有其它使用ubuntu系统的人反馈问题,复现比较麻烦,一旦可以稳定复现之后就会修复
另外可以重点检查下CH340的驱动,看看是否是最新版