Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

First contact with freeRTOS on the LM3S8962

Posted by Daniel Berenguer on June 11, 2009
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.

RE: First contact with freeRTOS on the LM3S89

Posted by MEdwards on June 11, 2009
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.

RE: First contact with freeRTOS on the LM3S8962

Posted by Daniel Berenguer on June 12, 2009
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.

RE: First contact with freeRTOS on the LM3S89

Posted by Richard on June 12, 2009
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.

RE: First contact with freeRTOS on the LM3S8962

Posted by Daniel Berenguer on June 12, 2009
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.

RE: First contact with freeRTOS on the LM3S89

Posted by Richard on June 12, 2009
Set configGENERATE_RUN_TIME_STATS to 0 in FreeRTOSConfig.h

Regards.

RE: First contact with freeRTOS on the LM3S8962

Posted by Daniel Berenguer on June 12, 2009
Thanks!


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists