Free RTOS on E31arty

HI, all:

i have downloaded the freedom-e-sdk with latest version.
and try to build FreeRTOSv9.0.0 in Demo/RISCV_E31Arty_GCC, but run into following error when link:
roger@roger-ubuntu:/data/roger.he/sifive/freedom-e-sdk/software/FreeRTOSv9.0.0/Demo/RISCV_E31Arty_GCC$ make
CC …/…/Source/portable/GCC/RISCV/portasm.S
CC …/…/Source/portable/GCC/RISCV/port.c
…/…/Source/portable/GCC/RISCV/port.c: In function ‘pxPortInitialiseStack’:
…/…/Source/portable/GCC/RISCV/port.c:203:16: warning: unused variable ‘tp’ [-Wunused-variable]
register int *tp asm(“x3”);
^~
CC …/…/Source/croutine.c
CC …/…/Source/list.c
CC …/…/Source/queue.c
CC …/…/Source/tasks.c
CC …/…/Source/timers.c
CC …/…/Source/portable/MemMang/heap_4.c
CC bsp/env/coreplexip-e31-arty/init.c
CC bsp/drivers/plic/plic_driver.c
CC main.c
CC start.S
Linking…
/data/roger.he/sifive/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/8.1.0/…/…/…/…/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a(lib_a-sbrkr.o): In function .L0 ': sbrkr.c:(.text+0x12): undefined reference to_sbrk’
/data/roger.he/sifive/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/8.1.0/…/…/…/…/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a(lib_a-writer.o): In function .L0 ': writer.c:(.text+0x16): undefined reference to_write’
/data/roger.he/sifive/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/8.1.0/…/…/…/…/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a(lib_a-closer.o): In function .L0 ': closer.c:(.text+0x12): undefined reference to_close’
/data/roger.he/sifive/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/8.1.0/…/…/…/…/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a(lib_a-lseekr.o): In function .L0 ': lseekr.c:(.text+0x16): undefined reference to_lseek’
/data/roger.he/sifive/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/8.1.0/…/…/…/…/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a(lib_a-readr.o): In function .L0 ': readr.c:(.text+0x16): undefined reference to_read’
/data/roger.he/sifive/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/8.1.0/…/…/…/…/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a(lib_a-fstatr.o): In function .L0 ': fstatr.c:(.text+0x14): undefined reference to_fstat’
/data/roger.he/sifive/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/8.1.0/…/…/…/…/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a(lib_a-isattyr.o): In function .L0 ': isattyr.c:(.text+0x12): undefined reference to_isatty’
collect2: error: ld returned 1 exit status
Makefile:74: recipe for target ‘RISCV_E31Arty_GCC.elf’ failed
make: *** [RISCV_E31Arty_GCC.elf] Error 1

meanwhile, i also tried to build free rtos with RISCV_HiFive1_GCC, all is ok.
So, Is it a known issue and anyone can help on this?
thanks in advance.

already find out the rootcause.

sync change for init.c in the commit to E31.
commit be72e303f445aa4977135447470b9fecff80b7dd
Author: Drew Barbier dbarbi1@gmail.com
Date: Tue Oct 31 09:52:21 2017 -0500

Move HiFive1 example to new FreeRTOS code

That is removing the line:
puts(“core freq at " STR(CPU_FREQ) " Hz\n”);
link will success!

So, please sync all change to E31 about Free RTOS.

1 Like