Quality RTOS & Embedded Software

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


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.


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_POLLQ= F:\RTOS\Demo\Common\full

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

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

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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner