Hello Duke,
the dependencies between an Embedded Wizard Platform Package and an operating system are very low - as a result, the adaptation is very simple and only a few functions have to be adapted.
Your current STM32Fx Platform Package is running bare-metal - this means there is no operating system in use. Therefore we added the TLSF memory manager in order to have a dynamic memory manager. In case you are using FreeRTOS, you can use the dynamic memory manager of the operating system.
Please have a look into the file \PlatformPackage\RTE\ewextrte.c - the following functions have to be adapted to use the corresponding FreeRTOS services:
- EwAlloc() - This function has to reserve a new memory block with the given size aSize. The function has to return a pointer to the memory block or NULL if there is no memory available.
- EwFree() - This function has to free the given memory area.
- EwPrint() - The function EwPrint() prints formatted output to the debug console. This function works similary to the ANSI 'C' printf() function. This function should be implemented in order to output trace messages on the debug console.
- EwGetTicks() - The function EwGetTicks() should return the number of milliseconds that have been elapsed since the system was started. It is limited to the resolution of the system timer. The ticks are used as base for EmWi timers.
- EwGetTime() - This function should return the current time as the number of seconds elapsed since midnight 1.1.1970. If possible the real time clock should be queried in order to determinate the current time. This function is used by the Mosaic class Core::Time and should be adapted to the real time clock or to the system timer. If no real time/date is needed, this function can simply return 0.
That's all. :-)