intercreate / smpclient

Simple Management Protocol (SMP) Client for remotely managing MCU firmware
Apache License 2.0
9 stars 6 forks source link

feat: add serial transport line_length (default 128) and line_bufs (d… #25

Closed JPHutchins closed 6 months ago

JPHutchins commented 6 months ago

…efault 2); test Zephyr default USB SMP server example; refactor examples folder layout

This fixes some problems with USB/serial DFU defaults and compatibility. Adds some examples of USB DFU to the main app. Would like to add an example of a faster upload and an example of an MCUBoot single slot upload.

Fixes #22 Fixes #19 (allow user to not send SHA)

JPHutchins commented 6 months ago

@tomaszduda23 I think this might be right. LMK what you think. The serial transport takes optional args for line length, line_bufs, and total size. They get used in a few places to slice the upload chunks.

JPHutchins commented 6 months ago

This is an NRF52840DK example: python -m examples.usb.upgrade nrf52840dk_nrf52840

I didn't make the same image for feather yet.

JPHutchins commented 6 months ago

I've determined that these are the three settings that matter and correspond to line length, line buffers, and "max encoded size", respectively. Examples are in the dutfirmware folder.

CONFIG_UART_MCUMGR_RX_BUF_SIZE=1024
CONFIG_UART_MCUMGR_RX_BUF_COUNT=1
CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=1024