As mentioned in the previous post, the AEMB code has to be updated. The AEMB Demo code needs to be able to run on the latest FreeRTOS V8.0.1. There are a lot of changes since V7.1.1. and these changes need to be implemented on AEMB as well.

First of all, FreeRTOS V8.X.X have change the names assigned to typedefs within the core FreeRTOS code. This can be referred from http://www.freertos.org/upgrading-to-FreeRTOS-V8.html#typedefs. AEMB will need to change the relevant names to accommodate these changes. These changes are done in files: FreeRTOSConfig.h, port.c, port.h and portmacro.h.

portTickType changed to TickType_t

portBASE_TYPE changed to BaseType_t

nsigned portBASE_TYPE changed to UBaseType_t

pdTASK_CODE changed to TaskFunction_t

portTICK_RATE_MS changed to portTICK_PERIOD_MS

portSTACK_TYPE changed to StackType_t

Referring to MicroBlaze portmacro.h, the following typedefs were added for V8.0.1. This is done as well for AEMB portmacro.h.

typedef portSTACK_TYPE StackType_t;
typedef long BaseType_t;
typedef unsigned long UBaseType_t;

Since FreeRTOS V7.5.0, vTaskIncrementTick() is now called xTaskIncrementTick() and returns a values. This can be referred from http://www.freertos.org/FreeRTOS_Support_Forum_Archive/October_2013/freertos_vTaskIncrementTick_changed_to_xTaskIncrementTick_2dcb1205j.html. A context switch should only be performed if xTaskIncrementTick() returns pdTRUE. This change is implemented on AEMB in port.c.

In main.cc,xTaskCreate no longer use const signed char * for task name, instead uses only const char* for task name.


When all these changes are completed, the old AEMB Demo code and new AEMB Demo code are both compiled in each respective FreeRTOS version. The output is a .vmem file which will be run in the AEMB simulator.

The simulation outputs are:
v7.1.1
v8.0.1

Both the old and new codes are working. Hence, AEMB is now fully updated to the latest V8.0.1.