micropython-rocky icon indicating copy to clipboard operation
micropython-rocky copied to clipboard

cant't make project

Open AlexYzhov opened this issue 6 years ago • 4 comments

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

    }

}

}`

AlexYzhov avatar Jul 14 '18 03:07 AlexYzhov

use gcc? Keil project has no problem with compiling.

ianhom avatar Jul 15 '18 10:07 ianhom

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

AlexYzhov avatar Jul 16 '18 05:07 AlexYzhov

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.

RockySong avatar Jul 26 '18 02:07 RockySong

Modified some files, can now be compiled with gcc. But the board is not around, not tested yet

sdew avatar Aug 17 '18 10:08 sdew