I create a new project use port.c file which in the Demo project, and run sucessful with STM32 microcontroller. Now I want to write port.c file, how can I get technical support about writting port.c file, or which tutorial can help me. I find nothing in FreeRTOS website, only simply descriptioins. http://www.freertos.org/FreeRTOS-porting-guide.html.
Look in portable.h, the functions that are defined in there need to be implemented in port. There are lots of port.c files you can use as examples.
The first thing you will need to do is work out what makes up the architecture context. List out the registers, and decide how they will be placed on the stack. The architecture will dictate some of that if some registers are pushed on to the stack manually.
Once you have a function that creates the starting stack for a task, create a function that starts the first task. Again there are lots of examples, and how it can be done is dictated by the architecture. Sometimes a simple function call is all that is needed, but sometimes a software trap is needed. The function moves the stack pointer to the start of the stack created for the task, then pops the registers off the stack into the architecture registers until finally it pops the program counter. The program counter will hold the address of the task function, so popping that address into the program counter will result in a jump to the start of the task.
Then you need to work out how you are going to switch between tasks. But one thing at a time.