Regular timer vs systick handler

hello all!
is it possible to use regular timer instead of systick handler? in my sc000 controller systick function is truncated.
how will macros look like in this case? (in freertos_config.h)

Which FreeRTOS port are you using? If you are using Cortex-M4, you need to implement vPortSetupTimerInterrupt which will override the default implementation as it is weak. And install this function as your interrupt handler?

I have follow quick start. copy tasks queue list and port (cortex m0) and heap 1
my sc000 - cortex m0, it is a simulator for sim card

What problem are you facing? Can you describe in detail all the symptoms - is it a build error, linker error or run time error?

I have followed the recommendation for create new project. There are not demo project for my controller. It is a SC000 (ARM CortexM0).
So I have follow the new project from FreeRTOS(list, queue task port and heap)
The first trouble is - on my controller SysTick_Handler is truncated.
So, I do try to use regular timer and IRQHandler as a source for SysTick
I have define it in FreeRTOSConfig.h as a
#define xPortSysTickHandler Timer0_IRQHandler
But receive an error Symbol multiple defined (port.o and main.o)
If define as SysTickHandler as default it is compiled but tasks not switched
I do check it with digital analyzer on GPIO ports, port with timer shows the impulses but tasks keep silence
I means that tasks not started
Where I do mistakes?

Please share the complete output.

Rebuild target ‘Target 1’
compiling main.c…
assembling M25_Startup.s…
compiling list.c…
compiling queue.c…
compiling tasks.c…
compiling heap_1.c…
compiling port.c…
compiling function.c…
linking…
.\lesson015.axf: Error: L6200E: Symbol Timer0_IRQHandler multiply defined (by .\port.o and .\main.o).
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 2 information, 0 warning and 1 error messages.
“.\lesson015.axf” - 1 Error(s), 0 Warning(s).
Target not created

this is tail of FreeRTOSConfig

/* Normal assert() semantics without relying on the provision of an assert.h
header file. */
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }

/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names - or at least those used in the unmodified vector table. */
#define xPortPendSVHandler PendSV_Handler
// #define xPortSysTickHandler SysTick_Handler
#define xPortSysTickHandler Timer0_IRQHandler

/* Bump up the priority of recmuCONTROLLING_TASK_PRIORITY to prevent false
positive errors being reported considering the priority of other tasks in the
system. */
#define recmuCONTROLLING_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )

#define traceTASK_SWITCHED_IN() TaskSwitchedIn((int)pxCurrentTCB->pxTaskTag);
#define traceTASK_SWITCHED_OUT() TaskSwitchedOut((int)pxCurrentTCB->pxTaskTag);

#endif /* FREERTOS_CONFIG_H */

this is tail of main

BaseType_t xReturned_ONE;
BaseType_t xReturned_TWO;

// #define TASK_DEBUG

void vTaskCode_ONE(void * pvParametrs ) 
	{
		#ifdef TASK_DEBUG
			vTaskSetApplicationTaskTag( NULL, ( TaskHookFunction_t ) 1 );
		__nop();
		#endif
		for( ;; ) 
			{

				__nop();
			GPIODATA = (1 << 1);
				vTaskDelay(10);
			GPIODATA = (0 << 1);
				vTaskDelay(1);
			}
	}	
	
	void vTaskCode_TWO(void * pvParametrs ) 
	{
		#ifdef TASK_DEBUG
			vTaskSetApplicationTaskTag( NULL, ( TaskHookFunction_t ) 2 );
		__nop();
		#endif
		for( ;; ) 
			{

				__nop();
			GPIODATA = (1 << 2);
				vTaskDelay(10);
			GPIODATA = (0 << 2);
				vTaskDelay(1);
			}
	}	

void Timer0_IRQHandler(void)
{
			TIMER0IS = 0;		
			__nop();
			GPIODATA = (1 << 3);
			__nop();
			GPIODATA = (0 << 3);
}

int main(void) 
	{
	Timer0_Init();
		
	xReturned_ONE = xTaskCreate(vTaskCode_ONE, "ONE", 50*4, NULL, tskIDLE_PRIORITY, NULL );
	xReturned_TWO = xTaskCreate(vTaskCode_TWO, "TWO", 50*4, NULL, tskIDLE_PRIORITY, NULL );

  vTaskStartScheduler();

  for( ;; );
	
	}

Assuming that the line TIMER0IS = 0; clears the interrupt, you need to update the definition of Timer0_IRQHandler in the main.c to the following -

void Timer0_IRQHandler( void )
{
    uint32_t ulPreviousMask;

    TIMER0IS = 0;

    ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR();
    {
        /* Increment the RTOS tick. */
        if( xTaskIncrementTick() != pdFALSE )
        {
            /* Pend a context switch. */
            portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
        }
    }
    portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask );
}

And remove the following line from the FreeRTOSConfig.h:

#define xPortSysTickHandler Timer0_IRQHandler

Thank you a lot! I will try

It is working! Cool!
Thank you a lot! Again and again

Dear Aggard
I do continue my questions.
FreeRTOS in my case switch tasks but its behavior not the same as I expected.
Task as

void vTaskCode_ONE(void * pvParametrs )
{
#ifdef TASK_DEBUG
vTaskSetApplicationTaskTag( NULL, ( TaskHookFunction_t ) 1 );
#endif

	 for( ; ; ) 
		{
			osDelay(1);
		 } 		

}	</code>

not ended until switch context

0 and 1 tasks next IDLE and TICK from TIMER

I have found the solution. I have to change osDelay → vTaskDelay and then it began works right

Glad that you figured!