diff --git a/ports/nrf/drivers/secureboot/secureboot_main.c b/ports/nrf/drivers/secureboot/secureboot_main.c index 748e080a24..8362852cd7 100644 --- a/ports/nrf/drivers/secureboot/secureboot_main.c +++ b/ports/nrf/drivers/secureboot/secureboot_main.c @@ -176,7 +176,7 @@ static void jump_to_non_secure(void) } } -int main(void) { +void _start(void) { configure_flash(); configure_ram(); configure_peripherals(); @@ -186,9 +186,4 @@ int main(void) { while (1) { ; } - - return 0; } - -void _start(void) {main();} - diff --git a/ports/nrf/main.c b/ports/nrf/main.c index 0e5a26c487..9809ba0e23 100644 --- a/ports/nrf/main.c +++ b/ports/nrf/main.c @@ -107,7 +107,7 @@ void do_str(const char *src, mp_parse_input_kind_t input_kind) { extern uint32_t _heap_start; extern uint32_t _heap_end; -int main(int argc, char **argv) { +void NORETURN _start(void) { // Hook for a board to run code at start up, for example check if a // bootloader should be entered instead of the main application. MICROPY_BOARD_STARTUP(); @@ -299,8 +299,6 @@ soft_reset: #endif goto soft_reset; - - return 0; } #if !MICROPY_VFS @@ -369,7 +367,3 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line); __fatal_error("Assertion failed"); } - -void _start(void) { - main(0, NULL); -}