VexRiscv icon indicating copy to clipboard operation
VexRiscv copied to clipboard

Porting FREERTOS to VexRiscv

Open nerdylye opened this issue 1 year ago • 5 comments

Hi @Dolu1990,

I found this blog https://hackmd.io/@4a740UnwQE6K9pc5tNlJpg/H1olFPOCD#Reference-list on how to run FREERTOS on VexRiscv as the current repo does not have any information regarding this. I followed his steps but I'm still getting the pc missmatch error, do you happen to know why?

Image

The ultimate goal is to run FREERTOS on MuraxSOC/BrieySOC.

Thank you!

nerdylye avatar Apr 21 '25 06:04 nerdylye

Probably the VexRiscv config you are using has some CSR disabled that freertos needs ? checl what is at the REF PC=xxxx instruction in the assembly.

Dolu1990 avatar Apr 23 '25 18:04 Dolu1990

Thanks for the swift reply @Dolu1990 , i found the problem.

One question: Since the regression test loads the HEX files of each test in /src/test/cpp/regression/main.cpp. May I know how the HEX files of each test is generated and where can I access the source codes to generate the HEX file for the tests? Because for MuraxSoc, there is an external repo https://github.com/SpinalHDL/VexRiscvSocSoftware to generate the HEX files for the test using riscv32-unknown-elf-gcc tools, I was wondering if there is the same thing for the tests ran on VexRiscv CPU core...

nerdylye avatar Apr 24 '25 08:04 nerdylye

May I know how the HEX files of each test is generated and where can I access the source codes to generate the HEX file for the tests?

It was a mess, very long time ago.

Probably some modifications done in https://github.com/Dolu1990/FreeRTOS-RISCV Very outdated stuff.

Dolu1990 avatar Apr 25 '25 06:04 Dolu1990

I managed to compile the Dhrystone files from VexRiscvSocSoftware and ran on MuraxSoC, it was working. But when I tried to run the same Dhrystone HEX file on just the VexRiscv (smallestnocsr) config with this command make clean run IBUS=SIMPLE DBUS=SIMPLE CSR=no MMU=no DEBUG_PLUGIN=no MUL=no DIV=no DHRYSTONE=yes, it has this PC mismatch error. Is it because of the the dhrystone source files for MuraxSoC is not compatible with VexRiscv smallestnocsr core?

Image

nerdylye avatar Apr 28 '25 05:04 nerdylye

Right, Murax software isn't compatible with the SoC less testbench.

Dolu1990 avatar May 01 '25 09:05 Dolu1990