Suppose you have following main.c and it works properly

#include <stdio.h>                          // prototype declarations for I/O functions

#include "uart.h"

int main (void)
{
    vUartInit();

    printf ("Hello World\n");

    for (;;); 
}

and you want to make minimalistic FreeRTOS example on your processor.

You will need to do following.

  1. Link following sources to your project
        => FreeRTOS/Source/list.c
        => FreeRTOS/Source/queue.c
        => FreeRTOS/Source/tasks.c
        => FreeRTOS/Source/portable/MemMang/heap_YOUR_HEAP.c
        => FreeRTOS/Source/portable/YOUR_PORT/port.c
        => FreeRTOS/Source/portable/YOUR_PORT/portASM.s
  2. Copy FreeRTOSConfig.h from closest demo example to your include path
  3. Add following directories to you include path
        => FreeRTOS\Source\include
  4. You may need to change Startup.S to the one from closest demo example, if threads are not starting
  5. Modify your main.c to contain:
/* Standard includes */
#include <stdio.h>                          // prototype declarations for I/O functions

/* Driver includes */
#include "uart.h"

/* Scheduler includes */
#include "FreeRTOS.h"
#include "task.h"

void prvTaskA (void* pvParameters)
{		
    (void) pvParameters;                    // Just to stop compiler warnings.
	
    for (;;) {
        vTaskDelay(500);
        printf("Task A\n");
        vTaskDelay(500);
    }
}

void prvTaskB (void* pvParameters)
{
    (void) pvParameters;                    // Just to stop compiler warnings.

    for (;;) {
        printf("Task B\n");
        vTaskDelay(1000);
    }
}

int main (void)
{
    vUartInit();

    xTaskCreate( prvTaskA, ( signed char * ) "TaskA", configMINIMAL_STACK_SIZE, NULL,
        tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );
    xTaskCreate( prvTaskB, ( signed char * ) "TaskB", configMINIMAL_STACK_SIZE, NULL, 
        tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );

    vTaskStartScheduler();

   //should never get here
   printf("ERORR: vTaskStartScheduler returned!");
   for (;;);
}