dsPIC30f4013 with FreeRTOS

Hello, i am trying to get one simple project in FreeRTOS with a dsP30f4013 and when i build it i get this Output: Debug build of project D:TESISPROYECTO MICROProject1dsP30v_1.mcp' started. Language tool versions: pic30-as.exe v3.31, pic30-gcc.exe v3.31, pic30-ld.exe v3.31, pic30-ar.exe v3.31 Preprocessor symbol__DEBUG’ is defined.

Sat May 03 20:31:13 2014

Make: The target “D:TESISPROYECTO MICROProject1croutine.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1eventgroups.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1list.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1queue.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1tasks.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1timers.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1port.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1portasmdsPIC.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1main.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1heap1.o” is up to date. Make: The target “D:TESISPROYECTO MICROProject1dsP30v1.cof” is out of date. Executing: “C:Program Files (x86)MicrochipMPLAB C30binpic30-gcc.exe” -mcpu=30F4013 “croutine.o” “eventgroups.o” “list.o” “queue.o” “tasks.o” “timers.o” “port.o” “portasmdsPIC.o” “main.o” “heap1.o” -o”dsP30v1.cof” -Wl,-L”C:Program Files (x86)MicrochipMPLAB C30lib”,-L”C:Program Files (x86)MicrochipMPLAB C30libdsPIC30F”,–script=”p30F4013.gld”,–defsym=MPLAB_BUILD=1,–defsym=MPLABDEBUG=1,-Map=”dsP30v1.map”,–report-mem Program Memory [Origin = 0x100, Length = 0x7efe] section address length (PC units) length (bytes) (dec) ——- ——- —————– ——————– .text 0x100 0xa6 0xf9 (249) .const 0x1a6 0x26 0x39 (57) .text 0x1cc 0x17f8 0x23f4 (9204) .dinit 0x19c4 0x40 0x60 (96) .text 0x1a04 0xa 0xf (15)
                 Total program memory used (bytes):         0x2595  (9621) 19%
Data Memory [Origin = 0x800, Length = 0x800] section address alignment gaps total length (dec) ——- ——- ————– ——————- .nbss 0x800 0 0x47a (1146) .ndata 0xc7a 0 0x22 (34)
                    Total data memory used (bytes):          0x49c  (1180) 57%
Dynamic Memory Usage region address maximum length (dec) —— ——- ——————— heap 0 0 (0) stack 0xc9c 0x364 (868)
                    Maximum dynamic memory (bytes):          0x364  (868)
**tasks.o(.text+0x7e4): In function prvIdleTask': D:TESISPROYECTO MICROFreeRTOSSourcetasks.c:2603: undefined reference tovApplicationIdleHook’ tasks.o(.text+0xd8): In function xTaskGenericCreate': D:TESISPROYECTO MICROFreeRTOSSourcetasks.c:676: undefined reference tovPortYield’ tasks.o(.text+0xda):D:TESISPROYECTO MICROFreeRTOSSourcetasks.c: undefined reference to vPortYield' tasks.o(.text+0x150): In functionvTaskDelayUntil’: D:TESISPROYECTO MICROFreeRTOSSourcetasks.c:860: undefined reference to vPortYield' tasks.o(.text+0x152):D:TESISPROYECTO MICROFreeRTOSSourcetasks.c: undefined reference tovPortYield’ tasks.o(.text+0x184): In function vTaskDelay': D:TESISPROYECTO MICROFreeRTOSSourcetasks.c:926: undefined reference tovPortYield’ tasks.o(.text+0x186):D:TESISPROYECTO MICROFreeRTOSSourcetasks.c: more undefined references to `vPortYield’ follow

Link step failed.**

Debug build of project D:TESISPROYECTO MICROProject1dsP30v_1.mcp' failed. Language tool versions: pic30-as.exe v3.31, pic30-gcc.exe v3.31, pic30-ld.exe v3.31, pic30-ar.exe v3.31 Preprocessor symbol__DEBUG’ is defined.

Sat May 03 20:31:14 2014

BUILD FAILED HOW CAN I GET THESE ERRORS GONE? THANK you very much

dsPIC30f4013 with FreeRTOS

undefined reference tovApplicationIdleHook’
If you have configUSEIDLEHOOK set to 1 in FreeRTOSConfig.h then you must provide an application callback function called vApplicationIdleHook(). Either provide the implementation of the function or set configUSEIDLEHOOK to 0: http://www.freertos.org/a00016.html
undefined reference to vPortYield’
vPortYield is defined in portasmDSPic.S, which you are building, but your device is not a dsPIC device so the preprocessor directives prevent the function outputting any code. You should be building portasmPIC24.S instead. Regards.

dsPIC30f4013 with FreeRTOS

You should be building portasm_PIC24.S instead.
Sorry – my mistake – ignore that last comment, rereading your post I see you are indeed using a dsPIC. In which case the most likely cause is that the pre-processor is preventing the vPortYield() function from being included. Does your project define one of the following:

#if defined( __dsPIC30F__ ) || defined( __dsPIC33F__ )
Regards.

dsPIC30f4013 with FreeRTOS

Hello i fixed the problem with vApplicationIdleHook(). Thanks. Now i need to know where should this line go, in wich file?:
#if defined( __dsPIC30F__ ) || defined( __dsPIC33F__ )

dsPIC30f4013 with FreeRTOS

here it is at port.c
 #endif /* __HAS_EDS__ */
 #endif /* MPLAB_PIC24_PORT */

 #if defined( __dsPIC30F__ ) || defined( __dsPIC33F__ )

 #define portRESTORE_CONTEXT()
So, what should i do regarding vPortYield issue? thanks in advance

dsPIC30f4013 with FreeRTOS

Now i need to know where should this line go, in wich file?:
You don’t need to add that line anywhere, it is already in portASM_pic24.S file, therefore if neither dsPIC30F or dsPIC33F is defined then vPortYield() will be excluded from the build, and I suspect this is what your problem is. Those definitions come from the Microchip provided architecture header files, you should not need to defined them manually as setting the correct compiler options will result in the correct header files being included, which in turn will result in the correct chip specific pre-processor macros being defined. Regards.

dsPIC30f4013 with FreeRTOS

ok, i understand but im using a dspic30f4013 and i still getting build failed. as shown in the original post: tasks.o(.text+0xd8): In function xTaskGenericCreate': D:TESISPROYECTO MICROFreeRTOSSourcetasks.c:676: undefined reference tovPortYield’ tasks.o(.text+0xda):D:TESISPROYECTO MICROFreeRTOSSourcetasks.c: undefined reference to vPortYield' tasks.o(.text+0x150): In functionvTaskDelayUntil’: D:TESISPROYECTO MICROFreeRTOSSourcetasks.c:860: undefined reference to vPortYield' tasks.o(.text+0x152):D:TESISPROYECTO MICROFreeRTOSSourcetasks.c: undefined reference tovPortYield’ tasks.o(.text+0x184): In function vTaskDelay': D:TESISPROYECTO MICROFreeRTOSSourcetasks.c:926: undefined reference tovPortYield’ tasks.o(.text+0x186):D:TESISPROYECTO MICROFreeRTOSSourcetasks.c: more undefined references to `vPortYield’ follow Link step failed. building the original demo in a diferent directory also give me the same errors, and i also opened the portasm_dsPIC.s file and its empty wich is very rare, in teh original demo when builded correctly i found assembler inside the .s file. new edit: i just went to the original .s file , opened and copied then pasted into my .s file inside y project folder and it just builded correctly. can anyone understand what happened? why the filed was includes blank?

dsPIC30f4013 with FreeRTOS

do you set dsP30f4013 as device in MPLABX project options