micropython-rocky
micropython-rocky copied to clipboard
cant't make project
CC main.c
main.c: In function '__fatal_error':
main.c:103:1: error: 'noreturn' function does return [-Werror]
}
^
cc1: all warnings being treated as errors
../../py/mkrules.mk:47: recipe for target 'build-imxrtevk105x/main.o' failed
make: *** [build-imxrtevk105x/main.o] Error 1`
make reports that there's a noreturn function does return in main.c:
`void NORETURN __fatal_error(const char *msg) {
for (volatile uint delay = 0; delay < 10000000; delay++) {}
led_state(1, 1);
led_state(2, 1);
led_state(3, 1);
led_state(4, 1);
mp_hal_stdout_tx_strn("\nFATAL ERROR:\n", 14);
mp_hal_stdout_tx_strn(msg, strlen(msg));
for (uint i = 0;i<1000;i++) {
// led_toggle(((i++) & 3) + 1);
led_toggle(0);
for (volatile uint delay = 0; delay < 10000000; delay++) {
}
if (i >= 16) {
// to conserve power
__WFI();
}
}
}`
use gcc? Keil project has no problem with compiling.
got it, it works fine under Keil environment. But I'm still confused why gcc didn't work, there must be something wrong. Hope somebody check it soon
Sorry for the inconvenience, you may add while(1) {} at the end of the __fatal_error(). GCC Makefile and related porting is not yet completed.
Modified some files, can now be compiled with gcc. But the board is not around, not tested yet