nrf: Fix _start() build issue with CMSIS 5.9.0.

The `_start` function prototype is now declared as no-return, so `main()`
can't return.

To fix this, `main()` is replaced with `_start`.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
iabdalkader 2024-01-19 11:12:13 +02:00 committed by Damien George
parent beb4459784
commit e111793d8d
2 changed files with 2 additions and 13 deletions

View File

@ -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();}

View File

@ -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);
}