Shell - Only create task if so configured. Some packages depend on the shell package without actually requiring the shell task to exist. This might not make the most sense, but for now, add a syscfg option (SHELL_TASK) to allow control over whether the shell task gets created.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/6547b7da Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/6547b7da Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/6547b7da Branch: refs/heads/sterly_refactor Commit: 6547b7dac0bebdd8892f88bf452e309093cac60c Parents: 6c48ecd Author: Christopher Collins <ccoll...@apache.org> Authored: Wed Sep 21 20:09:34 2016 -0700 Committer: Christopher Collins <ccoll...@apache.org> Committed: Wed Sep 21 20:13:48 2016 -0700 ---------------------------------------------------------------------- libs/shell/pkg.yml | 7 +++++-- libs/shell/src/shell.c | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6547b7da/libs/shell/pkg.yml ---------------------------------------------------------------------- diff --git a/libs/shell/pkg.yml b/libs/shell/pkg.yml index 36372ee..5e2cd69 100644 --- a/libs/shell/pkg.yml +++ b/libs/shell/pkg.yml @@ -33,13 +33,16 @@ pkg.init_function: shell_init pkg.init_stage: 5 pkg.syscfg_defs: + SHELL_TASK: + description: 'TBD' + value: 0 SHELL_TASK_PRIO: description: 'TBD' type: 'task_priority' value: 'any' SHELL_STACK_SIZE: description: 'TBD' - value: 512 + value: 512 SHELL_MAX_INPUT_LEN: description: 'TBD' - value: 256 + value: 256 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6547b7da/libs/shell/src/shell.c ---------------------------------------------------------------------- diff --git a/libs/shell/src/shell.c b/libs/shell/src/shell.c index 1cb88de..be9acde 100644 --- a/libs/shell/src/shell.c +++ b/libs/shell/src/shell.c @@ -535,6 +535,10 @@ shell_help_cmd(int argc, char **argv) void shell_init(void) { +#if !MYNEWT_VAL(SHELL_TASK) + return; +#endif + int rc; free(shell_line);