Quality RTOS & Embedded Software

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


Loading

FreeRTOS 7.4.1 problem porting on STM32F407V

Posted by Vasyl on May 14, 2013
I’m training porting FreeRTOS 7.4.1 on STM32F407VGT6 in Keil IDE. I’m doing everything as for STM32F103 with some different (changing portable directory on “portable\RVDS\ARM_CM4F\”).
my code :

#include "stm32f4xx.h"
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_gpio.h"

#include "FreeRTOS.h"
#include "task.h"
//#include "queue.h"


#define LED4 GPIO_Pin_12
#define LED5 GPIO_Pin_14

void InitGPIO(void)
{
GPIO_InitTypeDef GPIO_InitStructure;

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD,ENABLE);
GPIO_InitStructure.GPIO_Pin = LED4|LED5;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_Init(GPIOD, &GPIO_InitStructure);
}

void prvSetupHardware( void )
{
InitGPIO();
}

void vTaskLED4(void *pvParameters)
{
for (;;)
{
GPIO_ToggleBits(GPIOD,LED4);
vTaskDelay(500);
}
}

void vTaskLED5(void *pvParameters)
{
for (;;)
{
GPIO_SetBits(GPIOD,LED5);
vTaskDelay(300);
GPIO_ResetBits(GPIOD,LED5);
vTaskDelay(700);
}
}



int main(void)
{
prvSetupHardware();

xTaskCreate(vTaskLED4,(signed char*)"LED4",configMINIMAL_STACK_SIZE,
NULL, tskIDLE_PRIORITY + 1, NULL);

xTaskCreate(vTaskLED4,(signed char*)"LED5",configMINIMAL_STACK_SIZE,
NULL, tskIDLE_PRIORITY + 1, NULL);

vTaskStartScheduler(); // Start the scheduler.

while(1);
}



After compiling project I have seen more error:

Rebuild target ‘STM32F4′
assembling startup_stm32f4xx.s…
compiling system_stm32f4xx.c…
compiling stm32f4xx_rcc.c…
compiling stm32f4xx_gpio.c…
compiling main.c…
compiling croutine.c…
compiling list.c…
compiling queue.c…
compiling tasks.c…
compiling timers.c…
linking…
STM32F4.axf: Error: L6218E: Undefined symbol pvPortMalloc (referred from croutine.o).
STM32F4.axf: Error: L6218E: Undefined symbol ulPortSetInterruptMask (referred from croutine.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortClearInterruptMask (referred from croutine.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortEnterCritical (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortExitCritical (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortFree (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortYield (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol pxPortInitialiseStack (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vApplicationIdleHook (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vApplicationStackOverflowHook (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vApplicationTickHook (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortEndScheduler (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol xPortStartScheduler (referred from tasks.o).
Target not created

How I can fix this?

RE: FreeRTOS 7.4.1 problem porting on STM32F407V

Posted by Richard on May 14, 2013
I would suggest removing croutine.c from your build, unless you are actually using co-routines, which I would have thought unlikely.

“STM32F4.axf: Error: L6218E: Undefined symbol pvPortMalloc (referred from croutine.o).”


pvPortMalloc is implemented in heap_1.c, heap_2.c, heap_3.c and heap_4.c. You need to include one of these in your build, as described in the source files section of the following page: http://www.freertos.org/Creating-a-new-FreeRTOS-project.html

“STM32F4.axf: Error: L6218E: Undefined symbol ulPortSetInterruptMask (referred from croutine.o).”


You are also not building the required portable layer files. I suggest you try following the instructions on the above linked page then come back and post the results.

Regards.


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


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

Latest News

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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