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

Compiling for PIC with C18

Posted by Nobody/Anonymous on December 17, 2004
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:\mcc18\bin\mcc18.exe" -p=18F452 "main1.c" -fo="main1.o"
/i"F:\rtos\Source\include" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
F:\rtos\Source\include\portable.h:95:Error: syntax error
Halting build on first failure as requested.
BUILD FAILED: Fri Dec 17 05:30:40 2004
--------------------------------------------------------


RE: Compiling for PIC with C18

Posted by Richard on December 17, 2004
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:\DEVTOOLS\mcc18\bin\mcc18.exe" -p=18F452 "tasks.c" -fo="tasks.o" /i"D:\DevTools\mcc18\h" /i"e:\dev\freertos\demo\common\include" /i"e:\dev\freertos\source\include" /i"e:\dev\freertos\source\portable\mplab\PIC18F" -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.

RE: Compiling for PIC with C18

Posted by Nobody/Anonymous on December 18, 2004
ok DEMO projects sets all setting wrongly all files many files r missing i find for all 3 like this

RE: Compiling for PIC with C18

Posted by Richard on December 18, 2004
I suggest you download a clean version and try again. Open the workspace that contains the threee projects - all the settings are correct.

RE: Compiling for PIC with C18

Posted by Nobody/Anonymous on December 19, 2004
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:\rtos\source
RTOS_SOURCE_INCLUDE=f:\rtos\source\include
RTOS_SOURCE_PORT=f:\rtos\source\portable\mplab\pic18f
RTOS_DEMO_PIC=F:\RTOS\Demo\PIC
RTOS_DEMO_COMMON_INCLUDE= F:\RTOS\Demo\Common\include
RTOS_MEM=F:\RTOS\Source\portable\MemMang
RTOS_SERIAL=F:\RTOS\Demo\PIC\serial
RTOS_POLLQ= F:\RTOS\Demo\Common\full
RTOS_POLLQ_INCLUDE=F:\RTOS\Demo\Common\include
RTOS_PARA =F:\RTOS\Demo\PIC\ParTest
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:\mcc18\lib f:\rtos\demo\pic\18f452.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


[ 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