1 /* -------------------------------- Arctic Core ------------------------------
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
6 * This source code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by the
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * -------------------------------- Arctic Core ------------------------------*/
24 * Module vendor: Autocore
25 * Module version: 1.0.0
26 * Specification: Autosar v3.0.1, Final
31 // File generated on Tue Aug 18 13:49:03 CEST 2009
\r
35 #include "os_config_macros.h"
\r
36 #include "Platform_Types.h"
\r
37 #include "Os.h" // includes Os_Cfg.h
\r
39 #include "Kernel_Offset.h"
\r
40 #include "alist_i.h"
\r
43 // ################################## DEBUG #################################
\r
44 // All output on as standard
\r
45 uint32 os_dbg_mask = 0;
\r
47 // D_ISR_MASTER_PRINT |
\r
49 // D_ISR_STDOUT | D_TASK | D_ALARM;
\r
51 // ############################### APPLICATION ##############################
\r
52 // A single, non-configurable application for now
\r
53 rom_app_t rom_app_list[] = {
\r
55 .application_id = APPLICATION_ID_application_1,
\r
56 .name = "application_1",
\r
58 .StartupHook = NULL,
\r
59 .ShutdownHook = NULL,
\r
62 .scheduletable_mask = 0,
\r
71 // ################################# COUNTERS ###############################
\r
72 counter_obj_t counter_list[] = {
\r
75 .type = COUNTER_TYPE_HARD,
\r
76 .unit = COUNTER_UNIT_NANO,
\r
77 .alarm_base.maxallowedvalue = 65535,
\r
78 .alarm_base.tickperbase = 1,
\r
79 .alarm_base.mincycle = 0,
\r
83 // ################################## ALARMS ################################
\r
84 alarm_obj_t alarm_list[] = {
\r
87 .counter = &counter_list[COUNTER_ID_OsTick],
\r
88 .counter_id = COUNTER_ID_OsTick,
\r
93 .appmode_mask = APPLICATION_ID_application_1, //___ARCTICSTUDIO_GENERATOR_TODO___,
\r
96 .type = ALARM_ACTION_ACTIVATETASK,
\r
97 .task_id = TASK_ID_ComTask,
\r
101 .name = "ReadSwAlarm",
\r
102 .counter = &counter_list[COUNTER_ID_OsTick],
\r
103 .counter_id = COUNTER_ID_OsTick,
\r
108 .appmode_mask = APPLICATION_ID_application_1, //___ARCTICSTUDIO_GENERATOR_TODO___,
\r
111 .type = ALARM_ACTION_ACTIVATETASK,
\r
112 .task_id = TASK_ID_ReadSwitches,
\r
118 // ################################ RESOURCES ###############################
\r
119 resource_obj_t resource_list[] = {
\r
121 .nr = RES_SCHEDULER,
\r
122 .type = RESOURCE_TYPE_STANDARD,
\r
123 .ceiling_priority = 0,
\r
124 .application_owner_id = 0,
\r
130 // ############################## STACKS (TASKS) ############################
\r
131 uint8_t stack_ComTask[PRIO_STACK_SIZE];
\r
132 uint8_t stack_OsIdle[PRIO_STACK_SIZE];
\r
133 uint8_t stack_ReadSwitches[PRIO_STACK_SIZE];
\r
134 uint8_t stack_StartupTask[PRIO_STACK_SIZE];
\r
136 // ##################### TIMING PROTECTIONS (TASKS, ISRS) ###################
\r
137 timing_protection_t timing_protection_list[] = {
\r
140 rom_pcb_t rom_pcb_list[] = {
\r
141 // ################################## TASKS #################################
\r
143 .pid = TASK_ID_ComTask,
\r
147 .proc_type = PROC_BASIC,
\r
148 .stack.size = sizeof stack_ComTask,
\r
149 .stack.top = stack_ComTask,
\r
150 .autostart = false,
\r
151 .application_id = APPLICATION_ID_application_1,
\r
154 .pid = TASK_ID_OsIdle,
\r
158 .proc_type = PROC_EXTENDED,
\r
159 .stack.size = sizeof stack_OsIdle,
\r
160 .stack.top = stack_OsIdle,
\r
162 .application_id = APPLICATION_ID_application_1,
\r
165 .pid = TASK_ID_ReadSwitches,
\r
166 .name = "ReadSwitches",
\r
167 .entry = ReadSwitches,
\r
169 .proc_type = PROC_BASIC,
\r
170 .stack.size = sizeof stack_ReadSwitches,
\r
171 .stack.top = stack_ReadSwitches,
\r
172 .autostart = false,
\r
173 .application_id = APPLICATION_ID_application_1,
\r
176 .pid = TASK_ID_StartupTask,
\r
177 .name = "StartupTask",
\r
178 .entry = StartupTask,
\r
180 .proc_type = PROC_BASIC,
\r
181 .stack.size = sizeof stack_StartupTask,
\r
182 .stack.top = stack_StartupTask,
\r
184 .application_id = APPLICATION_ID_application_1,
\r
188 uint8_t pcb_list[PCB_T_SIZE*ARRAY_SIZE(rom_pcb_list)];
\r
190 uint8_t os_interrupt_stack[OS_INTERRUPT_STACK_SIZE] __attribute__ ((aligned (0x10)));
\r
192 // The vector table
\r
193 void * intc_vector_tbl[NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS] __attribute__ ((aligned (0x1000),section(".data")))= {
\r
196 // The type of vector
\r
197 uint8 intc_type_tbl[NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS] = {
\r
201 // ################################## HOOKS ##################################
\r
202 struct os_conf_global_hooks_s os_conf_global_hooks = {
\r
203 .StartupHook = StartupHook,
\r
204 .ProtectionHook = ProtectionHook,
\r
205 .ShutdownHook = ShutdownHook,
\r
206 .ErrorHook = ErrorHook,
\r
207 .PreTaskHook = PreTaskHook,
\r
208 .PostTaskHook = PostTaskHook,
\r
211 #include "os_config_funcs.h"