slinky - Slight rearrangement of loader init. This change does not fix any observable issue. It is only made to reinforce the preferred control flow for the split image setup. The loader should jump into the app at the very end of main(), where the OS would normally get started.
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/22d87831 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/22d87831 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/22d87831 Branch: refs/heads/develop Commit: 22d878310c2e97dc7a7998767974e0fcdddef54b Parents: 6aa1112 Author: Christopher Collins <[email protected]> Authored: Mon Jan 16 12:23:26 2017 -0800 Committer: Christopher Collins <[email protected]> Committed: Mon Jan 16 14:21:46 2017 -0800 ---------------------------------------------------------------------- apps/slinky/src/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/22d87831/apps/slinky/src/main.c ---------------------------------------------------------------------- diff --git a/apps/slinky/src/main.c b/apps/slinky/src/main.c index 8fbb5e7..9007fdd 100755 --- a/apps/slinky/src/main.c +++ b/apps/slinky/src/main.c @@ -303,6 +303,11 @@ main(int argc, char **argv) log_reboot(hal_reset_cause()); + init_tasks(); + + /* If this app is acting as the loader in a split image setup, jump into + * the second stage application instead of starting the OS. + */ #if MYNEWT_VAL(SPLIT_LOADER) { void *entry; @@ -313,8 +318,6 @@ main(int argc, char **argv) } #endif - init_tasks(); - os_start(); /* os start should never return. If it does, this should be an error */
