Running the FreeRTOS Demo in SPIKE

I’m trying to run the FreeRTOS Demo on SPIKE from the following GitHub repo.:
padmaraob/FreeRTOS-RISCV

I’m facing the following error while running the make command:
CC arch/boot.S
arch/boot.S:73:10: fatal error: encoding.h: No such file or directory
73 | #include “encoding.h”
| ^~~~~~~~~~~~
compilation terminated.

Here’s my makefile.inc:

RISCV_XLEN ?= 64
RISCV_LIB ?= elf

TARGET=riscv${RISCV_XLEN}-unknown-${RISCV_LIB}
#-----------------------------------------------------------
GCC = $(TARGET)-gcc
OBJCOPY = $(TARGET)-objcopy
OBJDUMP = $(TARGET)-objdump
AR = $(TARGET)-ar
RANLIB = $(TARGET)-ranlib
CCPATH = /home/abraham/Vincent/RISCV

PROG = riscv-spike
CRT0 = arch/boot.S

FREERTOS_SOURCE_DIR = /home/abraham/Vincent/FREERTOS/Source
CUNIT = …/…/…/cunit

#-----------------------------------------------------------
WARNINGS= -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused

Please let me know what’s wrong here or if there’s some other way to port FreeRTOS on SPIKE.

I’m afraid you are asking about a third party code in a third party git repo - so I’m not familiar with it. All I can say is the obvious, that your linker command line has to add the directory that contains encoding.h to its include path.

You may also try this - although this is also third party and I’ve not got around to running it myself yet: https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS/Demo/RISC-V-spike-htif_GCC