-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from intercreate/example/serial-dfu
feat: add serial transport line_length (default 128) and line_bufs (d…
- Loading branch information
Showing
38 changed files
with
46,626 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ source = | |
smpclient/ | ||
|
||
[report] | ||
fail_under = 86.0 | ||
fail_under = 85.0 | ||
show_missing = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# More RAM | ||
CONFIG_MAIN_STACK_SIZE=20480 | ||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=20480 | ||
|
||
# Enable flash operations | ||
CONFIG_FLASH=y | ||
CONFIG_NORDIC_QSPI_NOR=n | ||
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 | ||
|
||
# This must be increased to accommodate the bigger images. | ||
CONFIG_BOOT_MAX_IMG_SECTORS=256 | ||
|
||
# Should be default for Nordic, set anyway | ||
CONFIG_BOOT_PREFER_SWAP_MOVE=y | ||
|
||
# Disable console (you could reenable it on a different UART interface) | ||
CONFIG_CONSOLE=n | ||
|
||
# Flash footprint savings | ||
CONFIG_ASSERT=n | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_LOG=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_STDOUT_CONSOLE=n | ||
CONFIG_PRINTK=n | ||
CONFIG_EARLY_CONSOLE=n | ||
CONFIG_SIZE_OPTIMIZATIONS=y | ||
|
||
# Bigger MCUBoot partition to fit USB stack, SMP, crypto, etc... | ||
# better to use DTS (or pm_static.yaml) | ||
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10800 | ||
|
||
# Enable SMP USB CDC ACM DFU | ||
CONFIG_MCUBOOT_SERIAL=y | ||
CONFIG_BOOT_MGMT_ECHO=y | ||
CONFIG_BOOT_SERIAL_IMG_GRP_HASH=y | ||
CONFIG_BOOT_SERIAL_IMG_GRP_IMAGE_STATE=y | ||
CONFIG_BOOT_SERIAL_CDC_ACM=y | ||
|
||
# Allow upload to the primary slot | ||
CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y | ||
|
||
# Fast USB CDC ACM | ||
# CONFIG_BOOT_MAX_LINE_INPUT_LEN=4096 | ||
# CONFIG_BOOT_LINE_BUFS=2 | ||
# CONFIG_BOOT_SERIAL_MAX_RECEIVE_SIZE=8192 | ||
|
||
# Enable USB | ||
CONFIG_USB_DEVICE_STACK=y | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_LINE_CTRL=y | ||
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n | ||
|
||
# Serial Recovery | ||
CONFIG_BOOT_SERIAL_NO_APPLICATION=y | ||
|
||
# Enter DFU mode on every boot, with timeout | ||
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y | ||
# USB must enumerate! | ||
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=2000 | ||
|
||
# PID 0x000C to make it easy for us to find device in MCUBoot | ||
CONFIG_USB_DEVICE_PID=0x000C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/ { | ||
chosen { | ||
zephyr,uart-mcumgr = &cdc_acm_uart0; | ||
}; | ||
}; | ||
|
||
&zephyr_udc0 { | ||
cdc_acm_uart0: cdc_acm_uart0 { | ||
compatible = "zephyr,cdc-acm-uart"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_USB_DEVICE_PID=0x000A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_USB_DEVICE_PID=0x000B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# 9.13 KB/s (using defaults) | ||
# CONFIG_UART_MCUMGR_RX_BUF_SIZE=128 | ||
# CONFIG_UART_MCUMGR_RX_BUF_COUNT=2 | ||
# CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# ~31.61 KB/s | ||
CONFIG_UART_MCUMGR_RX_BUF_SIZE=1024 | ||
CONFIG_UART_MCUMGR_RX_BUF_COUNT=1 | ||
CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# ~45.50 KB/s | ||
CONFIG_UART_MCUMGR_RX_BUF_SIZE=512 | ||
CONFIG_UART_MCUMGR_RX_BUF_COUNT=8 | ||
CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=4096 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# ~51.19 KB/s | ||
CONFIG_UART_MCUMGR_RX_BUF_SIZE=8192 | ||
CONFIG_UART_MCUMGR_RX_BUF_COUNT=1 | ||
CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=8192 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Oops, something went wrong.