After there was an update to FreeRTOS 7.1.1 in May this year, there is now a new version V7.2.0 available. It comes with smaller fixes and enhancements, see the release notes for a comprehensive list of changes.
Major changes are:
- New function
xSemaphoreTakeFromISR()
which allows to get a Semaphore within an interrupt service routine: - The Processor Expert component has added a feature for Kinetis and ARM Cortex M4/M0+ to specify the interrupt priority levels:
See the FreeRTOS documentation on the impact and importance of these settings for the Cortex interrupt subsystem.
- FreeRTOS comes with an added memory allocation scheme for the heap. The memory heap scheme 4 is merging free memory blocks:
- With memory scheme 1, it is not possible any more to use
vPortFree()
, as this scheme does not deallocate memory. Previously it was possible to call the function (doing nothing), but now it will assert:void vPortFree( void *pv ) { /* Memory cannot be freed using this scheme. See heap_2.c, heap_3.c and heap_4.c for alternative implementations, and the memory management pages of http://www.FreeRTOS.org for more information. */ ( void ) pv; /* Force an assert as it is invalid to call this function. */ configASSERT( pv == NULL ); }
This means that the application needs to be aware of the memory scheme used. For this I have added a new macro into the FreeRTOSConfig.h which tells with a number which scheme is used:
/* Memory Scheme Identification */ #define FRTOS_MEMORY_SCHEME 1 /* memory scheme 1 */
As a consequence of the new memory allocation scheme, the FSShell component has been updated too.
The updated CodeWarrior Processor Expert component implementing FreeRTOS is available on the Embedded Component web site. It supports Freescale S08, S12(X), ColdFire V1, ColdFire V2, Kinetis K (ARM Cortex M4) and Kinetis L (ARM Cortex M0+).
Happy FreeRTOSing 🙂
Pingback: Forcing/Checking Kinetis Compiler Optimization Level | MCU on Eclipse
Pingback: FRDM-KL25Z with the Arduino Motor Shield | MCU on Eclipse