PIC18 MPLAB port compile failure
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:FreeRTOSSourcetasks.c:428:Error: syntax error
C:FreeRTOSSourcequeue.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?
PIC18 MPLAB port compile failure
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?
PIC18 MPLAB port compile failure
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.
PIC18 MPLAB port compile failure
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.
PIC18 MPLAB port compile failure
could you post the command line the compiler is using?
PIC18 MPLAB port compile failure
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
PIC18 MPLAB port compile failure
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:mcc18h;c:freertosdemocommoninclude;c:freertossourceinclude;c:freertossourceportablemplabPIC18F;c:freertosdemoPIC18_MPLAB
dir_lib=c:mcc18lib
dir_lkr=
[FILE_INFO]
file_000=c:FreeRTOSSourcetasks.c
file_001=c:FreeRTOSSourcequeue.c
file_002=c:FreeRTOSSourcelist.c
file_003=c:FreeRTOSSourceportableMPLABPIC18Fport.c
file_004=c:FreeRTOSDemoCommonMinimalPollQ.c
file_005=main1.c
file_006=ParTestParTest.c
file_007=serialserial.c
file_008=c:FreeRTOSDemoCommonMinimalinteger.c
file_009=c:FreeRTOSSourceportableMemMangheap_1.c
file_010=c:FreeRTOSSourceportableMPLABPIC18Fportmacro.h
file_011=c:FreeRTOSSourceincludetask.h
file_012=c:FreeRTOSSourceincludelist.h
file_013=c:FreeRTOSSourceincludeportable.h
file_014=c:FreeRTOSSourceincludeprojdefs.h
file_015=c:FreeRTOSSourceincludequeue.h
file_016=c:FreeRTOSDemoCommonincludeinteger.h
file_017=c:FreeRTOSDemoCommonincludePollQ.h
file_018=c:FreeRTOSDemoCommonincludeserial.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:mcc18binmplink.exe
tool_loc{E56A1C86-9D32-4DF6-8C34-FE0388B1B644}=c:mcc18binmcc18.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
PIC18 MPLAB port compile failure
This is my compiler output:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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:DevtoolsMicrochipmcc18binmcc18.exe" -p=18F452 /i"c:DevToolsmcc18h" -I"c:edevfreertosdemocommoninclude" -I"c:edevfreertossourceinclude" -I"c:edevfreertossourceportablemplabPIC18F" -I"c:edevfreertosdemoPIC18_MPLAB" -I"C:DevtoolsMicrochipMCC18h" "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.
PIC18 MPLAB port compile failure
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