rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /* ###*B*### |
| 2 | * ERIKA Enterprise - a tiny RTOS for small microcontrollers |
| 3 | * |
| 4 | * Copyright (C) 2002-2014 Evidence Srl |
| 5 | * |
| 6 | * This file is part of ERIKA Enterprise. |
| 7 | * |
| 8 | * ERIKA Enterprise is free software; you can redistribute it |
| 9 | * and/or modify it under the terms of the GNU General Public License |
| 10 | * version 2 as published by the Free Software Foundation, |
| 11 | * (with a special exception described below). |
| 12 | * |
| 13 | * Linking this code statically or dynamically with other modules is |
| 14 | * making a combined work based on this code. Thus, the terms and |
| 15 | * conditions of the GNU General Public License cover the whole |
| 16 | * combination. |
| 17 | * |
| 18 | * As a special exception, the copyright holders of this library give you |
| 19 | * permission to link this code with independent modules to produce an |
| 20 | * executable, regardless of the license terms of these independent |
| 21 | * modules, and to copy and distribute the resulting executable under |
| 22 | * terms of your choice, provided that you also meet, for each linked |
| 23 | * independent module, the terms and conditions of the license of that |
| 24 | * module. An independent module is a module which is not derived from |
| 25 | * or based on this library. If you modify this code, you may extend |
| 26 | * this exception to your version of the code, but you are not |
| 27 | * obligated to do so. If you do not wish to do so, delete this |
| 28 | * exception statement from your version. |
| 29 | * |
| 30 | * ERIKA Enterprise is distributed in the hope that it will be |
| 31 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
| 32 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 33 | * GNU General Public License version 2 for more details. |
| 34 | * |
| 35 | * You should have received a copy of the GNU General Public License |
| 36 | * version 2 along with ERIKA Enterprise; if not, write to the |
| 37 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 38 | * Boston, MA 02110-1301 USA. |
| 39 | * ###*E*### */ |
| 40 | |
| 41 | /* |
| 42 | * Author: 2000-2004 Paolo Gai |
| 43 | * 2009 Bernardo Dal Seno |
| 44 | */ |
| 45 | |
| 46 | |
| 47 | #ifndef PKG_EE_H |
| 48 | #define PKG_EE_H |
| 49 | |
| 50 | #include "eecfg.h" |
| 51 | |
| 52 | #include "ee_rtdruid_versions.h" |
| 53 | |
| 54 | #if defined(__cplusplus) |
| 55 | extern "C" { |
| 56 | #endif |
| 57 | |
| 58 | /* |
| 59 | * |
| 60 | * CPU |
| 61 | * |
| 62 | */ |
| 63 | |
| 64 | /* Freescale */ |
| 65 | #if (defined(__MC9S12__)) || (defined(__HCS12XS__)) |
| 66 | #include "cpu/hs12xs/inc/ee_cpu.h" |
| 67 | #endif |
| 68 | |
| 69 | #ifdef __ST10__ |
| 70 | #include "st10mono/arch.h" |
| 71 | #endif |
| 72 | |
| 73 | #ifdef __ST10SEGM__ |
| 74 | #include "st10segm/arch.h" |
| 75 | #endif |
| 76 | |
| 77 | #if (defined(__ARM7GNU__)) || (defined(__ARM7ADS__)) |
| 78 | #include "cpu/arm7tdmi/inc/ee_cpu.h" |
| 79 | #endif |
| 80 | |
| 81 | #ifdef __X86__ |
| 82 | #include "cpu/x86/inc/ee_cpu.h" |
| 83 | #endif |
| 84 | |
| 85 | |
| 86 | #ifdef __AVR8__ |
| 87 | #include "cpu/avr8/inc/ee_avr8_cpu.h" |
| 88 | #endif |
| 89 | |
| 90 | #ifdef __H8__ |
| 91 | #include "h8/arch.h" |
| 92 | #include "h8/drivers.h" |
| 93 | #include "h8/fmath.h" |
| 94 | #include "h8/inline_k.h" |
| 95 | #include "h8/inline_d.h" |
| 96 | #endif |
| 97 | |
| 98 | #ifdef __NIOS2__ |
| 99 | #include "cpu/nios2/inc/ee_cpu.h" |
| 100 | #endif |
| 101 | |
| 102 | #ifdef __MPC5XX__ |
| 103 | #include "cpu/mpc5xx/inc/ee_cpu.h" |
| 104 | #endif |
| 105 | |
| 106 | #ifdef __MPC5PROTECTED__ |
| 107 | #include "cpu/mpc5protected/inc/ee_cpu.h" |
| 108 | #endif |
| 109 | |
| 110 | #ifdef __PIC30__ |
| 111 | #include "cpu/pic30/inc/ee_cpu.h" |
| 112 | #endif |
| 113 | |
| 114 | #ifdef __PIC32__ |
| 115 | #include "cpu/pic32/inc/ee_cpu.h" |
| 116 | #endif |
| 117 | |
| 118 | #ifdef __RH850__ |
| 119 | #include "cpu/rh850/inc/ee_cpu.h" |
| 120 | #endif |
| 121 | |
| 122 | #ifdef __TRICORE1__ |
| 123 | #include "cpu/tricore1/inc/ee_cpu.h" |
| 124 | |
| 125 | #ifdef __INT__ |
| 126 | #include "cpu/tricore1/inc/ee_int.h" |
| 127 | #endif |
| 128 | |
| 129 | #ifdef __TRAP__ |
| 130 | #include "cpu/tricore1/inc/ee_trap.h" |
| 131 | #endif |
| 132 | |
| 133 | #endif /* __TRICORE1__ */ |
| 134 | |
| 135 | #ifdef EE_CORTEX_AX_XENPV__ |
| 136 | #include "cpu/cortex_ax_xenpv/inc/ee_cax_cpu.h" |
| 137 | #endif /* EE_CORTEX_AX_XENPV__ */ |
| 138 | |
| 139 | #ifdef __LM32__ |
| 140 | #include "cpu/mico32/inc/ee_cpu.h" |
| 141 | #endif |
| 142 | |
| 143 | #if (defined(__PPCE200Z7__)) || (defined(__PPCE200ZX__)) |
| 144 | #include "cpu/e200zx/inc/ee_cpu.h" |
| 145 | #endif /* defined __PPCE200Z7__ || defined __PPCE200ZX__ */ |
| 146 | |
| 147 | #ifdef __ESI_RISC__ |
| 148 | #include "cpu/esi_risc/inc/ee_cpu.h" |
| 149 | #endif |
| 150 | |
| 151 | #ifdef __MSP430__ |
| 152 | #include "cpu/msp430/inc/ee_cpu.h" |
| 153 | #endif |
| 154 | |
| 155 | #ifdef __CORTEX_MX__ |
| 156 | #include "cpu/cortex_mx/inc/ee_cpu.h" |
| 157 | #endif |
| 158 | |
| 159 | #ifdef __RX200__ |
| 160 | #include "cpu/rx200/inc/ee_cpu.h" |
| 161 | #endif |
| 162 | |
| 163 | #ifdef __CORTEX_RX__ |
| 164 | #include "cpu/cortex_rx/inc/ee_cpu.h" |
| 165 | #endif |
| 166 | |
| 167 | #ifdef __ARC_EM6__ |
| 168 | #include "cpu/arc_em6/inc/ee_cpu.h" |
| 169 | #endif |
| 170 | |
| 171 | /* |
| 172 | * |
| 173 | * MCU |
| 174 | * |
| 175 | */ |
| 176 | |
| 177 | /* Freescale */ |
| 178 | #if (defined(__MC9S12__)) || (defined(__HCS12XS__)) |
| 179 | #include "mcu/hs12xs/inc/ee_mcu.h" |
| 180 | #endif |
| 181 | |
| 182 | /* Atmel AVR */ |
| 183 | #ifdef __ATMEGA__ |
| 184 | #include "mcu/atmel_atmega/inc/ee_mcu.h" |
| 185 | #endif |
| 186 | |
| 187 | #ifdef __ATTINY__ |
| 188 | #include "mcu/atmel_attiny/inc/ee_mcu.h" |
| 189 | #endif |
| 190 | |
| 191 | #ifdef __ATXMEGA__ |
| 192 | #include "mcu/atmel_atxmega/inc/ee_atmel_atxmega_mcu.h" |
| 193 | #endif |
| 194 | |
| 195 | /* ARM */ |
| 196 | #ifdef __SAMSUNG_KS32C50100__ |
| 197 | #include "mcu/samsung_ks32c50100/inc/ee_mcu.h" |
| 198 | #endif |
| 199 | |
| 200 | #ifdef __ST_STA2051__ |
| 201 | #include "mcu/st_sta2051/inc/ee_mcu.h" |
| 202 | #endif |
| 203 | |
| 204 | #ifdef __UNIBO_MPARM__ |
| 205 | #include "mcu/unibo_mparm/inc/ee_mcu.h" |
| 206 | #endif |
| 207 | |
| 208 | /* PPC */ |
| 209 | #ifdef __MPC566EVB__ |
| 210 | #include "mcu/motorola_mpc566/inc/ee_mcu.h" |
| 211 | #endif |
| 212 | |
| 213 | /* dsPIC */ |
| 214 | #ifdef __PIC30__ |
| 215 | #include "mcu/microchip_dspic/inc/ee_mcu.h" |
| 216 | #endif |
| 217 | |
| 218 | /* dsPIC */ |
| 219 | #ifdef __PIC32__ |
| 220 | #include "mcu/microchip_pic32/inc/ee_mcu.h" |
| 221 | #endif |
| 222 | |
| 223 | /* NIOS 2 */ |
| 224 | #ifdef __NIOS2__ |
| 225 | #include "mcu/altera_nios2/inc/ee_mcu.h" |
| 226 | #endif |
| 227 | |
| 228 | /* MICO32 */ |
| 229 | #ifdef __LM32__ |
| 230 | #include "mcu/mico32/inc/ee_mcu.h" |
| 231 | #endif |
| 232 | |
| 233 | /* Tricore1 TC179x */ |
| 234 | #ifdef __TC179x__ |
| 235 | #include "mcu/tc179x/inc/ee_mcu.h" |
| 236 | #endif |
| 237 | |
| 238 | /* X86 */ |
| 239 | #ifdef __X86__ |
| 240 | #include "mcu/x86/inc/ee_mcu.h" |
| 241 | #endif |
| 242 | |
| 243 | /* MSP430 */ |
| 244 | #ifdef __MSP430__ |
| 245 | #include "mcu/msp430/inc/ee_mcu.h" |
| 246 | #endif |
| 247 | |
| 248 | /* LPCXpresso */ |
| 249 | #if (defined(__LPCXPRESSO__)) && (defined(__LPC12xx__)) |
| 250 | #include "mcu/nxp_lpcxpresso_lpc12xx/inc/ee_mcu.h" |
| 251 | #endif |
| 252 | |
| 253 | /* Stellaris */ |
| 254 | #if (defined(__STELLARIS__)) && (defined(__LM4F232xxxx__)) |
| 255 | #include "mcu/ti_stellaris_lm4f232xxxx/inc/ee_mcu.h" |
| 256 | #endif |
| 257 | |
| 258 | /* ST */ |
| 259 | #if (defined(__STM32__)) && (defined(__STM32F4xx__)) |
| 260 | #include "mcu/st_stm32_stm32f4xx/inc/ee_mcu.h" |
| 261 | #endif |
| 262 | |
| 263 | /* NORDIC */ |
| 264 | #if (defined(__NORDIC__)) && (defined(__NRF51X22__)) |
| 265 | #include "mcu/nordic_nrf51x22/inc/ee_mcu.h" |
| 266 | #endif |
| 267 | |
| 268 | /* Renesas RX200*/ |
| 269 | #if (defined(__RX200__)) && (defined(__R5F5210x__)) |
| 270 | #include "mcu/renesas_r5f5210x/inc/ee_mcu.h" |
| 271 | #endif |
| 272 | |
| 273 | /* Renesas R7F701503 F1H */ |
| 274 | #if defined(__R7F701503__) |
| 275 | #include "mcu/renesas_r7f701503/inc/ee_mcu.h" |
| 276 | #endif |
| 277 | |
| 278 | /* Renesas R7F701057 F1L */ |
| 279 | #if defined(__R7F701057__) |
| 280 | #include "mcu/renesas_r7f701057/inc/ee_mcu.h" |
| 281 | #endif |
| 282 | |
| 283 | #if (defined(__TI__)) && (defined(__TMS570__)) |
| 284 | #include "mcu/ti_tms570/inc/ee_mcu.h" |
| 285 | #endif |
| 286 | |
| 287 | /* |
| 288 | * |
| 289 | * BOARD |
| 290 | * |
| 291 | */ |
| 292 | |
| 293 | /* Freescale */ |
| 294 | #if (defined(__MC9S12__)) || (defined(__HCS12XS__)) |
| 295 | #ifdef __DEMO9S12XSFAME__ |
| 296 | #include "board/hs12xs_demo9s12xsfame/inc/ee_board.h" |
| 297 | #endif |
| 298 | #ifdef __TWRS12G128__ |
| 299 | #include "board/twrs12g128/inc/ee_board.h" |
| 300 | #endif |
| 301 | #endif |
| 302 | |
| 303 | /* Atmel */ |
| 304 | #ifdef __ATMEL_STK50X__ |
| 305 | #include "board/atmel_stk500/inc/ee_board.h" |
| 306 | #endif |
| 307 | |
| 308 | #ifdef __XBOW_MIB5X0__ |
| 309 | #include "board/xbow_mib5x0/inc/ee_board.h" |
| 310 | #endif |
| 311 | |
| 312 | #ifdef __ARDUINO_UNO__ |
| 313 | #include "board/arduino_uno/inc/ee_board.h" |
| 314 | #endif |
| 315 | |
| 316 | #ifdef __ATMEL_STK600__ |
| 317 | #include "board/atmel_stk600/inc/ee_atmel_stk600_board.h" |
| 318 | #endif |
| 319 | |
| 320 | /* ARM */ |
| 321 | #ifdef __EVALUATOR7T__ |
| 322 | #include "board/arm_evaluator7t/inc/ee_board.h" |
| 323 | #endif |
| 324 | |
| 325 | #ifdef __UNIBO_MPARM__ |
| 326 | #include "board/unibo_mparm/inc/ee_board.h" |
| 327 | #endif |
| 328 | |
| 329 | #ifdef __TRISCENDA7S__ |
| 330 | #include "board/triscend_a7s/drivers.h" |
| 331 | #endif |
| 332 | |
| 333 | /* dsPIC */ |
| 334 | #ifdef __MICROCHIP_EXPLORER16__ |
| 335 | #include "board/microchip_explorer16/inc/ee_board.h" |
| 336 | #endif |
| 337 | |
| 338 | #ifdef __MICROCHIP_DSPICDEM11PLUS__ |
| 339 | #include "board/microchip_dspicdem11plus/inc/ee_board.h" |
| 340 | #endif |
| 341 | |
| 342 | #ifdef __EE_FLEX__ |
| 343 | #include "board/ee_flex/inc/ee_board.h" |
| 344 | #endif |
| 345 | |
| 346 | #ifdef __EE_MINIFLEX__ |
| 347 | #include "board/ee_miniflex/inc/ee_board.h" |
| 348 | #endif |
| 349 | |
| 350 | #ifdef __EE_FLEX32__ |
| 351 | #include "board/ee_flex32/inc/ee_board.h" |
| 352 | #endif |
| 353 | |
| 354 | /* PIC32 */ |
| 355 | #ifdef __IPERMOB_MB_PIC32__ |
| 356 | #include "board/ipermob_mb_pic32/inc/ee_board.h" |
| 357 | #endif |
| 358 | |
| 359 | #ifdef __IPERMOB_DB_PIC32__ |
| 360 | #include "board/ipermob_db_pic32/inc/ee_board.h" |
| 361 | #endif |
| 362 | |
| 363 | #ifdef __IPERMOB_BOARD_V2__ |
| 364 | #include "board/ipermob_board_v2/inc/ee_board.h" |
| 365 | #endif |
| 366 | |
| 367 | #ifdef __MICROCHIP_ESK__ |
| 368 | #include "board/microchip_esk/inc/ee_board.h" |
| 369 | #endif |
| 370 | |
| 371 | /* MICO32 */ |
| 372 | #ifdef __FPG_EYE__ |
| 373 | #include "board/fpg-eye/inc/ee_board.h" |
| 374 | #endif |
| 375 | |
| 376 | #ifdef __LATTICE_XP2_EV_BOARD__ |
| 377 | #include "board/lattice_xp2_ev_board/inc/ee_board.h" |
| 378 | #endif |
| 379 | |
| 380 | #ifdef __TC1796__ |
| 381 | #include "board/infineon_tc1796b/inc/ee_board.h" |
| 382 | #endif |
| 383 | |
| 384 | /* Infineon Applikation Kit */ |
| 385 | #if (defined(EE_TRICORE__)) && (defined(EE_APPKIT_TC2X5)) |
| 386 | #include "board/infineon_Applikation_Kit_TC2X5/inc/ee_board.h" |
| 387 | #endif |
| 388 | |
| 389 | #ifdef __ESI_RISC__ |
| 390 | #include "board/esi_risc/inc/ee_board.h" |
| 391 | #endif |
| 392 | |
| 393 | #ifdef __UTMOST__ |
| 394 | #include "board/utmost/inc/ee_board.h" |
| 395 | #endif |
| 396 | |
| 397 | #ifdef __MSP430_LAUNCHPAD__ |
| 398 | #include "board/msp430/launchpad/inc/ee_board.h" |
| 399 | #endif |
| 400 | |
| 401 | #ifdef __EE_EASYLAB__ |
| 402 | #include "board/ee_easylab/inc/ee_board.h" |
| 403 | #endif |
| 404 | |
| 405 | /* Stellaris */ |
| 406 | #if (defined(__STELLARIS__)) && (defined(__LM4F232xxxx__)) |
| 407 | #include "board/ti_stellaris_lm4f232xxxx/inc/ee_board.h" |
| 408 | #endif |
| 409 | |
| 410 | #ifdef __RSKRX210__ |
| 411 | #include "board/renesas_rskrx210/inc/ee_board.h" |
| 412 | #endif |
| 413 | |
| 414 | /* Nordic NRF51x22 */ |
| 415 | #ifdef __EE_NORDIC_PCA__ |
| 416 | #include "board/nordic_pca/inc/ee_board.h" |
| 417 | #endif |
| 418 | |
| 419 | /* TMS570 */ |
| 420 | #if (defined(__TI__)) && (defined(__TMS570__)) |
| 421 | #include "board/ti_tms570/inc/ee_board.h" |
| 422 | #endif |
| 423 | |
| 424 | /* Renesas RH850F1x StarterKit V2 */ |
| 425 | #ifdef __Y_ASK_RH850F1X_V2__ |
| 426 | #include "board/y_ask_rh850f1x_v2/inc/ee_board.h" |
| 427 | #endif |
| 428 | |
| 429 | /* |
| 430 | * |
| 431 | * Kernel |
| 432 | * |
| 433 | */ |
| 434 | |
| 435 | #ifdef __FP__ |
| 436 | #include "kernel/fp/inc/ee_kernel.h" |
| 437 | #endif |
| 438 | |
| 439 | #ifdef __EDF__ |
| 440 | #include "kernel/edf/inc/ee_kernel.h" |
| 441 | #endif |
| 442 | |
| 443 | #ifdef __FRSH__ |
| 444 | #ifdef __SEM_FRSH__ |
| 445 | #include "kernel/frsh/syncobj/inc/ee_sem.h" |
| 446 | #endif |
| 447 | #include "kernel/frsh/inc/ee_kernel.h" |
| 448 | #endif |
| 449 | |
| 450 | /* HR */ |
| 451 | #ifdef __HR__ |
| 452 | #include "kernel/hr/inc/ee_kernel.h" |
| 453 | #endif |
| 454 | |
| 455 | /* OO */ |
| 456 | #if (defined(__OO_BCC1__)) || (defined(__OO_BCC2__)) \ |
| 457 | || (defined(__OO_ECC1__)) || (defined(__OO_ECC2__)) || (defined(__AS_SC4__)) |
| 458 | #include "kernel/oo/inc/ee_oo_kernel.h" |
| 459 | #include "kernel/as/inc/ee_as_kernel.h" |
| 460 | /* Moved inline interrupt services inclusion here, because they need to see TP |
| 461 | * declarations */ |
| 462 | #include "kernel/oo/inc/ee_oo_inline.h" |
| 463 | |
| 464 | #ifdef EE_AS_IOC__ |
| 465 | #include "kernel/as/inc/ee_as_ioc.h" |
| 466 | /* WARNING |
| 467 | * The following file SHALL be generated by IOC Generator: if you are using |
| 468 | * Erika IOC implementation without a generator you MUST provide it in your |
| 469 | * project root. */ |
| 470 | #include "ioc_common.h" |
| 471 | #endif /* EE_AS_IOC__ */ |
| 472 | |
| 473 | #ifdef EE_AS_SCHEDULETABLES__ |
| 474 | #include "kernel/as/inc/ee_as_schedule_tables.h" |
| 475 | #endif /* EE_AS_SCHEDULETABLES__ */ |
| 476 | |
| 477 | #endif /* OO */ |
| 478 | |
| 479 | /* SEM */ |
| 480 | #ifdef __SEM__ |
| 481 | #include "kernel/sem/inc/ee_sem.h" |
| 482 | #endif |
| 483 | |
| 484 | /* ALARMS */ |
| 485 | #ifdef __ALARMS__ |
| 486 | #include "kernel/alarms/inc/ee_alarms.h" |
| 487 | #endif |
| 488 | |
| 489 | /* RN */ |
| 490 | #if (defined(__RN__)) || (defined(EE_AS_RPC__)) |
| 491 | #include "kernel/rn/inc/ee_rn.h" |
| 492 | #endif /* __RN__ || EE_AS_RPC__ */ |
| 493 | |
| 494 | /* |
| 495 | * |
| 496 | * API |
| 497 | * |
| 498 | */ |
| 499 | |
| 500 | #include "ee_api.h" |
| 501 | |
| 502 | /* |
| 503 | * |
| 504 | * IRQ |
| 505 | * |
| 506 | */ |
| 507 | |
| 508 | #include "ee_irq.h" |
| 509 | |
| 510 | /* Assert inclusion if enabled */ |
| 511 | #ifdef __ASSERT__ |
| 512 | #include "test/assert/inc/ee_assert.h" |
| 513 | #endif /* __ASSERT__ */ |
| 514 | |
| 515 | #if defined(__cplusplus) |
| 516 | }; |
| 517 | #endif |
| 518 | |
| 519 | #endif /* __INCLUDE_PKG_EE_H__ */ |