I am trying to adapt the pic24 FreeRTOS demo to another project (still based on the pic24)
I have been able to remove all the demo code successfully except for the crflash.c coroutines.
If i comment out the call to vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES ) in main i get the following run time error:
Target halted due to Software Breakpoint in user code
I have tried removing the crflash.c code and setting configUSE_CO_ROUTINES to 0 etc…but i then get lots of compile/link errors.
My question is what steps do i need to follow in order to completely remove crflash from the project?
With configUSE_CO_ROUTINES set to 0 in FreeRTOSConfig.h, i get the following errors:
make[1]: Leaving directory ‘C:/Para/MicroChip/Explorer16/FreeRTOS_Explorer16/FreeRTOS/Demo/PIC24_MPLAB/RTOS_Explorer16_PIC24.X’
nbproject/Makefile-impl.mk:39: recipe for target ‘.build-impl’ failed
build/default/production/_ext/1472/main.o(.text+0xe6): In function _vApplicationIdleHook': : undefined reference to _vCoRoutineSchedule’
build/default/production/_ext/1472/main.o(.text+0xe8): In function _vApplicationIdleHook': : undefined reference to _vCoRoutineSchedule’
build/default/production/_ext/1163846883/crflash.o(.text+0x1e): In function .L3': : undefined reference to _xQueueCRReceive’
build/default/production/_ext/1163846883/crflash.o(.text+0x20): In function .L3': : undefined reference to _xQueueCRReceive’
build/default/production/_ext/1163846883/crflash.o(.text+0x32): In function .L4': : undefined reference to _xQueueCRReceive’
build/default/production/_ext/1163846883/crflash.o(.text+0x34): In function .L4': : undefined reference to _xQueueCRReceive’
build/default/production/_ext/1163846883/crflash.o(.text+0x7a): In function .L10': : undefined reference to _xQueueCRSend’
build/default/production/_ext/1163846883/crflash.o(.text+0x7c): In function .L10': : undefined reference to _xQueueCRSend’
build/default/production/_ext/1163846883/crflash.o(.text+0x8e): In function .L11': : undefined reference to _xQueueCRSend’
build/default/production/_ext/1163846883/crflash.o(.text+0x90): In function .L11': : undefined reference to _xQueueCRSend’
build/default/production/_ext/1163846883/crflash.o(.text+0xb2): In function .L15': : undefined reference to _vCoRoutineAddToDelayedList’
build/default/production/_ext/1163846883/crflash.o(.text+0xb4): In function .L15': : undefined reference to _vCoRoutineAddToDelayedList’
build/default/production/_ext/1163846883/crflash.o(.text+0xec): In function .L22': : undefined reference to _xCoRoutineCreate’
build/default/production/_ext/1163846883/crflash.o(.text+0xee): In function .L22': : undefined reference to _xCoRoutineCreate’
build/default/production/_ext/1163846883/crflash.o(.text+0xfc): In function .L21': : undefined reference to _xCoRoutineCreate’
build/default/production/_ext/1163846883/crflash.o(.text+0xfe): In function .L21': : undefined reference to _xCoRoutineCreate’
make[2]: *** [dist/default/production/RTOS_Explorer16_PIC24.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
build/default/production/_ext/1472/main.o(.text+0xe6): In function _vApplicationIdleHook’: : undefined reference to_vCoRoutineSchedule’
This error tells you vCoRoutineSchedule() is called in the idle hook. As you set configUSE_CO_ROUTINES to 0 coroutine code will not be built so vCoRoutineSchedule() is undefined. Just remove the call and the error will be fixed.
sorry, my mistake, i did comment out the vCoRoutineSchedule() earlier, so that error goes away…when you say don’t build crflash.c… is it just the case of removing the file from the project?..or do i have to modify the makefile or something?