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( TimerHandle_t xTimer ); static void prvAutoReloadTimerCallback( TimerHandle_t 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