-
Notifications
You must be signed in to change notification settings - Fork 21
mgmt: mcumgr: transport: Move BM UART code out into transport file #395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
You can find the documentation preview for this PR here. |
1a5771d
to
53dae56
Compare
@@ -0,0 +1,66 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need documentation for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to be taken care of by @michalek-no or @nvlsianpu or others in a later PR
Allows including the BM UART transport in other applications and updates the UART MCUmgr sample to use this transport library Signed-off-by: Jamie McCrae <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Left some minor comments.
Is file https://github.com/nordicjm/sdk-nrf-bm/blob/uartmcumgr/samples/mcumgr/ble_mcumgr/mcumgr_handler.ld still used?
static enum mgmt_cb_return os_mgmt_reboot_hook(uint32_t event, enum mgmt_cb_return prev_status, | ||
int32_t *rc, uint16_t *group, bool *abort_more, | ||
void *data, size_t data_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could get rid of this function declaration if moving the os_mgmt_reboot_callback
definition under the function definition. Up to you what you think is the cleanest.
^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp.c | ||
^nrf-bm/subsys/mgmt/mcumgr/util/CMakeLists.txt | ||
^nrf-bm/sysbuild/Kconfig.bm | ||
^nrf-bm/samples/mcumgr/uart_mcumgr/src/smp_uart.c | ||
^nrf-bm/samples/mcumgr/uart_mcumgr/src/uart_mcumgr.c | ||
^nrf-bm/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c | ||
^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp_uart.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could sort these after the path change.
^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp.c | |
^nrf-bm/subsys/mgmt/mcumgr/util/CMakeLists.txt | |
^nrf-bm/sysbuild/Kconfig.bm | |
^nrf-bm/samples/mcumgr/uart_mcumgr/src/smp_uart.c | |
^nrf-bm/samples/mcumgr/uart_mcumgr/src/uart_mcumgr.c | |
^nrf-bm/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c | |
^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp_uart.c | |
^nrf-bm/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c | |
^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp.c | |
^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp_uart.c | |
^nrf-bm/subsys/mgmt/mcumgr/util/CMakeLists.txt | |
^nrf-bm/sysbuild/Kconfig.bm |
CONFIG_SOC_FLASH_NRF_RRAM=y | ||
CONFIG_SOC_FLASH_NRF_RRAM_BM=n | ||
CONFIG_BM_UARTE_CONSOLE=n | ||
CONFIG_PRINTK=n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the Bare Metal boot banner config (default y) selects PRINTK, triggering a build warning when trying to set PRINTK=n. Can disable the Bare Metal boot banner here in addition to PRINTK.
CONFIG_PRINTK=n | |
CONFIG_NCS_BARE_METAL_BOOT_BANNER=n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a changelog entry.
Allows including the BM UART transport in other applications and updates the UART MCUmgr sample to use this transport library