To port FreeRTOS to dsPIC30F DSP

beverlin wrote on Sunday, November 22, 2009:

Hello,  I am new to this FreeRTOS and the chip, seeking help for porting this RTOS to the target chip. Appreciate for any help: sample code, step by step porting approach, ….

davedoors wrote on Sunday, November 22, 2009:

http://www.freertos.org/portpic24_dspic.html

beverlin wrote on Monday, November 23, 2009:

Thanks davedoors.

Have following erros when to do futher porting:

Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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 -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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 -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
Executing: “C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe” -mcpu=30F4011 -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\dsPIC_MPLAB" -I"…\…\…\Demo\dsPIC_MPLAB" -I"…\…\…\…\Demo\dsPIC_MPLAB" -I".\FileSystem" -I"…\Common\include" -I"…\…\Common\include" -D__DEBUG -fno-omit-frame-pointer -g -Wall -DMPLAB_DSPIC_PORT -O2 -fno-schedule-insns -fno-schedule-insns2
ParTest.c: In function ‘vParTestInitialise’:
ParTest.c:74: error: ‘CNPU2BITS’ has no member named ‘CN22PUE’
ParTest.c:75: error: ‘CNPU2BITS’ has no member named ‘CN23PUE’
ParTest.c:76: error: ‘TRISA’ undeclared (first use in this function)
ParTest.c:76: error: (Each undeclared identifier is reported only once
ParTest.c:76: error: for each function it appears in.)
ParTest.c:77: error: ‘PORTA’ undeclared (first use in this function)
ParTest.c: In function ‘vParTestSetLED’:
ParTest.c:95: error: ‘PORTA’ undeclared (first use in this function)
ParTest.c: In function ‘vParTestToggleLED’:
ParTest.c:124: error: ‘PORTA’ undeclared (first use in this function)
Halting build on first failure as requested.

Due to tight schedule, appreciate for any existing porting code, drivers ( UART, SPI, Timer, etc) for dsPIC30F4011(with  MPLAB C30).