Quality RTOS & Embedded Software

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




Loading

Porting PIC33FJ256GP710 to another PIC33Fxxx

Posted by li on March 21, 2008
I want to port the demoproject made for PIC33FJ256GP710 to another PIC33F, say PIC33FJ256GP510.

If I make a "Bulid All" on the original project, there are no errors. MPLAB is V8.02 + C30 newest release.

To port this project to PIC33FJ256GP510, I change this 3 places in the project:

1. In menu "Configure" + "Select" the device PIC33FJ256GP510 i selected.
2. In file FreeRTOSConfig.h edit the include line to be: #include <p33FJ256GP510.h>
3. Remove the original linker script file (p33FJ256GP710.gld) and add new linker script file p33FJ256GP510.gld

Now, if you build the project following message come up:

In file included from ../Demo/dsPIC_MPLAB/FreeRTOSConfig.h:46,
from ./include/FreeRTOS.h:56,
from list.c:92:
c:/programmer/microchip/mplab c30/bin/../support/h/p33FJ256GP710.h:8:2: error: #error "Include file does not match processor setting"
Halting build on first failure as requested.

What is the reason for this?

Thanks in advance for any hint / advices.

RE: Porting PIC33FJ256GP710 to another PIC33Fxxx

Posted by Richard on March 21, 2008
When you attempt to build, take a look at the command line being used (visible in the Output) window. One of the options will be -mcpu= followed by the processor model. Does it say -mcpu=PIC33FJ256GP510?

Regards.

RE: Porting PIC33FJ256GP710 to another PIC33Fxxx

Posted by li on March 21, 2008
Yes, the command line shows the correct processor. Look here:

....

Clean: Done.

Executing: "C:\Programmer\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "main.c" -o"main.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\dsPIC_MPLAB" -I"..\..\..\Demo\dsPIC_MPLAB" -I"..\..\..\..\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -D__DEBUG -g -Wall -DMPLAB_DSPIC_PORT -O2 -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2

Executing: "C:\Programmer\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "list.c" -o"list.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\dsPIC_MPLAB" -I"..\..\..\Demo\dsPIC_MPLAB" -I"..\..\..\..\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -D__DEBUG -g -Wall -DMPLAB_DSPIC_PORT -O2 -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
In file included from ../Demo/dsPIC_MPLAB/FreeRTOSConfig.h:46,
from ./include/FreeRTOS.h:56,
from list.c:92:
c:/programmer/microchip/mplab c30/bin/../support/h/p33FJ256GP710.h:8:2: error: #error "Include file does not match processor setting"
Halting build on first failure as requested.

RE: Porting PIC33FJ256GP710 to another PIC33Fxxx

Posted by Richard on March 21, 2008
You could try replacing the #include within FreeRTOSConfig.h to include "p33fxxxx.h" instead.

Regards.

RE: Porting PIC33FJ256GP710 to another PIC33Fxxx

Posted by li on March 21, 2008
Thanks for this hint, however the result is exact the same :-(

Regards.

RE: Porting PIC33FJ256GP710 to another PIC33Fxxx

Posted by Richard on March 21, 2008
I just tried exactly the steps from your first post, 'cleaned' the project (did you do that?), then did a 'build all'. Here is my output:

Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "main.c" -o"main.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "list.c" -o"list.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "queue.c" -o"queue.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "tasks.c" -o"tasks.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "port.c" -o"port.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "heap_1.c" -o"heap_1.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "BlockQ.c" -o"BlockQ.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "croutine.c" -o"croutine.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "crflash.c" -o"crflash.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "ParTest.c" -o"ParTest.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "blocktim.c" -o"blocktim.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "integer.c" -o"integer.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "comtest.c" -o"comtest.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
Executing: "C:\Devtools\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP510 -x c -c "serial.c" -o"serial.o" -I"." -I".\include" -I"..\include" -I"..\..\include" -I"..\..\..\include" -I"..\..\Source\include" -I"..\..\..\Source\include" -I"..\Demo\PIC24_MPLAB" -I"..\..\..\Demo\PIC24_MPLAB" -I"..\..\..\..\Demo\PIC24_MPLAB" -I".\FileSystem" -I"..\Common\include" -I"..\..\Common\include" -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2
serial.c: In function 'xSerialPortInitMinimal':
serial.c:103: error: 'U2MODEBITS' has no member named 'RXINV'
Halting build on first failure as requested.
BUILD FAILED: Fri Mar 21 16:28:07 2008



So the device does not define 'U2MODEBITS', but I don't get the same error as you.

Regards.

RE: Porting PIC33FJ256GP710 to another PIC33F

Posted by li on March 22, 2008
Yes I tried to clean the project, this did not help either.

Do you also use MPLAB 8.02?

Regards.


RE: Porting PIC33FJ256GP710 to another PIC33F

Posted by li on March 22, 2008
OK, now I finally found out of something.

The path for the original demo project files on my pc is: D:\FreeRTOS\Demo\dsPIC_MPLAB
I copied all the files there to a new folder, say: D:\FreeRTOS\Demo\dsPIC_MPLAB_TEST, and started to work on the project in this folder. This did not work.

Now I just tried to modify the project in the original folder, and here there is no problem. So I guess the problem has something to do with all search and other paths defined in the project. Even, if you just rename the folder to another name and still use the original project for processor PIC33FJ256GP710 it will not work.

So now the problem is isolated to some of the path definitions somewhere.

Regards.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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