First contact with freeRTOS on the LM3S8962

Hi all, I’ve built the Demo project for the LM3Sxxxx family (web server included) on my LM3S8962 Eval Kit without problems and I’m now trying to remove the unnecessary parts in order to get a bare minimum structure for my projects. I’ve reduced the main routine to this small piece of code: int main( void ) {     prvSetupHardware();     if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) )     {         xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY – 1, NULL );     }     vSetupHighFrequencyTimer();     vTaskStartScheduler();     for( ;; );     return 0; } All tasks except the uIP one have been removed. I can get to compile this new code again and everything seems to work fine. Nevertheless, if I try to remove all the $(DEMO_COMMON_DIR)/* lines from the Makefile SOURCE field, then I get the following errors: startup.o:(.isr_vector+0x2c): undefined reference to `vPortSVCHandler’ startup.o:(.isr_vector+0x38): undefined reference to `xPortPendSVHandler’ startup.o:(.isr_vector+0x3c): undefined reference to `xPortSysTickHandler’ startup.o:(.isr_vector+0x9c): undefined reference to `vT2InterruptHandler’ startup.o:(.isr_vector+0xcc): undefined reference to `vT3InterruptHandler’ startup.o:(.isr_vector+0xe8): undefined reference to `vEMAC_ISR’ main.o: In function `main’: /home/daniel/development/Stellaris/apps/ek-lm3s8962/tets_RTOS/main.c:236: undefined reference to `vuIP_Task’ /home/daniel/development/Stellaris/apps/ek-lm3s8962/tets_RTOS/main.c:236: undefined reference to `vuIP_Task’ /home/daniel/development/Stellaris/apps/ek-lm3s8962/tets_RTOS/main.c:236: undefined reference to `xTaskCreate’ /home/daniel/development/Stellaris/apps/ek-lm3s8962/tets_RTOS/main.c:263: undefined reference to `vTaskStartScheduler’ collect2: ld returned 1 exit status make: *** [RTOSDemo.axf] Error 1 I understood that Demo/Common/Minimal contained only some demo tasks, nothing relevant for the freeRTOS but it’s obvious to me that removing this folder on the Makefile is producing the above errors. I’ve even tried removing the uIP task without success. Which is the correct way of removing the Demo/Common/Minimal stuff from the project? Thank you very much, Daniel.

First contact with freeRTOS on the LM3S8962

If you have removed these lines from the Source= list then you should not get these problems. Have you left any blank lines in the list of files to build? Check that you don’t have any characters after any of the ” characters to. Its easy to have a space or a tab there. You don’t need to keep the high frequency timer in, that generates a 20KHz interrupt for test and demo only.

First contact with freeRTOS on the LM3S8962

Thank you very much for your help. The problem was indeed in a trailing space. Solved! However, I have a new problem of undefined reference for ‘xFirstTimerHandler’ and `xSecondTimerHandler’ in IntQueueTimer.c, caused by the deletion of  "$(DEMO_COMMON_DIR)/IntQueue.c" from the Makefile. I thought that IntQueueTimer.c was neither needed as it simply introduces some timer tests but, before removing this file from the project, I need to change the vector table in startup.c. Which values should I place instead of vT2InterruptHandler, vT3InterruptHandler and Timer0IntHandler? I guess the answer is "IntDefaultHandler" but I’d like to be sure. Thanks again! Daniel.

First contact with freeRTOS on the LM3S8962

The interrupt queue test is different to the high frequency timer test and is split into two – the code that is common to all ports and the interrupt setup/handler code that is specific to a port.  You can remove both files from the build (I think you have done this already). $(DEMO_COMMON_DIR)/IntQueue.c and ./IntQueueTimer.c are the two lines to remove from the makefile. However…as you have found removing these files will remove the implementation of the timer interrupt handlers, so you also need to remove references to these from the vector table which is defined in startup.c, and you are correct you can simply replace them with IntDefaultHandler. Regards.

First contact with freeRTOS on the LM3S8962

Thanks a lot Richard! Now I have a very compact code where to start from. Just a last question: what about timertest.c? I’ve tried removing this file from the makefile too but I get lots of undefined references to ‘ulHighFrequencyTimerTicks’ in tasks.c and tasks.o Daniel.

First contact with freeRTOS on the LM3S8962

Set configGENERATE_RUN_TIME_STATS to 0 in FreeRTOSConfig.h Regards.

First contact with freeRTOS on the LM3S8962

Thanks!