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 8a5f3fc012ee2b0625cc06208aceb85ac4408859 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Sat May 31 19:21:45 2025 +0200 util/coremark: Register commands statically Now coremark shell commands are register at link time to reduce memory footprint. No change in functionality. Signed-off-by: Jerzy Kasenberg <[email protected]> --- util/coremark/pkg.yml | 5 ++--- util/coremark/src/coremark_shell.c | 16 +--------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/util/coremark/pkg.yml b/util/coremark/pkg.yml index fc9e8025d..ceb98ce6f 100644 --- a/util/coremark/pkg.yml +++ b/util/coremark/pkg.yml @@ -33,11 +33,10 @@ pkg.deps: pkg.cflags: +pkg.whole_archive: true + pkg.source_files: - src/core_portme.c pkg.source_files.COREMARK_SHELL: - src/coremark_shell.c - -pkg.init.COREMARK_SHELL: - coremark_shell_init_pkg: $after:shell_init diff --git a/util/coremark/src/coremark_shell.c b/util/coremark/src/coremark_shell.c index 4d5ef7c5f..ccbe3753a 100644 --- a/util/coremark/src/coremark_shell.c +++ b/util/coremark/src/coremark_shell.c @@ -48,18 +48,4 @@ static const struct shell_cmd_help coremark_help = { .usage = NULL, }; -static const struct shell_cmd coremark_shell_cmd_struct = { - .sc_cmd = "coremark", - .sc_cmd_func = coremark_shell_cmd, - .help = &coremark_help, -}; - -void -coremark_shell_init_pkg(void) -{ -#if MYNEWT_VAL(SHELL_COMPAT) - int rc; - rc = shell_cmd_register(&coremark_shell_cmd_struct); - SYSINIT_PANIC_ASSERT(rc == 0); -#endif -} +MAKE_SHELL_CMD(coremark, coremark_shell_cmd, &coremark_help)
