PIC demo port, problem with symbols

xintersecty wrote on Saturday, October 17, 2009:

I have been working on porting the example demo application from the Explorer 16 development board to the Explorer 16 starter kit.  So far I have isolated all the needed bits, and changed to the main loop to a simple LET strobe program. I had followed the instructions on the freeRTOS website on ports.

So far so good, but I am having a major problem with the processor symbols.

> Make: The target "C:\Documents and
> Settings\Owner.bclaptop\My
> Documents\ovation\Common\Minimal\crflash.o"
> is up to date. Make: The target
> "C:\Documents and
> Settings\Owner.bclaptop\My
> Documents\ovation\PIC24_MPLAB\ParTest\ParTest.o"
> is out of date. Executing:
> "C:\Microchip Starter Kits\PIC24F
> Starter Kit 1\MPLAB
> C30\bin\pic30-gcc.exe"
> -mcpu=24FJ256GB106 -x c -c   "ParTest.c" -o"ParTest.o" -I"."
> -I".\include" -I"…\include" -I"…\…\include" -I"…\…\…\include" -I"…\Source\include" -I"…\…\Source\include" -I"…\…\…\Source\include" -I"…\PIC24_MPLAB" -I"…\…\PIC24_MPLAB" -I"…\…\…\PIC24_MPLAB" -I"…\…\…\…\PIC24_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -O1 -fno-schedule-insns -fno-schedule-insns2 ParTest.c: In function ‘vParTestInitialise’:
> ParTest.c:65: error: ‘TRISA’
> undeclared (first use in this
> function) ParTest.c:65: error: (Each
> undeclared identifier is reported only
> once ParTest.c:65: error: for each
> function it appears in.) ParTest.c:66:
> error: ‘PORTA’ undeclared (first use
> in this function) ParTest.c: In
> function ‘vParTestSetLED’:
> ParTest.c:82: error: ‘PORTA’
> undeclared (first use in this
> function) ParTest.c: In function
> ‘vParTestToggleLED’: ParTest.c:107:
> error: ‘PORTA’ undeclared (first use
> in this function) Halting build on
> first failure as requested.
> ----------------------------------------------- Debug build of project `C:\Documents
> and Settings\Owner.bclaptop\My
> Documents\ovation\PIC24_MPLAB\RTOSDemo_PIC24.mcp’
> failed. Preprocessor symbol `__DEBUG’
> is defined. Target debug platform is
> platform options are: `__ICD2RAM=1’.
> Fri Oct 16 10:44:35 2009

I changed the linker script from the p24FJ128GA010.gld script to the p24HJ256GP210.gld as the PIC24FJ256GB106 chip is on the starter board.

So here is my problem, ( I am sure it will not be my last problem :slight_smile: ):   I can not figure out how to get the development environment to understand where to find the symbols using the new script.  So this is really an IDE/compiler problem.

Thanks in advance!

xintersecty wrote on Sunday, October 18, 2009:

I figured it out.  The switch in chip went with one with a portA to one without portA it starts with portB.

mikehibbett wrote on Sunday, October 18, 2009:

Yes, that one get’s me every time too!

By the way, did you also change the CPU type in the MPLAB IDE?
(that Configure->Select Device from the main menu )


xintersecty wrote on Monday, October 19, 2009:

I did make the change.  The compiler complains about that one early on.  The big lesson I learned in digging back into PIC is the "upgrade and multi-function" quality really understand the details.

For example the linker script will define the symbols but the linker script represents more processors.  Also The datasheet is misleading because they discuss on the features until you look on the chart showing is there.  So my fix is to pull up the ‘h’ file for the SPECIFIC processor and dig through that before I pick something.