Hey, so I was attempting to build the hello world example for RISC-V target and then use Spike to run the subsequent binary file.
These are the commands I used to do this:
make -f tensorflow/lite/micro/tools/make/Makefile third_party_downloads
Change the target from riscv32_mcu to mcu_riscv in /tensorflow/lite/micro/tools/make/mcu_riscv_makefile.inc and in /tensorflow/lite/micro/examples/hello_world/riscv32_mcu/Makefile.inc
Moved the flags -fnothreadsafe-statics and -fno-use-cxa-atexit from PLATFORM FLAGS to CXX FLAGS in /tensorflow/lite/micro/tools/make/targets/mcu_riscv_makefile.inc
Changed -c11 to -gnu11 under CCFLAGS in /tensorflow/lite/micro/tools/make/Makefile
Changed the functions fmin and fmax to min and max respectively in /tensorflow/lite/kernels/internal/min.h and /tensorflow/lite/kernels/internal/max.h.
Run the command make -f tensorflow/lite/micro/tools/make/Makefile TARGET=mcu_riscv TARGET_ARCH=riscv32_mcu hello_world_bin
Run the binary using Spike: spike --isa=rv32imafdc pk tensorflow/lite/micro/tools/make/gen/mcu_riscv_riscv32_mcu_default/bin/hello_world
I've checked that the binary generated is indeed ELF 32-bit RISC-V executable, but still on running the final command, it shows
bbl loader couldn't open ELF program: tensorflow/lite/micro/tools/make/gen/mcu_riscv_riscv32_mcu_default/bin/hello_world!
Can anyone let me know what I'm doing wrong in this case??
Hey, so I was attempting to build the hello world example for RISC-V target and then use Spike to run the subsequent binary file. These are the commands I used to do this:
-fnothreadsafe-statics
and-fno-use-cxa-atexit
from PLATFORM FLAGS to CXX FLAGS in /tensorflow/lite/micro/tools/make/targets/mcu_riscv_makefile.incmake -f tensorflow/lite/micro/tools/make/Makefile TARGET=mcu_riscv TARGET_ARCH=riscv32_mcu hello_world_bin
spike --isa=rv32imafdc pk tensorflow/lite/micro/tools/make/gen/mcu_riscv_riscv32_mcu_default/bin/hello_world
I've checked that the binary generated is indeed ELF 32-bit RISC-V executable, but still on running the final command, it shows
bbl loader couldn't open ELF program: tensorflow/lite/micro/tools/make/gen/mcu_riscv_riscv32_mcu_default/bin/hello_world!
Can anyone let me know what I'm doing wrong in this case??