# Updating example made with FreeRTOS V7.1.0 on LPC1343

**URL:** <https://forums.freertos.org/t/updating-example-made-with-freertos-v7-1-0-on-lpc1343/10245>\
**Category:** NXP\
**Created:** [July 14, 2020, 6:32am UTC](https://forums.freertos.org/t/updating-example-made-with-freertos-v7-1-0-on-lpc1343/10245 "2020-07-14T06:32:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![superaga](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/superaga/32/443_2.png) [@superaga](https://forums.freertos.org/u/superaga)\
**Post date:** [July 14, 2020, 6:32am UTC](https://forums.freertos.org/t/updating-example-made-with-freertos-v7-1-0-on-lpc1343/10245/1 "2020-07-14T06:32:45Z")

</div>

Hi folks,

In the [LPCOpen bundle for the LPC1343](https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc13xx:LPCOPEN-SOFTWARE-FOR-LPC13XX) (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_

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/1X/99074bd46f34258bfb6927ffbfd8b1e838a75a93.png)

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](https://www.freertos.org/FreeRTOS_Support_Forum_Archive/October_2014/freertos_FreeRTOS_V812_portmacro.h_missing_binary_operator_before_token_long_bffa0f71j.html) changing the configMAX\_PRIORITIES definition from:

```
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 8 )

```

to:

`#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](https://www.freertos.org/Stacks-and-stack-overflow-checking.html). Any idea?

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

Many thanks!  
AGA

[FreeRTOSConfig.h](https://forums.freertos.org/uploads/short-url/iPSEXlbiTzooqHhi1hlcNP19Yds.h) (7.0 KB)

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [July 14, 2020, 9:42am UTC](https://forums.freertos.org/t/updating-example-made-with-freertos-v7-1-0-on-lpc1343/10245/2 "2020-07-14T09:42:03Z")

</div>

FreeRTOS docs [Stack Usage and Stack Overflow Checking](https://www.freertos.org/Stacks-and-stack-overflow-checking.html) 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.

---

<div class="post-metadata">

**Author:** ![superaga](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/superaga/32/443_2.png) [@superaga](https://forums.freertos.org/u/superaga)\
**Post date:** [July 14, 2020, 12:21pm UTC](https://forums.freertos.org/t/updating-example-made-with-freertos-v7-1-0-on-lpc1343/10245/3 "2020-07-14T12:21:08Z")

</div>

Hi Hartmut,

my bad! 🤦‍♂️That’s absolutely correct… I’m a little rusty. 🙄  
Yes, that solved the issue.

Thanks! 🙏  
AGA
