Which demo are you running? (this one? https://www.freertos.org/RTOS-RISC-V-FreedomStudio-IAR-HiFive-RevB.html )
Which version of FreeRTOS are you using?
Where did you get FreeRTOS from - is it the official release from us or from elsewhere?
Which version of Freedom Studio are you using?
Did you change anything?
https://www.freertos.org/RTOS-RISC-V-FreedomStudio-IAR-HiFive-RevB.html ) i use it.
i get this demo from official release
i do not change anything and import the demo in offical way
I just tried building a clean checkout using the same IDE version and didn’t have a problem.
When you import the project into Freedom Studio you have to ensure the ‘copy project into workspace’ checkbox is left unchecked (I think the instruction say this), then the project will link in the correct files and the files will show with a little yellow icon overlay in the project explorer. That overlay doesn’t exist in the screenshot you posted so I suspect you had ‘copy projects into workspace’ checked and now the paths and include paths will be wrong.
thank you for your help,but i confirm that i can not check this checkbox
however ,there are many error.
I just tried on a clean host and it still compiled fine for me, but my command line is very different to yours, looking just at the privilege.c as shown in your last screen shot.
riscv64-unknown-elf-gcc.exe -I"C:\temp\1031\FreeRTOS\FreeRTOS\Source\include" -I"C:\temp\1031\FreeRTOS\FreeRTOS\Demo\Common\include" -I"C:\temp\1031\FreeRTOS\FreeRTOS\Demo\RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio" -I"C:\temp\1031\FreeRTOS\FreeRTOS\Source\portable\GCC\RISC-V" -I"C:\temp\1031\FreeRTOS\FreeRTOS\Source\include" -I"C:\temp\1031\FreeRTOS\FreeRTOS\Demo\RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio\freedom-metal" -I"C:\temp\1031\FreeRTOS\FreeRTOS\Demo\RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio\bsp\install\include" -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -march=rv32imac -mabi=ilp32 -mcmodel=medlow -ffunction-sections -fdata-sections --specs=nano.specs -Wno-unused-parameter -MMD -MP -MF"freedom-metal/src/privilege.d" -MT"freedom-metal/src/privilege.o" -o “freedom-metal/src/privilege.o” “…/freedom-metal/src/privilege.c”
Trying to find what could be the cause of this. Can you please check the cross compiler setting is correct for your Freedom Studio installation as per the attached image. The setting in the image is specific to my installation. I think this information is missing from the instructinos.
The image shows the file it is trying to reference in the #include - if you navigate to that file in the Eclipse (Freedom Studio) project explorer window can you view the file and double click it to open it?
Is bsp/install/include in your project options path - as per the last entry in the image below? That is the path that leads to the root of the metal/machine/platform.h include path - making the whole include path bsp/install/include/metal/machine/platform.h.