Multiple windows port project problem


I work with Kernel 11.0.0 and TCP 4.0.0 Windows port. I have created 2 different projects. These projects are working independently in the same computer. Project 1 includes basic tasks but project 2 does not have any task in the application level it just has tasks that come from FreeRTOS such as idle task. When I run these projects at the same time, project 1ā€™s tasks are blocked and does not work. When I stopped the code in the project 2, project 1ā€™s tasks work correctly but when I continue the code in project 2, tasks do not work.
How can I solve this problem?


What are those tasks doing?

What is the purpose of this project?

How do you determine that the tasks are blocked? Can you share console logs?

Some basic queue operations. One task sends data to queue, other tasks receive from queue

Normally, this project also has tasks but I comment out these tasks because they does not work. It has only main function that includes vTaskStartScheduler().

When I stopped the code in Project 2, Project 1ā€™s tasks work correctly but when code continues, tasks do not work.

Are you running these two projects simultaneously on the same Windows host? The Windows simulator (not really a simulator, but that name stuck :wink: ties all the Windows threads that run FreeRTOS tasks to the same core and runs them at the highest possible priority. That fully loads one core and Iā€™m not sure what would happen if you did that from two FreeRTOS applications simultaneously.

If that is what you are doing, then you could try building both applications with a different core affinity - i.e. build one with the threads tied to core 1 and the other with the threads tied to core 2 (which requires a manual code change between builds) to see if that fixes the issue.


Also, other possibility is that you are stuck in TCP initialization if you are trying to assign same IP to both the projects. That is why I was asking logs. Can you break project 1 in the debugger and see what it is doing when it appears stuck? Also, is it possible for you to share projects that I can use to repro the problem?

Yes I am working on the same windows host.

I changed the affinity value in the SetThreadAffinityMask() function and it solved my problem. Thank you for this solution.
Also, thank you for helping @aggarg

Great! Thank you for reporting back.