Skip to content

Commit

Permalink
mynewt: Change main to mynewt_main
Browse files Browse the repository at this point in the history
mynewt system for some time now uses mynewt_main() as
starting point called from startup code.
This changes function name main to mynewt_main but
provides backup main function that will be linked if
pre 1.12 mynewt-core is used with mcuboot

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
  • Loading branch information
kasjer authored and utzig committed Apr 14, 2024
1 parent 93c3f78 commit 23d4f12
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion boot/mynewt/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int flash_device_base(uint8_t fd_id, uintptr_t *ret)
}

int
main(void)
mynewt_main(void)
{
struct boot_rsp rsp;
uintptr_t flash_base;
Expand Down Expand Up @@ -265,3 +265,14 @@ main(void)

return 0;
}

/*
* Mynewt startup code jump to mynewt_main()
* This function is here for compatibility with
* pre 1.12. mynewt-core that still wanted main()
*/
int
main(void)
{
mynewt_main();
}

0 comments on commit 23d4f12

Please sign in to comment.