Quality RTOS & Embedded Software

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




Loading

Problems with timers compilation on TMDX570LC43HDK

Posted by etantonio on November 20, 2017

Hy, I'm trying to implement FreeRTOS V9.0.0 example 13 from "161204MasteringtheFreeRTOSRealTimeKernel-AHands-OnTutorial_Guide", I've modified it a little bit because my target environment is TMS570 on TMDX570LC43HDK board, this is my configuration regarding timers:

define configUSE_TIMERS 1
define configTIMERTASKPRIORITY ( 5 )
define configTIMERQUEUELENGTH 5
define configTIMERTASKSTACK_DEPTH ( 100 )

the problem is that during compiling I've the error:

 undefined              first referenced                     
  symbol                    in file                          
 ---------              ----------------                     
 MPU_xTimerCreate       ./source/Main.obj                    
 xTimerPendFunctionCall ./HalCoGen/source/os_mpu_wrappers.obj

how can I solve such kind of compilation problems? The main code is the following:


######

include "HL_sci.h"
include "HL_gio.h"
include "HLreghet.h"

#####

include "FreeRTOS.h"

#####

include "os_projdefs.h"
include "os_task.h"

#####

include "string.h"
include "stdlib.h"

#####

include "Misc.h"
include "os_queue.h"
include "os_timer.h"

/* The periods assigned to the one-shot and auto-reload timers respectively. */

define mainONESHOTTIMERPERIOD ( pdMSTO_TICKS( 3333UL ) )
define mainAUTORELOADTIMERPERIOD ( pdMSTO_TICKS( 500UL ) )

/-----------------------------------------------------------/

/* * The callback functions used by the one-shot and auto-reload timers * respectively. */ static void prvOneShotTimerCallback( TimerHandlet xTimer ); static void prvAutoReloadTimerCallback( TimerHandlet xTimer );

void Main_Main() { sciInit(); gioInit();

TimerHandle_t xAutoReloadTimer, xOneShotTimer;
BaseType_t xTimer1Started, xTimer2Started;

xOneShotTimer = xTimerCreate( "OneShot",					
							  mainONE_SHOT_TIMER_PERIOD,	
							  pdFALSE,						
							  0,							
							  prvOneShotTimerCallback );	

xAutoReloadTimer = xTimerCreate( "AutoReload",					
								 mainAUTO_RELOAD_TIMER_PERIOD,	
								 pdTRUE,						
								 0,								
								 prvAutoReloadTimerCallback );	

/* Check the timers were created. */
if( ( xOneShotTimer != NULL ) && ( xAutoReloadTimer != NULL ) )
{
	xTimer1Started = xTimerStart( xOneShotTimer, 0 );
	xTimer2Started = xTimerStart( xAutoReloadTimer, 0 );
	if( ( xTimer1Started == pdPASS ) && ( xTimer2Started == pdPASS ) )
	{
		vTaskStartScheduler();
	}
}
for( ;; );
return 0;

}

/-----------------------------------------------------------/

static void prvOneShotTimerCallback( TimerHandlet xTimer ) { static TickTypet xTimeNow; xTimeNow = xTaskGetTickCount(); PutH32( xTimeNow ); } /-----------------------------------------------------------/

static void prvAutoReloadTimerCallback( TimerHandlet xTimer ) { static TickTypet xTimeNow; xTimeNow = xTaskGetTickCount(); PutH32( xTimeNow ); } /-----------------------------------------------------------/

Thanks for your help,
Antonio


Problems with timers compilation on TMDX570LC43HDK

Posted by rtel on November 20, 2017

osmpuwrappers is not a file we provide for the Cortex-R port, I think this is an extension provided by TI themselves, so I don't know where the missing symbol MPU_xTimerCreate() will be.

xTimerPendFunctionCall() is in FreeRTOS/source/timers.c. As can be seen on line 1057 here: https://sourceforge.net/p/freertos/code/HEAD/tree/tags/V9.0.0/FreeRTOS/Source/timers.c INCLUDE_xTimerPendFunctionCall must be set to 1 in FreeRTOSConfig.h for it to be available.


Problems with timers compilation on TMDX570LC43HDK

Posted by etantonio on November 21, 2017

Hy, thanks for your answer, it solves one of the error, I've no more: xTimerPendFunctionCall ./HalCoGen/source/osmpuwrappers.obj but I've again the error:

 undefined              first referenced                     
  symbol                    in file                          
 ---------              ----------------                     
 MPU_xTimerCreate       ./source/Main.obj  

I've tried also to substitute timer.c and timer.h in ostimers.c and ostimers.h but it doesn't solve the problem.

Any idea about how to solve it? Thanks, Antonio

Attachments


Problems with timers compilation on TMDX570LC43HDK

Posted by rtel on November 21, 2017

Like I said, that part is not our code, so other that stating the obvious and suggesting that you Greg the files to find where it is defined, I’m afraid I don’t know.

If that is TI code, did you ask on the TI forum?


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




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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

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

OpenRTOS and SafeRTOS