compile hello_world failed [resolved]



  • either standalone or freertos sdk,

    when i run make, it stop here:

    Scanning dependencies of target bsp
    [ 50%] Building C object SDK/bsp/CMakeFiles/bsp.dir/config/pin_cfg.c.obj
    [ 50%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/dmac.c.obj
    [ 50%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/gpiohs.c.obj
    [ 50%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/i2c.c.obj
    [ 50%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/dvp.c.obj
    [ 54%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/gpio.c.obj
    [ 54%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/aes.c.obj
    [ 56%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/fft.c.obj
    [ 58%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/i2s.c.obj
    [ 60%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/plic.c.obj
    [ 62%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/pwm.c.obj
    [ 64%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/registry.c.obj
    [ 66%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/rtc.c.obj
    [ 68%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/sccb.c.obj
    [ 70%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/sha256.c.obj
    [ 72%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/spi.c.obj
    [ 74%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/timer.c.obj
    [ 76%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/uart.c.obj
    [ 78%] Building C object SDK/bsp/CMakeFiles/bsp.dir/device/wdt.c.obj
    [ 80%] Building C object SDK/bsp/CMakeFiles/bsp.dir/dump.c.obj
    [ 82%] Building C object SDK/bsp/CMakeFiles/bsp.dir/entry_user.c.obj
    [ 84%] Building C object SDK/bsp/CMakeFiles/bsp.dir/except.c.obj
    [ 86%] Building C object SDK/bsp/CMakeFiles/bsp.dir/interrupt.c.obj
    [ 88%] Building C object SDK/bsp/CMakeFiles/bsp.dir/printf.c.obj
    [ 90%] Building C object SDK/bsp/CMakeFiles/bsp.dir/sleep.c.obj
    [ 92%] Building C object SDK/bsp/CMakeFiles/bsp.dir/syscalls.c.obj
    [ 94%] Building C object SDK/bsp/CMakeFiles/bsp.dir/crt.S.obj
    [ 96%] Linking C static library libbsp.a
    [ 96%] Built target bsp
    Scanning dependencies of target hello_world
    [ 98%] Building C object CMakeFiles/hello_world.dir/src/hello_world/main.c.obj
    [100%] Linking C executable hello_world
    collect2: fatal error: cannot find 'ld'
    compilation terminated.
    make[2]: *** [CMakeFiles/hello_world.dir/build.make:88: hello_world] Error 1
    make[1]: *** [CMakeFiles/Makefile2:75: CMakeFiles/hello_world.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2
    

    i use the toolchain from: https://s3.cn-north-1.amazonaws.com.cn/dl.kendryte.com/documents/kendryte-toolchain.tar.gz

    setup evn vars, and ldconfig path done.

    seems toolchain config problem?
    could you help me?



  • OK, i have got the problem,

    and the hello_world.bin is here.

    next, how i use kentool.py to downdown the code to SoC?