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

PIC18 MPLAB port compile failure

Posted by bram on January 21, 2007
I am trying to build the PIC18 MPLAB demo. I am using c18 v3.02 and MPLAB v7.50. These are both the latest versions. I followed the instructions about changing the paths in the .mcp files and the files are accessible from within the projects when I open them.

I get syntax errors when trying to compile queue.c and tasks.c:
C:\FreeRTOS\Source\tasks.c:428:Error: syntax error
C:\FreeRTOS\Source\queue.c:272:Error: syntax error

As far as I can tell both of these involve macro definitions. It seems like the compiler is not correctly interpreting them. Maybe something changed with the compiler?

Has anyone tried to build the demos with the latest versions of the microchip tools?

Which versions are known to work?

RE: PIC18 MPLAB port compile failure

Posted by Nobody/Anonymous on January 21, 2007
Can you post the text on the lines in question as you don't say which version you are using.

Are you building the demo project provided in the download or have you defined your own?

RE: PIC18 MPLAB port compile failure

Posted by bram on January 21, 2007
I am using FreeRTOS v4.1.3. I am attempting to build the provided demo projects.

The line in tasks.c is:

static portTASK_FUNCTION_PROTO( prvIdleTask, pvParameters );

The line in queue.c is:

prvLockQueue( pxQueue );

Thanks.

RE: PIC18 MPLAB port compile failure

Posted by Nobody/Anonymous on January 21, 2007
That is odd then. I was expecting the lines to relate to one of the port macros.

portTASK_FUNCTION_PROTO is defined as:

#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )

for the C18 port. Nothing out of the ordinary that I can see.

Likewise, prvLockQueue():
#define prvLockQueue( pxQueue )\
{\
taskENTER_CRITICAL();\
++( pxQueue->xRxLock );\
++( pxQueue->xTxLock );\
taskEXIT_CRITICAL();\
}

has nothing remotely suspicious, unless its in taskENTER_CRITICA() or taskEXIT_CRITICAL().

These two lines are also unrelated so the problem cannot be the same.

I am using MCC18 V3.02 and have no problem.


RE: PIC18 MPLAB port compile failure

Posted by bram on January 21, 2007
could you post the command line the compiler is using?

RE: PIC18 MPLAB port compile failure

Posted by Paul_Piak on January 22, 2007
Hi,

I got no problems with the 4.1.0 demo, once the source and include paths were fixed.
I did a 'diff' on 4.1.0 vs 4.1.3, but found no differences explaining your problems.

By the way, your compiler dates from February last year and is definitely not the newest, neither is MPLAB. Both should be fine however I think, but why not try an update?.

Paul

RE: PIC18 MPLAB port compile failure

Posted by bram on January 22, 2007
Here is all the info on my installation. If you could take a look at it I would really appreciate it.

The base directory for the FreeRTOS source is c:\FreeRTOS.

Here are the relevant sections of my .mcp file after modification:

[PATH_INFO]
dir_src=
dir_bin=
dir_tmp=
dir_sin=
dir_inc=c:\mcc18\h;c:\freertos\demo\common\include;c:\freertos\source\include;c:\freertos\source\portable\mplab\PIC18F;c:\freertos\demo\PIC18_MPLAB
dir_lib=c:\mcc18\lib
dir_lkr=

[FILE_INFO]
file_000=c:\FreeRTOS\Source\tasks.c
file_001=c:\FreeRTOS\Source\queue.c
file_002=c:\FreeRTOS\Source\list.c
file_003=c:\FreeRTOS\Source\portable\MPLAB\PIC18F\port.c
file_004=c:\FreeRTOS\Demo\Common\Minimal\PollQ.c
file_005=main1.c
file_006=ParTest\ParTest.c
file_007=serial\serial.c
file_008=c:\FreeRTOS\Demo\Common\Minimal\integer.c
file_009=c:\FreeRTOS\Source\portable\MemMang\heap_1.c
file_010=c:\FreeRTOS\Source\portable\MPLAB\PIC18F\portmacro.h
file_011=c:\FreeRTOS\Source\include\task.h
file_012=c:\FreeRTOS\Source\include\list.h
file_013=c:\FreeRTOS\Source\include\portable.h
file_014=c:\FreeRTOS\Source\include\projdefs.h
file_015=c:\FreeRTOS\Source\include\queue.h
file_016=c:\FreeRTOS\Demo\Common\include\integer.h
file_017=c:\FreeRTOS\Demo\Common\include\PollQ.h
file_018=c:\FreeRTOS\Demo\Common\include\serial.h
file_019=FreeRTOSConfig.h
file_020=18f452.lkr
[SUITE_INFO]
suite_guid={5B7D72DD-9861-47BD-9F60-2BE967BF8416}
suite_state=
[TOOL_SETTINGS]
TS{DD2213A8-6310-47B1-8376-9430CDFC013F}=/aINHX8M
TS{BFD27FBA-4A02-4C0E-A5E5-B812F3E7707C}=/m"$(BINDIR_)$(TARGETBASE).map" /aINHX8M /o"$(TARGETBASE).cof"
TS{C2AF05E7-1416-4625-923D-E114DB6E2B96}=-w3 -DMPLAB_PIC18F_PORT -Ls -Opa- -nw 2074 -nw 2066
TS{ADE93A55-C7C7-4D4D-A4BA-59305F7D0391}=
[TOOL_LOC_STAMPS]
tool_loc{96C98149-AA1B-4CF9-B967-FAE79CAB663C}=c:\mcc18\bin\mplink.exe
tool_loc{E56A1C86-9D32-4DF6-8C34-FE0388B1B644}=c:\mcc18\bin\mcc18.exe


As for my Microchip tools not being the latest...I am using the free version so v3.02 is the latest. The upgrades are only available to people who purchased the tool. I read the change logs for the subsequent versions and did not see anything that seemed likely to cause the problem I am having.

Thanks again for the help,
Bram

RE: PIC18 MPLAB port compile failure

Posted by Richard on January 22, 2007
This is my compiler output:

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "tasks.c" -fo="tasks.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "queue.c" -fo="queue.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "list.c" -fo="list.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "port.c" -fo="port.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "serial.c" -fo="serial.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "main3.c" -fo="main3.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "comtest.c" -fo="comtest.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "integer.c" -fo="integer.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.

Executing: "C:\Devtools\Microchip\mcc18\bin\mcc18.exe" -p=18F452 /i"c:\DevTools\mcc18\h" -I"c:\e\dev\freertos\demo\common\include" -I"c:\e\dev\freertos\source\include" -I"c:\e\dev\freertos\source\portable\mplab\PIC18F" -I"c:\e\dev\freertos\demo\PIC18_MPLAB" -I"C:\Devtools\Microchip\MCC18\h" "heap_1.c" -fo="heap_1.o" -DMPLAB_PIC18F_PORT -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.02 (feature limited)
Copyright 1999-2005 Microchip Technology Inc.
This version of MPLAB C18 does not support the extended mode
and will not perform all optimizations. To purchase a full
copy of MPLAB C18, please contact your local distributor or
visit buy.microchip.com.


Regards.

RE: PIC18 MPLAB port compile failure

Posted by bram on January 22, 2007
I just tried it on a workstation running WinXP and it worked fine.

Previously I was trying to use a Win2k3 machine. When MPLAB starts it does say this Win2k3 is an unsupported operating system but I figured that it wouldn't make a difference because they are basically the same. Apparently I was wrong.

Thanks again for the help


[ 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