Updating example made with FreeRTOS V7.1.0 on LPC1343

Hi folks,

In the LPCOpen bundle for the LPC1343 (latest version) I found the freertos_blinky example, that is based on the V7.1.0.
Since I’ve already been able to make a FreeRTOS project from scratch (on another platform), I tried to make it in MCUXpresso using the latest V10.3.1 as well (I’ll post it as soon as it will work for your convenience) using the original FreeRTOSConfig.h

When I first compiled the project I get an error related to the portBASE_TYPE:

C:\Users\user\Documents\FreeRTOS\FreeRTOS\Source\portable\GCC\ARM_CM3/portmacro.h:53:23: error: missing binary operator before token "long"
 #define portBASE_TYPE long
C:\Users\user\Documents\MCUXpressoIDE_11.1.1_3241\workspace\DemoFreeRTOS\inc/FreeRTOSConfig.h:80:45: note: in expansion of macro 'portBASE_TYPE'
 #define configMAX_PRIORITIES   ( ( unsigned portBASE_TYPE ) 8 )

that I solved thanks to this post changing the configMAX_PRIORITIES definition from:

#define configMAX_PRIORITIES			( ( unsigned portBASE_TYPE ) 8 )


#define configMAX_PRIORITIES ( 8 )

Secondly I had this error:

c:/nxp/mcuxpressoide_11.1.1_3241/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728/tools/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: ./FreeRTOS/source/Source/tasks.o: in function `vTaskSwitchContext':
C:/Users/user/Documents/FreeRTOS/FreeRTOS/Source/tasks.c:3036: undefined reference to `vApplicationStackOverflowHook'

This error is related the taskCHECK_FOR_STACK_OVERFLOW() that is related to the value of the configCHECK_FOR_STACK_OVERFLOW parameter.

I couldn’t build the project using a value other than 0. Any idea?

For completeness I attach the config file, that I suspect to be the cause of the issue.

Many thanks!

FreeRTOSConfig.h (7.0 KB)

FreeRTOS docs Stack Usage and Stack Overflow Checking describe that you have to provide a vApplicationStackOverflowHook function when configuring configCHECK_FOR_STACK_OVERFLOW > 0.
Searching the forum also often helps getting an answer and/or examples.

Hi Hartmut,

my bad! :man_facepalming:That’s absolutely correct… I’m a little rusty. :roll_eyes:
Yes, that solved the issue.

Thanks! :pray: