boot_serial: Add unaligned stack buffer writing
Fixes a bug when writing to devices which have memory alignment
requirements with data being using directly from a zcbor-response
whereby the alignment of the buffer data does not meet the
requirements of the flash driver.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
diff --git a/boot/zephyr/Kconfig.serial_recovery b/boot/zephyr/Kconfig.serial_recovery
index 225c430..336b085 100644
--- a/boot/zephyr/Kconfig.serial_recovery
+++ b/boot/zephyr/Kconfig.serial_recovery
@@ -51,6 +51,14 @@
Note that 0 is default upload target when no explicit
selection is done.
+config BOOT_SERIAL_UNALIGNED_BUFFER_SIZE
+ int "Stack buffer for unaligned memory writes"
+ default 64
+ help
+ Specifies the stack usage for a buffer which is used for unaligned
+ memory access when data is written to a device with memory alignment
+ requirements. Set to 0 to disable.
+
config BOOT_MAX_LINE_INPUT_LEN
int "Maximum input line length"
default 512