我是靠谱客的博主 矮小音响,最近开发中收集的这篇文章主要介绍Erika Enterprise RTOS学习笔记之环境创建1 Erika Enterprise RTOS简介2 开发环境,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

一目了然

  • 1 Erika Enterprise RTOS简介
    • 1.1 主要特性
    • 1.2 Erika Enterprise下载
  • 2 开发环境
    • 2.1 开发环境配置及使用
    • 2.2 开发环境简介
    • 2.3 工程文件介绍
    • 2.4 Erika Enterprise文档资料下载

1 Erika Enterprise RTOS简介

Erika Enterprise是一个免专利的汽车OSEK/VDX认证的硬实时操作系统(RTOS)。官网链接:http://www.erika-enterprise.com/

1.1 主要特性

Alt
最新版本介绍:
Alt
注意:虽然Erika Enterprise的V2和V3版本都支持多核芯片处理,但是V2版本需要在每一个核上各自运行一份Erika RTOS代码,这和FreeRTOS的多核应用是类似的;而V3版本则支持芯片内所有核共用一份Erika RTOS代码。

1.2 Erika Enterprise下载

Erika Enterprise下载链接地址:http://www.erika-enterprise.com/index.php/download/erika-v3-download.html,界面如下图所示:
Alt
选中其中的三个“Accept”选项后点击“Submit Form”按键进入到如下图所示界面:

Alt
开发人员可根据需要下载对应版本的开发环境。

2 开发环境

2.1 开发环境配置及使用

有关Erika Enterprise开发环境的配置和使用可参考官网提供的资料进行。
Quick start guide:
http://www.erika-enterprise.com/wiki/index.php?title=Quick_start_guide

Application example:
http://www.erika-enterprise.com/wiki/index.php?title=AVR8_-_Arduino_application_build_on_Windows

2.2 开发环境简介

按照官方提供Quick start guide完成配置后会在桌面生成IDE图标:
Alt

  • Eclipse系IDE,基于Workspace进行Project开发
  • 根据选用芯片直接生成工程例程
  • 与OSEK系统的使用类似,IDE中提供OIL(OSEK Implementation Language)文件设置界面
  • 系统的使用,包括CPU设定、任务创建、异步通信设置等在OIL文件中设置,通过IDE生成源码文件

ERIKA3 OIL specification链接:
http://www.erika-enterprise.com/wiki/index.php?title=ERIKA3_OIL_specification

2.3 工程文件介绍

以Infineon TC297芯片创建工程为例,工程文件目录如下图所示:
Alt
工程OIL文件(conf.oil)举例说明:

/* ###*B*###
 * Erika Enterprise, version 3
 * 
 * Copyright (C) 2017 - 2019 Evidence s.r.l.
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License, version 2, for more details.
 * 
 * You should have received a copy of the GNU General Public License,
 * version 2, along with this program; if not, see
 * <www.gnu.org/licenses/old-licenses/gpl-2.0.html >.
 * 
 * This program is distributed to you subject to the following
 * clarifications and special exceptions to the GNU General Public
 * License, version 2.
 * 
 * THIRD PARTIES' MATERIALS
 * 
 * Certain materials included in this library are provided by third
 * parties under licenses other than the GNU General Public License. You
 * may only use, copy, link to, modify and redistribute this library
 * following the terms of license indicated below for third parties'
 * materials.
 * 
 * In case you make modified versions of this library which still include
 * said third parties' materials, you are obligated to grant this special
 * exception.
 * 
 * The complete list of Third party materials allowed with ERIKA
 * Enterprise version 3, together with the terms and conditions of each
 * license, is present in the file THIRDPARTY.TXT in the root of the
 * project.
 * ###*E*### */

CPU test_application {

  OS EE {
    /* EE_OPT = "OS_EE_VERBOSE"; */
    EE_OPT = "OSEE_DEBUG";
    EE_OPT = "OSEE_ASSERT";
    EE_OPT = "OS_EE_APPL_BUILD_DEBUG";
    EE_OPT = "OS_EE_BUILD_DEBUG";
    //EE_OPT = "OSEE_TC_CLONE_OS";

    CPU_DATA = TRICORE {
      ID = 0x0;
      CPU_CLOCK = 200.0;
      COMPILER = GCC;
      IDLEHOOK = TRUE {
        HOOKNAME = "idle_hook_core0";
      };
    };

    CPU_DATA = TRICORE {
      ID = 0x1;
      MULTI_STACK = TRUE;
      IDLEHOOK = TRUE {
        HOOKNAME = "idle_hook_core1";
      };
    };

    CPU_DATA = TRICORE {
      ID = 0x2;
      IDLEHOOK = TRUE {
        HOOKNAME = "idle_hook_core2";
      };
    };

    MCU_DATA = TC27X {
      DERIVATIVE = "tc277tf";
      REVISION = "DC";
    };

    STATUS = EXTENDED;
    ERRORHOOK = TRUE;
    USERESSCHEDULER = FALSE;

    USEORTI = TRUE;

    KERNEL_TYPE = OSEK {
      CLASS = ECC1;
//      RQ    = MQ;
    };
  };

  APPDATA tricore_mc {
    APP_SRC="master.c";
    APP_SRC="slave1.c";
    APP_SRC="slave2.c";
  };

  TASK TaskMaster {
    CPU_ID = 0x0;
    PRIORITY = 1;
  };

  TASK TaskCpu0Remote {
    CPU_ID = 0x0;
    PRIORITY = 2;
  };

  TASK TaskSlave1 {
    CPU_ID = 0x1;
    PRIORITY = 1;
    AUTOSTART = TRUE;
    STACK = PRIVATE {
      SIZE = 256;
    };
    ACTIVATION = 1;
    SCHEDULE = FULL;
    EVENT = RemoteEvent;
  };

  TASK TaskSlave2 {
    CPU_ID = 0x2;
    PRIORITY = 1;
  };

  EVENT RemoteEvent  { MASK = AUTO; };

  COUNTER system_timer_master {
    CPU_ID = 0x0;
    MINCYCLE = 1;
    MAXALLOWEDVALUE = 2147483647;
    TICKSPERBASE = 1;
    TYPE = HARDWARE {
        DEVICE = "STM_SR0";
        SYSTEM_TIMER = TRUE;
        PRIORITY = 2;
    };
    SECONDSPERTICK = 0.01;
  };

  COUNTER system_timer_slave2 {
    CPU_ID = 0x2;
    MINCYCLE = 1;
    MAXALLOWEDVALUE = 2147483647;
    TICKSPERBASE = 1;
    TYPE = HARDWARE {
      DEVICE = "STM_SR0";
      SYSTEM_TIMER = TRUE;
      PRIORITY = 2;
    };
    SECONDSPERTICK = 0.01;
  };

  ALARM AlarmMaster_1s {
    COUNTER = system_timer_master;
    ACTION = ACTIVATETASK { TASK = TaskMaster; };
    AUTOSTART = TRUE { ALARMTIME = 100; CYCLETIME = 100; };
  };

  ALARM AlarmSlave2RemoteCPU0 {
    COUNTER = system_timer_slave2;
    ACTION = ACTIVATETASK { TASK = TaskCpu0Remote; };
  };
};

当配置使用芯片的多个核时,需在oil文件中对多个核进行设定:

CPU_DATA = TRICORE {
  ID = 0x0;
  CPU_CLOCK = 200.0;
  COMPILER = GCC;
  IDLEHOOK = TRUE {
    HOOKNAME = "idle_hook_core0";
  };
};

CPU_DATA = TRICORE {
  ID = 0x1;
  MULTI_STACK = TRUE;
  IDLEHOOK = TRUE {
    HOOKNAME = "idle_hook_core1";
  };
};

CPU_DATA = TRICORE {
  ID = 0x2;
  IDLEHOOK = TRUE {
    HOOKNAME = "idle_hook_core2";
  };
};

2.4 Erika Enterprise文档资料下载

收集的Erika Enterprise RTOS的文档资料包链接:
https://download.csdn.net/download/weixin_43986229/12881761

最后

以上就是矮小音响为你收集整理的Erika Enterprise RTOS学习笔记之环境创建1 Erika Enterprise RTOS简介2 开发环境的全部内容,希望文章能够帮你解决Erika Enterprise RTOS学习笔记之环境创建1 Erika Enterprise RTOS简介2 开发环境所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(42)

评论列表共有 0 条评论

立即
投稿
返回
顶部