Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists