Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Undefined Symbol deping on static/dynamic memory use

Posted by tobisf on June 5, 2018

Hi,

I'm trying to set up my first project with FreeRTOS. I want to run it on a STM32L0, for the first tests a NUCLEO-L011K4 using Keil ┬ÁVision 5.

I included the FreeRTOS by adding FreeRTOS/source, FreeRTOS/soruce/include and FreeRTOS/source/portable/RVDS/ARM_CM0 directorys to the include path and the files to the project. I took the FreeTROSConfig.h from an generated project.

First I got an error because the SysTickHandler was redefined by FreeRTOS. To solve this, I just removed the auto generated SysTickHandler from my application.

Now I get undefined symbol errors from FreeRTOS, depending on the configuration of static/dynamic memory allocation (I want everything statically allocated):

configSUPPORTSTATICALLOCATION 1 vApplicationGetIdleTaskMemory (reffered from task.o) vApplicationGetTimerTaskMemory (reffered from timers.o)

configSUPPORTDYNAMICALLOCATION 1 pvPortMalloc (reffered from eventgroups.o) vPortFree (reffered from eventgroups.o)

Do I have to define the functions by myself?


Undefined Symbol deping on static/dynamic memory use

Posted by rtel on June 5, 2018

configSUPPORTSTATICALLOCATION 1 vApplicationGetIdleTaskMemory (reffered from task.o) vApplicationGetTimerTaskMemory (reffered from timers.o)

In this case you need to supply these functions to provide static memory to the tasks created by the kernel. Grep the FreeRTOS/Demo directory to find examples. See the following link for more information: https://www.freertos.org/a00110.html#configSUPPORTSTATICALLOCATION

configSUPPORTDYNAMICALLOCATION 1 pvPortMalloc (reffered from eventgroups.o) vPortFree (reffered from eventgroups.o)

In this case you need to provide the memory allocation functions. This is not needed if configSUPPORTDYNAMICALLOCATION is 0. https://www.freertos.org/a00111.html


Undefined Symbol deping on static/dynamic memory use

Posted by tobisf on June 6, 2018

Thanks, I wasn't aware that I need to supply these function by myself. I copied them from a WIN32 example. But when I want to use dynamic allocation, then I have to implement the portMalloc and portFree functions myself? So basicly they would just be wrapers for the normal malloc and free functions.


Undefined Symbol deping on static/dynamic memory use

Posted by rtel on June 6, 2018

No - please see the links I included in my last post.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo & Nuvoton Cortex-M23 demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Mediatek

Renesas

RISC-V

SiFIve RISC-V

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner