FreeRTOS WIN32-MSVC demo Visual Studio 2022 — missing file errors

I’m trying to get the FreeRTOS Windows port running in Visual Studio 2022. The idea is to play around with FreeRTOS features.

I grabbed the FreeRTOS zip from GitHub, unzipped it, went into FreeRTOS/Demo/WIN32-MSVC, opened up WIN32.sln, hit build… and boom wall of red errors.

Cannot open source file: '..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\kernelports\FreeRTOS\trcKernelPort.c': No such file or directory
Cannot open source file: '..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\trcSnapshotRecorder.c': No such file or directory
Cannot open source file: '..\..\Source\croutine.c': No such file or directory
Cannot open source file: '..\..\Source\event_groups.c': No such file or directory
Cannot open source file: '..\..\Source\portable\MemMang\heap_5.c': No such file or directory
Cannot open source file: '..\..\Source\stream_buffer.c': No such file or directory
Cannot open source file: '..\..\Source\timers.c': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open source file: '..\..\Source\list.c': No such file or directory
Cannot open source file: '..\..\Source\portable\MSVC-MingW\port.c': No such file or directory
Cannot open source file: '..\..\Source\queue.c': No such file or directory
Cannot open source file: '..\..\Source\tasks.c': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory
Cannot open include file: 'FreeRTOS.h': No such file or directory

Pretty clear the project is looking for files that it just can’t find

Can you check if those files exist on your file system? If yes, please try to shorten the directory hierarchy, possibly by removing FreeRTOS-main and FreeRTOS-main and copying everything to RTOS.

Yes, the files exist on my system. Could you please tell me what the correct folder structure should be so the project can find them? Thanks.

It looks like you downloaded the repo through the git clone UI option (see screenshot below).

Cloning this way does not download the submodules the repo uses. The FreeRTOS-Kernel is one such submodule and provides the content in the FreeRTOS/Source folder. This is why you have missing files - FreeRTOS.h comes from the FreeRTOS-Kernel submodule. I’d recommend either downloading our latest release zip which can be found here or using the Git CLI to checkout these missing submodules.

It is not about the folder structure. Windows has a limit of path length and that sometime causes problem if the path is too deep. That is why I asked to reduce the path hierarchy.

Thanks for pointing that out. I followed your suggestion and downloaded the latest release zip i, and now it builds without any errors. Appreciate the help!

Thank you for taking the time to report back!