From: mahi Date: Sun, 28 Feb 2010 19:46:24 +0000 (+0100) Subject: More updates on OS configuration. Fixes on Scheduletables. Started on kernel testsyst... X-Git-Url: https://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/fd743db7cc8ca1556e0d6e9b77d6471073ae6659 More updates on OS configuration. Fixes on Scheduletables. Started on kernel testsystem, again. --- diff --git a/arch/ppc/mpc55xx/kernel/irq.c b/arch/ppc/mpc55xx/kernel/irq.c index 6495119d..002f8d93 100644 --- a/arch/ppc/mpc55xx/kernel/irq.c +++ b/arch/ppc/mpc55xx/kernel/irq.c @@ -359,7 +359,7 @@ void Irq_GenerateSoftInt( IrqType vector ) { */ uint8_t Irq_GetCurrentPriority( Cpu_t cpu) { - uint8_t prio; + uint8_t prio = 0; #if defined(CFG_MPC5516) if( cpu == CPU_Z1 ) { diff --git a/examples/simple/config/Os_Cfg.c b/examples/simple/config/Os_Cfg.c index 41dfe55c..c0ae401c 100644 --- a/examples/simple/config/Os_Cfg.c +++ b/examples/simple/config/Os_Cfg.c @@ -30,6 +30,7 @@ OsTickType OsTickFreq = 1000; // atleast 1 #define SERVICE_CNT 1 + #if ( OS_SC3 == STD_ON) || ( OS_SC4==STD_ON) GEN_TRUSTEDFUNCTIONS_LIST diff --git a/examples/simple/config/Os_Cfg.h b/examples/simple/config/Os_Cfg.h index b03f941d..82338687 100644 --- a/examples/simple/config/Os_Cfg.h +++ b/examples/simple/config/Os_Cfg.h @@ -14,21 +14,21 @@ * -------------------------------- Arctic Core ------------------------------*/ - - - - - - -/* - * Os_Cfg.h - * - * Created on: 2008-dec-22 - * Author: mahi - */ #ifndef OS_CFG_H_ #define OS_CFG_H_ + + +/* + * OsOs container + */ +#define OS_SC1 STD_ON /* | OS_SC2 | OS_SC3 | OS_SC4 */ +#define OS_STACK_MONITORING STD_ON +#define OS_STATUS_EXTENDED STD_ON /* OS_STATUS_STANDARD */ +#define OS_USE_GET_SERVICE_ID STD_ON +#define OS_USE_PARAMETER_ACCESS STD_ON +#define OS_RES_SCHEDULER STD_ON + #define COUNTER_ID_OsTick 0 diff --git a/examples/tiny/config/Os_Cfg.h b/examples/tiny/config/Os_Cfg.h index 5ef9b45e..3f8c93b5 100644 --- a/examples/tiny/config/Os_Cfg.h +++ b/examples/tiny/config/Os_Cfg.h @@ -15,20 +15,19 @@ +#ifndef OS_CFG_H_ +#define OS_CFG_H_ +/* + * OsOs container + */ +#define OS_SC1 STD_ON /* | OS_SC2 | OS_SC3 | OS_SC4 */ +#define OS_STACK_MONITORING STD_ON +#define OS_STATUS_EXTENDED STD_ON /* OS_STATUS_STANDARD */ +#define OS_USE_GET_SERVICE_ID STD_ON +#define OS_USE_PARAMETER_ACCESS STD_ON +#define OS_RES_SCHEDULER STD_ON - - - -/* - * Os_Cfg.h - * - * Created on: 2008-dec-22 - * Author: mahi - */ - -#ifndef OS_CFG_H_ -#define OS_CFG_H_ /* os_config.h */ diff --git a/include/os_config_macros.h b/include/os_config_macros.h index b739d8ba..f3f62ead 100644 --- a/include/os_config_macros.h +++ b/include/os_config_macros.h @@ -435,16 +435,6 @@ struct OsHooks os_conf_global_hooks = { \ #undef MESSAGE_CNT #undef EVENT_CNT #undef SERVICE_CNT - -/* - * OsOs container - */ -#define OS_SC1 STD_ON /* | OS_SC2 | OS_SC3 | OS_SC4 */ -#define OS_STACK_MONITORING STD_ON -#define OS_STATUS_EXTENDED STD_ON /* OS_STATUS_STANDARD */ -#define OS_USE_GET_SERVICE_ID STD_ON -#define OS_USE_PARAMETER_ACCESS STD_ON -#define OS_RES_SCHEDULER STD_ON #endif diff --git a/makefile b/makefile index 389009a1..1879badd 100644 --- a/makefile +++ b/makefile @@ -35,8 +35,10 @@ USE_DBG_PRINTF?=y Q?=@ export Q export TOPDIR = $(CURDIR) +export CFG_DEBUG ?= n +ifeq ($(CFG_DEBUG),n) export CFG_RELEASE = y -export CFG_DEBUG = n +endif export PATH ifneq ($(filter clean_all,$(MAKECMDGOALS)),clean_all) diff --git a/scripts/cc_gcc.mk b/scripts/cc_gcc.mk index 8483d48c..c9835a89 100644 --- a/scripts/cc_gcc.mk +++ b/scripts/cc_gcc.mk @@ -15,20 +15,15 @@ endif CC = $(CROSS_COMPILE)gcc cflags-$(CFG_RELEASE) += -O3 -cflags-$(CFG_DEBUG) += -O0 -#cflags-y += -O0 -#cflags-y += -O3 +cflags-$(CFG_DEBUG) += -g -O0 +# Remove sections if needed.. may be problems with other compilers here. #cflags-y += -ffunction-sections ifneq ($(filter -O2 -O3 -O1,$(cflags-y)),) cflags-y += -fno-schedule-insns -fno-schedule-insns2 endif -# Remove sections if needed.. may be problems with other compilers here. -#cflags-$(CFG_MPC55XX) += -ffunction-sections - - #cflags-y += -c #cflags-y += -fno-common cflags-y += -std=gnu99 @@ -39,6 +34,7 @@ cflags-y += -MMD # Warnings cflags-y += -Wall cflags-y += -Winline # warn if inline failed +#cflags-y += -pedantic # Conformance cflags-y += -fno-strict-aliasing diff --git a/scripts/req-os.xlsx b/scripts/req-os.xlsx index 05334faf..9fef113f 100644 Binary files a/scripts/req-os.xlsx and b/scripts/req-os.xlsx differ diff --git a/scripts/req-os.xml b/scripts/req-os.xml index 87d65394..6c7da1d6 100644 --- a/scripts/req-os.xml +++ b/scripts/req-os.xml @@ -38,10 +38,8 @@ system shall disable all interrupts and enter an endless loop. 1,2,3,4 code code - The Operating System shall provide the services DisableAllInterrupts(), -EnableAllInterrupts(), SuspendAllInterrupts(), ResumeAllInterrupts() -prior to calling StartOS() and after calling ShutdownOS(). (It is assumed that the -static variables of these functions are initialized). + The Operating System shall provide the services DisableAllInterrupts(), EnableAllInterrupts(), SuspendAllInterrupts(), ResumeAllInterrupts() +prior to calling StartOS() and after calling ShutdownOS(). (It is assumed that the static variables of these functions are initialized). 1,2,3,4 @@ -361,7 +359,7 @@ be greater than (Offset + OsCounterMinCycle) of the pervious expiry point. - 1,2,3,4 + 2,4 code code A schedule table shall define a precision bound with a value in the range 0 @@ -390,7 +388,7 @@ after a synchronization count is provided. OsScheduleTblExplicitPrecision threshold. - 1,2,3,4 + 2,4 code code The OS shall set the state of an explicitly synchronized schedule table to @@ -398,7 +396,7 @@ OsScheduleTblExplicitPrecision threshold. OsScheduleTblExplicitPrecision threshold. - 1,2,3,4 + 2,4 code code If the deviation is negative and the next expiry point is adjustable then the @@ -406,7 +404,7 @@ OS shall set the delay to the next expiry point to Delay+min(OsScheduleTableMaxAdvance,Deviation) - 1,2,3,4 + 2,4 code code If the deviation is positive and the next expiry point is adjustable then the OS @@ -414,14 +412,14 @@ shall set the delay to the next expiry point to Delay- min(OsScheduleTableMaxRetard, Deviation) - 1,2,3,4 + 2,4 code code The OS shall provide a service to cancel synchronization being performed at adjustable expiry points on a schedule table. - 1,2,3,4 + 2,4 code code The Operating System shall extend the service from OS359 to query the @@ -435,14 +433,14 @@ state of a schedule table with respect to synchronization. stack faults of Task(s)/Category 2 OsIsr(s). - 1,2,3,4 + 1,2 code code If a stack fault is detected by stack monitoring AND the configured scalability class is 1 or 2, the Operating System shall call the ShutdownOS() service with the status E_OS_STACKFAULT. - 1,2,3,4 + 3,4 code code If a stack fault is detected by stack monitoring AND the configured scalability @@ -450,7 +448,7 @@ class is 3 or 4, the Operating System shall call the ProtectionHook() with the status E_OS_STACKFAULT. - 1,2,3,4 + 3,4 code code The Operating System shall support OS-Applications which are a @@ -1435,7 +1433,7 @@ the previous “next” schedule table and the old “next” schedule table sta SCHEDULETABLE_STOPPED. - 1,2,3,4 + 2,4 code code The synchronization strategy of the <ScheduleTableID_To> shall come into diff --git a/scripts/req_extract.r b/scripts/req_extract.r index aa66b142..8f77d4d7 100644 --- a/scripts/req_extract.r +++ b/scripts/req_extract.r @@ -15,8 +15,8 @@ REBOL [ ] usage: does [ -; do/args %scripts/req_extract.r ["diff" "OS" "req" "Class=1"] - print "Usage: do/args %extract_req [ ^"^" ^"[....]^" ]" +; do/args %req_extract.r ["diff" "OS" "req" "Class=1,Component=Code"] + print "Usage: do/args %req_extract.r [ ^"^" ^"[....]^" ]" print " req.sh diff OS req ^"Class=1^"" print " = (diff|ls) " print " diff (code|test) " diff --git a/system/kernel/counter.c b/system/kernel/counter.c index ae367a57..a27aa3de 100644 --- a/system/kernel/counter.c +++ b/system/kernel/counter.c @@ -35,7 +35,7 @@ static inline OsSchTblAdjExpPointType *getAdjExpPoint( OsSchTblType *stblPtr ) { #endif -static inline struct OsSchTblAutostart *getAutoStart( OsSchTblType *stblPtr ) { +static inline const struct OsSchTblAutostart *getAutoStart( OsSchTblType *stblPtr ) { return stblPtr->autostartPtr; } @@ -198,7 +198,7 @@ StatusType GetElapsedCounterValue( CounterType counter_id, TickRefType val, Tick { StatusType rv = E_OK; OsCounterType *cPtr; - TickType tick; + TickType tick = 0; cPtr = Oil_GetCounter(counter_id); @@ -219,6 +219,9 @@ StatusType GetElapsedCounterValue( CounterType counter_id, TickRefType val, Tick /** @req OS382 */ *elapsed_val = tick - *val; + /** @req OS460 */ + *val = tick; + COUNTER_STD_END; } diff --git a/system/kernel/include/internal.h b/system/kernel/include/internal.h index a5d95867..2784cf8b 100644 --- a/system/kernel/include/internal.h +++ b/system/kernel/include/internal.h @@ -227,7 +227,7 @@ static inline TickType get_os_tick( void ) { return os_sys.tick; } -#if ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON ) +#if ( OS_SC3 == STD_ON ) || ( OS_SC4 == STD_ON ) static inline OsApplicationType *get_curr_application( void ) { return get_curr_pcb()->application; } diff --git a/system/kernel/include/sched_table_i.h b/system/kernel/include/sched_table_i.h index d125f014..4c700b89 100644 --- a/system/kernel/include/sched_table_i.h +++ b/system/kernel/include/sched_table_i.h @@ -72,10 +72,11 @@ typedef struct OsScheduleTableEventSetting { /** @req OS403 */ typedef struct OsScheduleTableExpiryPoint { /* The expiry point offset, OsScheduleTblExpPointOffset */ + /** @req OS404 */ uint64 offset; // delta to next action - /** @req OS404 */ - uint64 delta; + + //uint64 delta; /* List of events to activate */ const TaskType *taskList; @@ -155,7 +156,7 @@ typedef struct OsSchTbl { struct OsCounter *counter; /* OsScheduleTableAutostart[C] */ - struct OsSchTblAutostart *autostartPtr; + const struct OsSchTblAutostart *autostartPtr; /* NULL if NONE, and non-NULL if EXPLICIT and IMPLICIT */ struct OsScheduleTableSync *sync; diff --git a/system/kernel/init.c b/system/kernel/init.c index 106663e1..27571d16 100644 --- a/system/kernel/init.c +++ b/system/kernel/init.c @@ -129,7 +129,7 @@ static void os_pcb_rom_copy( OsPcbType *pcb, const OsRomPcbType *r_pcb ) { // memset(pcb,sizeof(OsPcbType),0); pcb->pid = r_pcb->pid; pcb->prio = r_pcb->prio; -#if ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON ) +#if ( OS_SC3 == STD_ON ) || ( OS_SC4 == STD_ON ) pcb->application = Oil_GetApplObj(r_pcb->application_id); #endif pcb->entry = r_pcb->entry; @@ -221,7 +221,7 @@ static void os_start( void ) { OsAlarmType *alarmPtr; alarmPtr = Oil_GetAlarmObj(j); if(alarmPtr->autostartPtr != NULL ) { - OsAlarmAutostartType *autoPtr = alarmPtr->autostartPtr; + const OsAlarmAutostartType *autoPtr = alarmPtr->autostartPtr; if( autoPtr->autostartType == ALARM_AUTOSTART_ABSOLUTE ) { SetAbsAlarm(j,autoPtr->alarmTime, autoPtr->cycleTime); diff --git a/system/kernel/kernel_offset.c b/system/kernel/kernel_offset.c index d308c821..6c6d7c1e 100644 --- a/system/kernel/kernel_offset.c +++ b/system/kernel/kernel_offset.c @@ -30,7 +30,7 @@ void oil_foo(void) { DECLARE(PCB_T_SIZE, sizeof(OsPcbType)); -#if ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON ) +#if ( OS_SC3 == STD_ON ) || ( OS_SC4 == STD_ON ) DECLARE(APP_T_SIZE, sizeof(OsApplicationType)); #endif DECLARE(PCB_STACK_CURR_P, offsetof(OsPcbType, stack)); diff --git a/system/kernel/os_arctest.c b/system/kernel/os_arctest.c index 652ddf6c..52d59bfe 100644 --- a/system/kernel/os_arctest.c +++ b/system/kernel/os_arctest.c @@ -19,10 +19,9 @@ #include "internal.h" +int Os_ArcTest_GetTaskActivationLimit( TaskType TaskId ) { -int Os_ArcTest_GetTaskActivationLimit( TaskType task ) { - - return 0; + return os_get_pcb(TaskId)->activationLimit; } /** @@ -33,6 +32,8 @@ int Os_ArcTest_GetTaskActivationLimit( TaskType task ) { void Os_ArcTest_SetIrqNestLevel( int level ) { + os_sys.int_nest_cnt = level; + return; } diff --git a/system/kernel/resource.c b/system/kernel/resource.c index 96780e9c..4b23f527 100644 --- a/system/kernel/resource.c +++ b/system/kernel/resource.c @@ -91,7 +91,7 @@ static StatusType GetResource_( OsResourceType * rid ) { } // Check that the resource does not belong to another application or task if( ( (os_task_nr_to_mask(get_curr_pid()) & rid->task_mask ) == 0 ) -#if ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON ) +#if ( OS_SC3 == STD_ON ) || ( OS_SC4 == STD_ON ) || ( get_curr_application_id() != rid->application_owner_id) #endif || ( rid->owner != (TaskType)(-1))) diff --git a/system/kernel/sched_table.c b/system/kernel/sched_table.c index fea3665d..c7304b6f 100644 --- a/system/kernel/sched_table.c +++ b/system/kernel/sched_table.c @@ -25,6 +25,7 @@ /** @req OS411 */ /** @req OS347 */ /** @req OS358 */ + /** @req OS428 */ /* * How Autosar sees the scheduletable @@ -130,7 +131,7 @@ static void ScheduleTableConsistenyCheck( OsSchTblType *sTblPtr ) { /* Final */ /** @req OS444 */ - delta = sTblPtr->duration - SA_LIST_GET(&sTblPtr->expirePointList,iter)->offset; + delta = sTblPtr->duration - SA_LIST_GET(&sTblPtr->expirePointList,iter-1)->offset; assert( delta >= minCycle ); assert( delta <= maxValue ); } @@ -162,12 +163,11 @@ StatusType StartScheduleTableRel(ScheduleTableType sid, TickType offset) { } #endif -#if (OS_STATUS_EXTENDED == STD_ON ) - max_offset = Os_CounterGetMaxValue(s_tbl->counter); +#if (OS_STATUS_EXTENDED == STD_ON ) /** @req OS276 */ /** @req OS332 */ - if( (offset == 0) || ((offset + Os_SchTblGetInitialOffset()) > max_offset ) ) { + if( (offset == 0) || ((offset + Os_SchTblGetInitialOffset(s_tbl)) > max_offset ) ) { rv = E_OS_VALUE; goto err; } @@ -194,7 +194,8 @@ StatusType StartScheduleTableAbs(ScheduleTableType sid, TickType start ){ OsSchTblType *sTblPtr; /** @req OS348 */ - SCHED_CHECK_ID(sid); + SCHED_CHECK_ID(sid); + sTblPtr = Oil_GetSched(sid); /** @req OS349 */ if( start > Os_CounterGetMaxValue(sTblPtr->counter) ) { @@ -550,50 +551,13 @@ void Os_SchTblCheck(OsCounterType *c_p) { } } -/* - *start e e e delta stop - * |----|---|-------|---------| - * - * - * | s e e cm e - * |---|---|----|---|----|----------| - * 1 2 3 4 5 - * e-expiry point - * cm-counter max( restart from 0) - * s-call to StartScheduleTableRel() - */ - - -/* TODO: Remove when we have a stable generator. The reason for this - * funcion is that I'm afraid of if I change the maxallowedvalue for the - * counter I will miss to update the delta values - */ -static void os_stbl_action_calc_delta( OsSchTblType *stbl ) { - OsScheduleTableExpiryPointType * first; - OsScheduleTableExpiryPointType * second; -// ALIST_DECL_ITER(iter); - int iter; - - // calculate the delta to next action - - for(iter=1; iter < SA_LIST_CNT(&stbl->expirePointList) ;iter++) { - first = SA_LIST_GET(&stbl->expirePointList,iter-1); - second = SA_LIST_GET(&stbl->expirePointList,iter); - first->delta = second->offset - first->offset; - } - // calculate the last delta( to countes max value ) - first = SA_LIST_GET(&stbl->expirePointList, SA_LIST_CNT(&stbl->expirePointList)-1); - first->delta = stbl->counter->alarm_base.maxallowedvalue - first->offset; -} - /** * */ void Os_SchTblInit( void ) { OsSchTblType *s_p; for( int i=0; i < Oil_GetSchedCnt();i++ ) { - s_p = Oil_GetSched(i); - os_stbl_action_calc_delta(s_p); + s_p = Oil_GetSched(i); ScheduleTableConsistenyCheck(s_p); } @@ -615,22 +579,31 @@ void Os_SchTblCalcExpire( OsSchTblType *stbl ) { TickType initalOffset; TickType finalOffset; OsSchTblType *nextStblPtr; + _Bool handleLast = 0; if( (stbl->expire_curr_index) == SA_LIST_CNT(&stbl->expirePointList) ) { /* We are at the last expiry point */ finalOffset = Os_SchTblGetFinalOffset(stbl); - stbl->expire_val = Os_CounterCalcModulo( - Os_CounterGetValue(stbl->counter), - Os_CounterGetMaxValue(stbl->counter), - finalOffset ); + if (finalOffset != 0) { + stbl->expire_val = Os_CounterCalcModulo( + Os_CounterGetValue(stbl->counter), + Os_CounterGetMaxValue(stbl->counter), + finalOffset ); - stbl->expire_curr_index++; + stbl->expire_curr_index++; + } else { + /* Only single shot may have an offset of 0 */ + assert(stbl->repeating == SINGLE_SHOT); + handleLast = 1; + } + } - } else if( (stbl->expire_curr_index) > SA_LIST_CNT(&stbl->expirePointList) ) { + if( handleLast || + ( (stbl->expire_curr_index) > SA_LIST_CNT(&stbl->expirePointList) ) ) + { /* At final offset */ - /** @req OS194 */ if( (stbl->repeating == REPEATING) || (stbl->next != NULL) ) { if( stbl->next != NULL ) { @@ -664,7 +637,8 @@ void Os_SchTblCalcExpire( OsSchTblType *stbl ) { } } else { - delta = SA_LIST_GET(&stbl->expirePointList,stbl->expire_curr_index)->delta; + delta = SA_LIST_GET(&stbl->expirePointList,stbl->expire_curr_index+1) - + SA_LIST_GET(&stbl->expirePointList,stbl->expire_curr_index) ; stbl->expire_val = Os_CounterCalcModulo( Os_CounterGetValue(stbl->counter), diff --git a/system/kernel/task.c b/system/kernel/task.c index 09116654..19eda427 100644 --- a/system/kernel/task.c +++ b/system/kernel/task.c @@ -437,7 +437,6 @@ StatusType GetTaskID( TaskRefType task_id ) { } ISRType GetISRID( void ) { - OsPcbType *pPtr; /** @req OS264 */ if(os_sys.int_nest_cnt == 0 ) { @@ -447,6 +446,13 @@ ISRType GetISRID( void ) { /** @req OS263 */ return (ISRType)Os_TaskGetCurrent()->pid; } + +#define TASK_CHECK_ID(x) \ + if( (x) > Oil_GetTaskCnt()) { \ + rv = E_OS_ID; \ + goto err; \ + } + /** * The task is transferred from the suspended state into @@ -478,17 +484,16 @@ StatusType ActivateTask( TaskType TaskID ) { StatusType rv = E_OK; os_isr_printf(D_TASK,"ActivateTask %s\n",pcb->name); - - if( !os_pcb_pid_valid(pcb) ) { - rv = E_OS_ID; - goto err; - } + +#if (OS_STATUS_EXTENDED == STD_ON ) + TASK_CHECK_ID(TaskID); /* @req OS093 ActivateTask */ if( Os_IrqAnyDisabled() ) { rv = E_OS_DISABLEDINT; goto err; } +#endif Irq_Save(msr); @@ -569,10 +574,12 @@ StatusType TerminateTask( void ) { os_std_printf(D_TASK,"TerminateTask %s\n",curr_pcb->name); +#if (OS_STATUS_EXTENDED == STD_ON ) if( os_sys.int_nest_cnt != 0 ) { rv = E_OS_CALLEVEL; goto err; } +#endif Irq_Save(flags); @@ -617,10 +624,14 @@ StatusType ChainTask( TaskType TaskId ) { StatusType rv; uint32_t flags; +#if (OS_STATUS_EXTENDED == STD_ON ) + TASK_CHECK_ID(TaskId); + if( os_sys.int_nest_cnt != 0 ) { rv = E_OS_CALLEVEL; goto err; } +#endif Irq_Save(flags); rv = ActivateTask(TaskId); diff --git a/system/kernel/testsystem/config/Os_Cfg.c b/system/kernel/testsystem/config/Os_Cfg.c index a4806254..4d9d3d13 100644 --- a/system/kernel/testsystem/config/Os_Cfg.c +++ b/system/kernel/testsystem/config/Os_Cfg.c @@ -90,7 +90,7 @@ OsTickType OsTickFreq = 1000; -extern void dec_exception( void ); +extern void dec_exception( void ); #if ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON ) // atleast 1 diff --git a/system/kernel/testsystem/config/Os_Cfg.h b/system/kernel/testsystem/config/Os_Cfg.h index 293e9345..e95b8ab5 100644 --- a/system/kernel/testsystem/config/Os_Cfg.h +++ b/system/kernel/testsystem/config/Os_Cfg.h @@ -19,7 +19,18 @@ #define OS_CFG_H_ -/* os_config.h */ +/* os_config.h */ + +/* + * OsOs container + */ +#define OS_SC1 STD_ON /* | OS_SC2 | OS_SC3 | OS_SC4 */ +#define OS_STACK_MONITORING STD_ON +#define OS_STATUS_EXTENDED STD_ON /* OS_STATUS_STANDARD */ +#define OS_USE_GET_SERVICE_ID STD_ON +#define OS_USE_PARAMETER_ACCESS STD_ON +#define OS_RES_SCHEDULER STD_ON + #define APPLICATION_ID_application_1 0 #define APPLICATION_CNT 1 diff --git a/system/kernel/testsystem/test_01_task.c b/system/kernel/testsystem/test_01_task.c index 169ad68b..68b107ea 100644 --- a/system/kernel/testsystem/test_01_task.c +++ b/system/kernel/testsystem/test_01_task.c @@ -72,7 +72,7 @@ void etask_sup_l_01(void) { /* Activate higher prio task to do the test */ rv = ActivateTask(TASK_ID_btask_sup_h); - TEST_ASSERT(rv=E_OK); + TEST_ASSERT(rv == E_OK); /* Was it run activation times? */ TEST_ASSERT(btaskRunCnt == Os_ArcTest_GetTaskActivationLimit(TASK_ID_btask_sup_m)); @@ -83,7 +83,7 @@ void etask_sup_l_01(void) { * Terminate a task that still holds resources * */ rv = ActivateTask(TASK_ID_btask_sup_h); - TEST_ASSERT(rv=E_OK); + TEST_ASSERT(rv == E_OK); break; case 11: /*@req E_OS_CALLEVEL TerminateTask */ @@ -156,7 +156,7 @@ void btask_sup_m_01( void ) { break; case 10: rv = GetResource(RES_ID_ext_prio_3); - TEST_ASSERT(rv=E_OK); + TEST_ASSERT(rv == E_OK); rv = TerminateTask(); TEST_ASSERT(rv==E_OS_RESOURCE); diff --git a/system/kernel/testsystem/test_master.c b/system/kernel/testsystem/test_master.c index 9e8a962e..247596f0 100644 --- a/system/kernel/testsystem/test_master.c +++ b/system/kernel/testsystem/test_master.c @@ -187,7 +187,7 @@ void ErrorHook( StatusType Error ) { // dbg_printf("## ErrorHook err=%d\n",Error); const char *err; err = Arc_StatusToString(Error); - while(1); +// while(1); } void PreTaskHook( void ) {