Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/smpclient/transport/serial/encoded.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ class Auto(NamedTuple):
class BufferSize(NamedTuple):
"""Manually specify the server's decoded reassembly buffer size.

For servers that do not advertise MCUmgr params (e.g. MCUboot serial recovery):
behaves exactly like `Auto` once `buf_size` is known, sending messages up to
`buf_size - 4`. Lower `line_length` only for a server whose per-line input
buffer is smaller than the 128-byte convention.
For a server that does not advertise MCUmgr params, or to override the advertised
size: behaves exactly like `Auto` once `buf_size` is known, sending messages up to
`buf_size - 4`. Lower `line_length` only for a server whose per-line input buffer
is smaller than the 128-byte convention.
"""

buf_size: int
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/smp-server/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
8872b14a4b61e46b32140a2b5b717208db6c4ddf6ab35d3743cc44a252819a89 manifest.json
29176dac9fa963db772f0ff8d7e59103543261c9db0ba27b31d659c499819500 zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial.elf
b17a5dbbd22e00e6e7b081e4e7e0996d8bfb4f87c1de245b96800a6e96b54d32 zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery.hex
5dd5061002766e3aca3c5a3c37143d08bd8ad1be56acc7ada6acaf8d2d7b0a85 zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery.signed.bin
bc5048d9da74bfcff1604a954fe355ef7bf83735ade6fa1bba1174ab37715c47 zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery.hex
7fe9223179f723b5599bb17f93ea3323c0dd17c9c1b034ed9403b72d16c2f9b1 zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery.signed.bin
b17a5dbbd22e00e6e7b081e4e7e0996d8bfb4f87c1de245b96800a6e96b54d32 zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery_buf1024.hex
f08bc569707f95f86eb545426001555c86b2da744fc58d7f9029aa0dbaa4f840 zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery_buf1024.signed.bin
b17a5dbbd22e00e6e7b081e4e7e0996d8bfb4f87c1de245b96800a6e96b54d32 zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery_buf2048.hex
Expand Down Expand Up @@ -41,5 +41,5 @@ c32299e6711d95558df01da315b921f736dc5be2fb8988d2506931892b4f045c zephyr_4.4.0_s
e96f3b40d10418018caa1c3f9776d3bbdd542f5612e3caad3a223bb0b2a24c54 zephyr_4.4.0_smp_server_0eae053d_qemu_cortex_m0_serial.signed.bin
bf5b803bc5b3a108e7c5bfba025a6b923bf39603525b9e980638940dd24dd482 zephyr_4.4.0_smp_server_0eae053d_qemu_cortex_m0_serial_buf256.hex
5cb70b1a4dee7ec367dd298813e40e01f05f62f408025c607880a3f1f8e96fa5 zephyr_4.4.0_smp_server_0eae053d_qemu_cortex_m0_serial_buf512.hex
2149538f5e63f22dec814114f8c4d67d721fd8b8e2957874eaa3b77303297732 zephyr_f33aa2bc4a43_smp_server_c8f44c41_mps2_an385_serial_recovery_raw.hex
eb19b7531adf99dac5d6b52fd2ed56c8113a574e0ddce903e29e09a30af70933 zephyr_f33aa2bc4a43_smp_server_c8f44c41_mps2_an385_serial_recovery_raw.signed.bin
afd094784f98011121b292e2325afc30fd0d342378d9a091f05f0a7b95859f54 zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery_raw.hex
f73694b0eb9feb6e53311a0143be81b0cb5c163a7af29ff7cb6a44fe5c618798 zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery_raw.signed.bin
27 changes: 16 additions & 11 deletions tests/fixtures/smp-server/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@
# committed here become live fixtures — the manifest lists the full release so
# adding one is just `gh release download <tag> --pattern ...`.
#
# Additional pin (one fixture only) — `serial_recovery_raw`:
# tag: c8f44c41 https://github.com/intercreate/smp-server-fixtures/releases/tag/c8f44c41
# commit: c8f44c4179... (smp-server-fixtures); zephyr: main f33aa2bc (post-4.4.0)
# Additional pin — the MCUboot serial-recovery fixtures `serial_recovery` and
# `serial_recovery_raw` (mps2):
# tag: 27c54835 https://github.com/intercreate/smp-server-fixtures/releases/tag/27c54835
# commit: 27c54835b6fab1809b37d29624669234a21257e2 (smp-server-fixtures)
# zephyr: main f33aa2bc (post-4.4.0)
#
# MCUboot's raw (non-console) serial-recovery protocol (BOOT_SERIAL_RAW_PROTOCOL,
# mcu-tools/mcuboot#2755) merged after 4.4.0's MCUboot pin, so this one fixture is
# built from a post-4.4.0 Zephyr `main` commit. Its artifact name carries the
# c8f44c41 release hash and so does not collide with the 0eae053d set. `manifest.json`
# and `SHA256SUMS` are therefore a local merge: the 0eae053d baseline plus this
# fixture's manifest entry + digests (the `manifest.json` digest line was refreshed
# to match the merge). When 0eae053d's Zephyr next includes #2755, re-vendor the whole
# set from a single release and drop this note.
# Two MCUboot recovery features landed after 4.4.0's MCUboot pin: the raw
# (non-console) protocol (BOOT_SERIAL_RAW_PROTOCOL, mcu-tools/mcuboot#2755) and the
# serial-recovery MCUmgr params command (BOOT_MGMT_MCUMGR_PARAMS, mcu-tools/mcuboot#2746,
# intercreate/smp-server-fixtures#10), so both recovery fixtures are built from a
# post-4.4.0 Zephyr `main` commit. Their artifact names carry the 27c54835 release hash
# and so do not collide with the 0eae053d set. `manifest.json` and `SHA256SUMS` are
# therefore a local merge: the 0eae053d baseline with these two recovery entries (+
# digests) swapped in. The `serial_recovery_buf<N>` matrix stays on 0eae053d (it is
# exercised in app mode, where recovery params do not apply). When 0eae053d's Zephyr
# next includes #2755 and #2746, re-vendor the whole set from a single release and drop
# this note.
#
# To bump: re-download the artifacts + SHA256SUMS + manifest.json from a newer
# per-commit release and update the `tag` above.
12 changes: 8 additions & 4 deletions tests/fixtures/smp-server/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"udp_port": null
},
{
"artifact": "zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery.hex",
"artifact": "zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery.hex",
"buf_count": 4,
"buf_size": 384,
"config": "serial_recovery",
Expand All @@ -41,7 +41,9 @@
"ip_family": null,
"line_length_max": 128,
"mcuboot": true,
"qemu_cmd": "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -chardev socket,id=con,host=127.0.0.1,port=<PORT>,server=on,wait=off -serial chardev:con -serial null -monitor none -device loader,file=zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery.hex -device loader,file=zephyr_4.4.0_smp_server_0eae053d_mps2_an385_serial_recovery.signed.bin,addr=0x20050000",
"qemu_cmd": "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -chardev socket,id=con,host=127.0.0.1,port=<PORT>,server=on,wait=off -serial chardev:con -serial null -monitor none -device loader,file=zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery.hex -device loader,file=zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery.signed.bin,addr=0x20050000",
"recovery_buf_count": 1,
"recovery_buf_size": 1024,
"run": null,
"serial_recovery": true,
"target": "mps2_an385",
Expand Down Expand Up @@ -718,7 +720,7 @@
"udp_port": null
},
{
"artifact": "zephyr_f33aa2bc4a43_smp_server_c8f44c41_mps2_an385_serial_recovery_raw.hex",
"artifact": "zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery_raw.hex",
"buf_count": 4,
"buf_size": 384,
"config": "serial_recovery_raw",
Expand All @@ -735,7 +737,9 @@
"ip_family": null,
"line_length_max": 128,
"mcuboot": true,
"qemu_cmd": "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -chardev socket,id=con,host=127.0.0.1,port=<PORT>,server=on,wait=off -serial chardev:con -serial null -monitor none -device loader,file=zephyr_f33aa2bc4a43_smp_server_c8f44c41_mps2_an385_serial_recovery_raw.hex -device loader,file=zephyr_f33aa2bc4a43_smp_server_c8f44c41_mps2_an385_serial_recovery_raw.signed.bin,addr=0x20050000",
"qemu_cmd": "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -chardev socket,id=con,host=127.0.0.1,port=<PORT>,server=on,wait=off -serial chardev:con -serial null -monitor none -device loader,file=zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery_raw.hex -device loader,file=zephyr_f33aa2bc4a43_smp_server_27c54835_mps2_an385_serial_recovery_raw.signed.bin,addr=0x20050000",
"recovery_buf_count": 1,
"recovery_buf_size": 1024,
"run": null,
"serial_recovery": true,
"target": "mps2_an385",
Expand Down
Loading
Loading