Quality RTOS & Embedded Software

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




Loading

Problems with compiling *pxPortInitialiseStac

Posted by SimFr on September 15, 2008
Hi!

I am trying to adjust the PPC405 port of FreeRTOS to the Freescale MPC5516 microcontroller. I am using Codewarrior IDE v5.9.0.

When trying to build the project, there always occours a "declaration syntax error" because of:


portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )


It seems that it is not possible because of the "portSTACK_TYPE", which is defined in portmacro.h as unsigned long.



In the function "pxPortInitialiseStack" itself I use someting like:

*pxTopOfStack = 0xDEADBEEF;
pxTopOfStack--;

This also causes an error message "undefined identifier".

I am not very familiar with the CodeWarrior IDE. Can somebody help me?

Thank you very much in advance.

Regards, simfr

RE: Problems with compiling *pxPortInitialiseStac

Posted by Dave on September 15, 2008
Each port has its own portmacro.h file and each project must ensure it includes the correct one. Look in source/include/portable.h to see how this is done. Normally you define a macro in the project to tell the compiler which portmacro.h to include. The alternative is to simply ensure the correct include path is within your project.

RE: Problems with compiling *pxPortInitialise

Posted by SimFr on September 15, 2008
Thank you very much for your answer, Dave.

But unforunately this is not the problem. If I substitute portSTACK_TYPE with "unsigned long" in port.c to let the function look as follows, the same error messages "declaration syntax error" and "undefined identifier ´pxTopOfStack´ occur:

unsigned long *pxPortInitialiseStack( unsigned long *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )

portmacro.h is already included, too.

Am I not allowed to use the type unsigned long in this case?

Regards, simfr

RE: Problems with compiling *pxPortInitialise

Posted by Dave on September 15, 2008
unsigned long should not be a problem. Are you certain it is not pdTASK_CODE that is causing the problem?

RE: Problems with compiling *pxPortInitialise

Posted by SimFr on September 15, 2008
I already checked that.

pdTASK_CODE is defined in projdefs.h as:

typedef void (*pdTASK_CODE)( void * );

Even if I include projdefs.h explicitly in port.c the same error messages occur. Is this the right typedef for pdTASK_CODE?

RE: Problems with compiling *pxPortInitialise

Posted by Dave on September 15, 2008
Nothing wrong with the definition. You have a strange one. Could you be editing the wrong file?

RE: Problems with compiling *pxPortInitialise

Posted by SimFr on September 15, 2008
Thats nearly impossible. I made a project build in the codewarrior IDE and edit the files straight from there. Do you think it´s more problem of the FreeRTOS port or the compiler?


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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