This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit f68c3f45226dbcd9ccb4de7518909c88a3f72e80 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Sun Jun 1 14:42:22 2025 +0200 stm32f4/mcu_cli: Register shell module statically Now mcu shell module is register at link time to reduce memory footprint. No change in functionality. Signed-off-by: Jerzy Kasenberg <[email protected]> --- hw/mcu/stm/stm32f4xx/mcu_cli/pkg.yml | 3 +-- hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c | 9 +-------- hw/mcu/stm/stm32f4xx/mcu_cli/syscfg.yml | 4 ---- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/hw/mcu/stm/stm32f4xx/mcu_cli/pkg.yml b/hw/mcu/stm/stm32f4xx/mcu_cli/pkg.yml index cff88acea..baa9d50c5 100644 --- a/hw/mcu/stm/stm32f4xx/mcu_cli/pkg.yml +++ b/hw/mcu/stm/stm32f4xx/mcu_cli/pkg.yml @@ -31,5 +31,4 @@ pkg.deps: pkg.req_apis: - console -pkg.init: - mcu_cli_init: 'MYNEWT_VAL(MCU_CLI_SYSINIT_STAGE)' +pkg.whole_archive: true diff --git a/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c b/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c index cbe28a8f4..ef407c7ef 100644 --- a/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c +++ b/hw/mcu/stm/stm32f4xx/mcu_cli/src/mcu_cli.c @@ -498,13 +498,6 @@ static const struct shell_cmd_help mcu_cli_info_help = { static const struct shell_cmd mcu_cli_commands[] = { SHELL_CMD_EXT("info", mcu_cli_info_cmd, &mcu_cli_info_help), - { }, }; -int -mcu_cli_init(void) -{ - shell_register("mcu", mcu_cli_commands); - - return 0; -} +SHELL_MODULE_WITH_TABLE(mcu, mcu_cli_commands) diff --git a/hw/mcu/stm/stm32f4xx/mcu_cli/syscfg.yml b/hw/mcu/stm/stm32f4xx/mcu_cli/syscfg.yml index d45c50093..9d3c811a8 100644 --- a/hw/mcu/stm/stm32f4xx/mcu_cli/syscfg.yml +++ b/hw/mcu/stm/stm32f4xx/mcu_cli/syscfg.yml @@ -18,7 +18,3 @@ # syscfg.defs: - MCU_CLI_SYSINIT_STAGE: - description: > - Sysinit stage for mcu cli. - value: 501
