# To port FreeRTOS to dsPIC30F DSP   

**URL:** <https://forums.freertos.org/t/to-port-freertos-to-dspic30f-dsp/4956>\
**Category:** Kernel\
**Created:** [November 22, 2009, 3:28am UTC](https://forums.freertos.org/t/to-port-freertos-to-dspic30f-dsp/4956 "2009-11-22T03:28:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 22, 2009, 3:28am UTC](https://forums.freertos.org/t/to-port-freertos-to-dspic30f-dsp/4956/1 "2009-11-22T03:28:22Z")

</div>

**[beverlin](https://sourceforge.net/u/beverlin/)** wrote on [Sunday, November 22, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/dafb18f9/#db25):

Hello,&nbsp; 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, ….

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 22, 2009, 9:23am UTC](https://forums.freertos.org/t/to-port-freertos-to-dspic30f-dsp/4956/2 "2009-11-22T09:23:29Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Sunday, November 22, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/dafb18f9/#4dfb):

[http://www.freertos.org/portpic24\_dspic.html](http://www.freertos.org/portpic24_dspic.html)

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 23, 2009, 4:09am UTC](https://forums.freertos.org/t/to-port-freertos-to-dspic30f-dsp/4956/3 "2009-11-23T04:09:01Z")

</div>

**[beverlin](https://sourceforge.net/u/beverlin/)** wrote on [Monday, November 23, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/dafb18f9/#feeb):

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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp;&nbsp; “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&nbsp; MPLAB C30).
