I am attempting to run similar messaging code between both my target and PC in FreeRTOS, using the Windows Port Simulator on my 64bit Windows 10 PC. Does the FreeRTOS Windows simulator have access to the serial/USB ports on my PC?
I think that is what this file is doing https://github.com/aws/amazon-freertos/blob/feature/cellular/vendors/pc/boards/windows/ports/comm_if/comm_if_windows.c but I am not familiar with how it is working - it looks like it may be using a standard Windows thread (one that is not under control of the FreeRTOS kernel) to access a virtual COM port via USB. That is a common technique because FreeRTOS threads (which are also Windows threads but controlled by the FreeRTOS kernel) cannot reliably make Windows system calls. For example, the FreeRTOS+TCP examples that run in the Windows port of FreeRTOS perform all their Ethernet access in a standard Windows thread then use a thread safe circular buffer to pass data to the threads that are under control of FreeRTOS - likewise in reverse - FreeRTOS threads write to a circular buffer to pass data to a standard Windows thread that then performs the actual Ethernet output.