Quality RTOS & Embedded Software

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




Loading

Error with MPLAB 7.52 and C18 3.10

Posted by Nobody/Anonymous on March 19, 2007
In compiling withe Mplab 7.52 and C18 ver 3.10 I get these errors:

Executing: "C:\MCC18\bin\mcc18.exe" -p=18F452 /i"c:\mcc18\h" -I"C:\FreeRTOS\Demo\Common\include" -I"C:\FreeRTOS\Source\include" -I"C:\FreeRTOS\Source\portable\MPLAB\PIC18F" -I"C:\FreeRTOS\Demo\PIC18_MPLAB" "tasks.c" -fo="tasks.o" -k -Oi -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\FreeRTOS\Source\include\portable.h:184:Error: syntax error

here is the offending code:

/*
* Setup the stack of a new task so it is ready to be placed under the
* scheduler control. The registers have to be placed on the stack in
* the order that the port expects to find them.
*/
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );

also:

Executing: "C:\MCC18\bin\mcc18.exe" -p=18F452 /i"c:\mcc18\h" -I"C:\FreeRTOS\Demo\Common\include" -I"C:\FreeRTOS\Source\include" -I"C:\FreeRTOS\Source\portable\MPLAB\PIC18F" -I"C:\FreeRTOS\Demo\PIC18_MPLAB" "heap_1.c" -fo="heap_1.o" -k -Oi -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\FreeRTOS\Source\portable\MemMang\heap_1.c:73:Error [1099] "Invalid portBYTE_ALIGNMENT definition"

#ifndef heapBYTE_ALIGNMENT_MASK
#error "Invalid portBYTE_ALIGNMENT definition"
#endif


did I miss some compile options??

tom lafleur

RE: Error with MPLAB 7.52 and C18 3.10

Posted by Nobody/Anonymous on March 19, 2007
Looks like you are missing the preprocessor definition "MPLAB_PIC18F_PORT". Look in portable.h to see how it is used. This is defined in the demo application project. Have you changed the project settings at all?

RE: Error with MPLAB 7.52 and C18 3.10

Posted by Nobody/Anonymous on March 19, 2007
I built a new project, was unable to import the project with the demo ..

I will look for the files... thanks...

RE: Error with MPLAB 7.52 and C18 3.10

Posted by Nobody/Anonymous on March 20, 2007
I loaded the demo MPLAB files and discovered that there are compile switched and project settings that need to be set... so it now compiles and runs with a few minor warning on type casting...

Thanks for your help
a few like this....
C:\FreeRTOS\Source\list.c:94:Warning [2066] type qualifier mismatch in assignment

C:\FreeRTOS\Demo\PIC18_MPLAB\serial\serial.c:186:Warning [2074] location PRODH specified in the interrupt save list is redundant

RE: Error with MPLAB 7.52 and C18 3.10

Posted by md faisal saban on March 12, 2008
I am facing the same problem.it is as follows:-

Executing: "C:\MCC18\bin\mcc18.exe" -p=18F452 /i"c:\mcc18\h" -I"C:\FreeRTOS\Demo\Common\include" -I"C:\FreeRTOS\Source\include" -I"C:\FreeRTOS\Source\portable\MPLAB\PIC18F" -I"C:\FreeRTOS\Demo\PIC18_MPLAB" "tasks.c" -fo="tasks.o" -k -Oi -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\FreeRTOS\Source\include\portable.h:184:Error: syntax error

here is the offending code:

/*
* Setup the stack of a new task so it is ready to be placed under the
* scheduler control. The registers have to be placed on the stack in
* the order that the port expects to find them.
*/
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );

please help me.How you over come your problem.
thanks in advance

RE: Error with MPLAB 7.52 and C18 3.10

Posted by Dave on March 12, 2008
You must have MPLAB_PIC18F_PORT defined. This should be defined in the MPLAB project. Have you changed the project at all? To be sure you can add the line

#define MPLAB_PIC18F_PORT

to the top of source\include\portable.h. This should fix the problem but does not explain why you would get the problem in the first place if you are using an unmodified demo project file.

RE: Error with MPLAB 7.52 and C18 3.10

Posted by md faisal saban on March 12, 2008
No till now i have'nt changed the project.i choosed the device p18c452.i defined
"#define MPLAB_PIC18F_PORT" in portable.h at the bigening.but it is throwing another errors.I will tell you i am new in rtos so please help me out step by step.
thanks in advance.

RE: Error with MPLAB 7.52 and C18 3.10

Posted by md faisal saban on March 12, 2008
when i defined "#define MPLAB_PIC18F_PORT" in portable.h the all the error throwing as follows:-

Executing: "C:\MCC18\bin\mcc18.exe" -p=18C252 "ParTest\ParTest.c" -fo="ParTest.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
MPLAB C18 v3.16 (demo)
Copyright 1999-2005 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 60
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:60:Error [1105] symbol 'TRISDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:60:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:60:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:61:Error [1105] symbol 'TRISDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:61:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:61:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:62:Error [1105] symbol 'TRISDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:62:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:62:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:63:Error [1105] symbol 'TRISDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:63:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:63:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:66:Error [1105] symbol 'PORTDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:66:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:66:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:67:Error [1105] symbol 'PORTDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:67:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:67:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:68:Error [1105] symbol 'PORTDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:68:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:68:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:69:Error [1105] symbol 'PORTDbits' has not been defined
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:69:Error [1151] struct or union object designator expected
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:69:Error [1101] lvalue required
D:\dev\FreeRTOS\Demo\PIC\ParTest\ParTest.c:73:Error [1105] symbol 'TRISEbits' has not been defined

i know it is very little mistake but please help me out.
thanks

RE: Error with MPLAB 7.52 and C18 3.10

Posted by md faisal saban on March 12, 2008
now that problem is solved.but i m getting one another error.

"Error - section '.udata_portheap.o' can not fit the section. Section '.udata_portheap.o' length=0x00000476
"
how can i over come it.
regards

RE: Error with MPLAB 7.52 and C18 3.10

Posted by Richard on March 12, 2008
It sounds like you have lost all the project settings. I would guess that you opened the project directly rather than opening the workspace. The workspace should have three projects within it. Sometime MPLAB requires you to set an option to permit multiple projects within a workspace.

Anyway - can you confirm that you opened the "Workspace" as per the instructions, not a project.

The error you are getting now is because the linker is using an incorrect linker script. It should be using the one from the FreeRTOS.org directory, not the one from the MPLAB installation directory.

Regards.

RE: Error with MPLAB 7.52 and C18 3.10

Posted by md faisal saban on March 13, 2008
But it generates all the object files and it is successfully converted to hex by using mp2hex command separetlly.what is happening.i am not able to understand.


[ 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