Compiling for PIC with C18
I am getting follwing error while compiling
example project for pic18 using c18 compiler
pl help me
-——————————————————-Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:mcc18binmcc18.exe" -p=18F452 "main1.c" -fo="main1.o"
/i"F:rtosSourceinclude" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
F:rtosSourceincludeportable.h:95:Error: syntax error
Halting build on first failure as requested.
BUILD FAILED: Fri Dec 17 05:30:40 2004
-——————————————————-
Compiling for PIC with C18
It looks like your problem is that the definition MPLAB_PIC18F_PORT is not defined. If this is not defined then the correct portmacro.h file will not get included, the type portSTACK_TYPE will not get defined, and you will get the error as per your post.
The demo projects should have this defined already. Below is the sample command line I get when building the demo exactly as downloaded.
Executing: "D:DEVTOOLSmcc18binmcc18.exe" -p=18F452 "tasks.c" -fo="tasks.o" /i"D:DevToolsmcc18h" /i"e:devfreertosdemocommoninclude" /i"e:devfreertossourceinclude" /i"e:devfreertossourceportablemplabPIC18F" -DMPLAB_PIC18F_PORT -Ls -Opa-
Note the -DMPLAB_PIC18F_PORT option.
The paths require changing in the project file unfortunately. Have you changed anything else other than this? With most ports it is important that the compiler switches and definitions are all set up correctly. The demo project files should be used as examples.
Regards.
Compiling for PIC with C18
ok DEMO projects sets all setting wrongly all files many files r missing i find for all 3 like this
Compiling for PIC with C18
I suggest you download a clean version and try again. Open the workspace that contains the threee projects – all the settings are correct.
Compiling for PIC with C18
same is the problem.SO i created makefile and run using nmake in window environment . everything ok
All files r in F: drive
here is the make file
########## Path for uCOS-II core source files #################################
RTOS_SOURCE=f:rtossource
RTOS_SOURCE_INCLUDE=f:rtossourceinclude
RTOS_SOURCE_PORT=f:rtossourceportablemplabpic18f
RTOS_DEMO_PIC=F:RTOSDemoPIC
RTOS_DEMO_COMMON_INCLUDE= F:RTOSDemoCommoninclude
RTOS_MEM=F:RTOSSourceportableMemMang
RTOS_SERIAL=F:RTOSDemoPICserial
RTOS_POLLQ= F:RTOSDemoCommonfull
RTOS_POLLQ_INCLUDE=F:RTOSDemoCommoninclude
RTOS_PARA =F:RTOSDemoPICParTest
all:
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) $(RTOS_SOURCE)tasks.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) $(RTOS_SOURCE)queue.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) $(RTOS_SOURCE)list.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) $(RTOS_SOURCE_PORT)port.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) /I$(RTOS_DEMO_COMMON_INCLUDE) $(RTOS_DEMO_PIC)main1.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) $(RTOS_MEM)heap_1.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) /I$(RTOS_DEMO_COMMON_INCLUDE) $(RTOS_SERIAL)serial.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) /I$(RTOS_POLLQ_INCLUDE) $(RTOS_POLLQ)pollq.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) /I$(RTOS_POLLQ_INCLUDE) $(RTOS_POLLQ)integer.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) /I$(RTOS_POLLQ_INCLUDE) $(RTOS_PARA)partest.c -DMPLAB_PIC18F_PORT -Ls -Opa+
@mcc18 -p=18F452 /I$(RTOS_SOURCE) /I$(RTOS_SOURCE_INCLUDE) /I$(RTOS_SOURCE_PORT) /I$(RTOS_POLLQ_INCLUDE) $(RTOS_POLLQ)print.c -DMPLAB_PIC18F_PORT -Ls -Opa+
mplink /l c:mcc18lib f:rtosdemopic18f452.lkr tasks.o list.o port.o queue.o main1.o heap_1.o serial.o pollq.o integer.o partest.o print.o /o main.cof
erase *.o
M.kathiresan M.SC
SUB DIVISIONAL ENGINEER
MOBILE COMMUNICATION
BSNL
INDIA