From bfe1bffe40f91c29bc9d79a20d867279f880d2e7 Mon Sep 17 00:00:00 2001 From: Florian Sylvestre Date: Fri, 5 May 2023 18:47:00 +0200 Subject: [PATCH 10/20] CR52: add 'tpl_time_counter' support --- .../cortex-a/armv8/spider/counter_call.goilTemplate | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/goil/templates/code/cortex-a/armv8/spider/counter_call.goilTemplate b/goil/templates/code/cortex-a/armv8/spider/counter_call.goilTemplate index fc505fc9..dd2aed34 100755 --- a/goil/templates/code/cortex-a/armv8/spider/counter_call.goilTemplate +++ b/goil/templates/code/cortex-a/armv8/spider/counter_call.goilTemplate @@ -2,6 +2,12 @@ #include "tpl_os_timeobj_kernel.h" /* tpl_counter_tick */ #include "tpl_machine_interface.h" /* tpl_switch_context_from_it */ +#define OS_START_SEC_VAR_32BIT +#include "tpl_memmap.h" +volatile VAR(uint32, OS_VAR) tpl_time_counter = 0; +#define OS_STOP_SEC_VAR_32BIT +#include "tpl_memmap.h" + #define OS_START_SEC_CODE #include "tpl_memmap.h" % @@ -22,6 +28,11 @@ FUNC(void, OS_CODE) tpl_tick_% !interrupt::NAME %() do % tpl_counter_tick(&% !cpt_fct %_counter_desc); % + if interrupt::NAME == "SystemCounter" then + % tpl_time_counter++; +% + end if + after % if (tpl_kern.need_schedule) -- 2.34.1