From: Leos Mikulka Date: Tue, 19 Feb 2013 10:49:46 +0000 (+0100) Subject: Added an example of LED Blinker for the TMS570LS31x HDK X-Git-Url: http://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/07bbcb79799c461e4dc58be060a0c3e01f466c97 Added an example of LED Blinker for the TMS570LS31x HDK --- diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/Blinker.c b/boards/ti_tms570ls/examples/tms570_hdk_led/Blinker.c new file mode 100644 index 00000000..4c85b7ea --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/Blinker.c @@ -0,0 +1,19 @@ +/* + * Blinker.c + * + * Created on: 6 jul 2011 + * Author: tojo + */ + +#include "Rte_Blinker.h" + + +DigitalLevel Value = FALSE; + +void BlinkerRunnable() { + + Value = !Value; + + Rte_Call_Blinker_LED_Port_Set(Value); + +} diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/IoHwAb.c b/boards/ti_tms570ls/examples/tms570_hdk_led/IoHwAb.c new file mode 100644 index 00000000..0efde9de --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/IoHwAb.c @@ -0,0 +1,30 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * 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 + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +/* + * ---------------------------------------------------------------------------- + * NOTE: This file is a stub only. ECU software needs to provide a generated IO + * hardware abstraction module that overrides this file. + * ---------------------------------------------------------------------------- + */ + + +#include "IoHwAb.h" + + +void IoHwAb_Init( void ) { + +} diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/README b/boards/ti_tms570ls/examples/tms570_hdk_led/README new file mode 100644 index 00000000..0c8564f8 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/README @@ -0,0 +1,5 @@ +If you want to use BSW Builder to regenerate code, follow the steps: +1. Copy the contents of led_rte to a new project +2. Make sure BOARDDIR is set to mpc5516it (right click on your project select properties->C/C++ Build->Environment) +3. Load the interface definitions needed by IoHwAb (right click on your project select properties ->Arccore Tools->BSW Service components->IoHwAb select load) +4. Now you can regenerate code from BSW Builder \ No newline at end of file diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/Tasks.c b/boards/ti_tms570ls/examples/tms570_hdk_led/Tasks.c new file mode 100644 index 00000000..5053e252 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/Tasks.c @@ -0,0 +1,93 @@ +/* +* Configuration of module: Os (Tasks.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 2.0.34 +* +* Generated by Arctic Studio (http://arccore.com) +* on Wed Jul 06 17:58:25 CEST 2011 +*/ + +#include "Os.h" +#include "EcuM.h" + +// #define USE_LDEBUG_PRINTF // Uncomment this to turn debug statements on. +#include "debug.h" + + +// Tasks +void Startup( void ) { + + EcuM_StartupTwo(); + + TerminateTask(); +} + + +void OsIdle( void ) { + while(1); +} + + +// Hooks +#define ERROR_LOG_SIZE 20 + +struct LogBad_s { + uint32_t param1; + uint32_t param2; + uint32_t param3; + TaskType taskId; + OsServiceIdType serviceId; + StatusType error; +}; + +void ErrorHook ( StatusType Error ) { + + TaskType task; + static struct LogBad_s LogBad[ERROR_LOG_SIZE]; + static uint8_t ErrorCount = 0; + GetTaskID(&task); + OsServiceIdType service = OSErrorGetServiceId(); + + LDEBUG_PRINTF("## ErrorHook err=%d\n",Error); + + /* Log the errors in a buffer for later review */ + LogBad[ErrorCount].param1 = os_error.param1; + LogBad[ErrorCount].param2 = os_error.param2; + LogBad[ErrorCount].param3 = os_error.param3; + LogBad[ErrorCount].serviceId = service; + LogBad[ErrorCount].taskId = task; + LogBad[ErrorCount].error = Error; + + ErrorCount++; + + // Stall if buffer is full. + while(ErrorCount >= ERROR_LOG_SIZE); + +} + +void PostTaskHook ( void ) { + TaskType task; + GetTaskID(&task); + LDEBUG_PRINTF("## PreTaskHook, taskid=%d\n",task); +} + +void PreTaskHook ( void ) { + TaskType task; + GetTaskID(&task); + LDEBUG_PRINTF("## PreTaskHook, taskid=%d\n",task); +} + +void ShutdownHook ( StatusType Error ) { + LDEBUG_PRINTF("## ShutdownHook\n"); + while(1); +} + +void StartupHook ( void ) { + LDEBUG_PRINTF("## StartupHook\n"); +} diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/build_config.mk b/boards/ti_tms570ls/examples/tms570_hdk_led/build_config.mk new file mode 100644 index 00000000..5f47b5dc --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/build_config.mk @@ -0,0 +1,16 @@ + +# Version of build system +REQUIRED_BUILD_SYSTEM_VERSION=1.0.0 + +# Get configuration makefiles +-include ../config/*.mk +-include ../config/$(BOARDDIR)/*.mk + + +# Project settings + +SELECT_CONSOLE = RAMLOG + +SELECT_OPT = OPT_DEBUG + +CFG+=IOHWAB_USE_SERVICE_COMPONENT \ No newline at end of file diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Calibration_Settings.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Calibration_Settings.h new file mode 100644 index 00000000..058246ac --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Calibration_Settings.h @@ -0,0 +1,28 @@ +/* +* Configuration of module: Rte (Calibration_Settings.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Calibration_Settings.h */ + +#ifndef CALIBRATION_SETTINGS_H +#define CALIBRATION_SETTINGS_H + +#undef CALIBRATION_INITIALIZED_RAM + +#undef CALIBRATION_ENABLED + +#undef CALIBRATION_FLS_START + + + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Det_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Det_Cfg.h new file mode 100644 index 00000000..6daceffc --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Det_Cfg.h @@ -0,0 +1,37 @@ +/* +* Configuration of module: Det (Det_Cfg.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.1 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#if !(((DET_SW_MAJOR_VERSION == 1) && (DET_SW_MINOR_VERSION == 0)) ) +#error Det: Configuration file expected BSW module version to be 1.0.* +#endif + +/* + * Development Error Tracer driver + * + * Specification: Autosar v2.0.1, Final + * + */ +#ifndef DET_CFG_H +#define DET_CFG_H + +#define DET_ENABLE_CALLBACKS STD_OFF // Enable to use callback on errors +#define DET_USE_RAMLOG STD_ON // Enable to log DET errors to ramlog +#define DET_WRAP_RAMLOG STD_ON // The ramlog wraps around when reaching the end +#define DET_USE_STDERR STD_OFF // Enable to get DET errors on stderr +#define DET_DEINIT_API STD_OFF // Enable/Disable the Det_DeInit function +#define DET_RAMLOG_SIZE (16) // Number of entries in ramlog +#define DET_NUMBER_OF_CALLBACKS (5) // Number of callbacks + +#endif /* DET_CFG_H */ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Dio_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Dio_Cfg.h new file mode 100644 index 00000000..660a59f0 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Dio_Cfg.h @@ -0,0 +1,59 @@ +/* +* Configuration of module: Dio (Dio_Cfg.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.0 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#if !(((DIO_SW_MAJOR_VERSION == 1) && (DIO_SW_MINOR_VERSION == 0)) ) +#error Dio: Configuration file expected BSW module version to be 1.0.* +#endif + + +#ifndef DIO_CFG_H_ +#define DIO_CFG_H_ + +#include "Port.h" +#include "Std_Types.h" /** @req DIO131 */ + +// TODO - check if should change to STD_ON +#define DIO_VERSION_INFO_API STD_ON +#define DIO_DEV_ERROR_DETECT STD_OFF + +#define DIO_END_OF_LIST (-1u) + +// Physical ports +typedef enum +{ + DIO_PORT_A = 0, + DIO_PORT_B = 1, + DIO_PORT_N2HET1 = 2, +} Dio_PortTypesType; + + +// Channels +/** @req DIO015: Parameters of type Dio_ChannelType contain the numeric ID of a DIO channel */ +#define DIO_CHANNEL_NAME_LED_CHANNEL PORT_PIN_LED1 + +// Channel group + +// Ports +#define DIO_PORT_NAME_LED_PORT (DIO_PORT_N2HET1) + +// Pointers for convenience. +// Channels +extern const Dio_ChannelType DioChannelConfigData[]; +// Channel group +extern const Dio_ChannelGroupType DioConfigData[]; +// Port +extern const Dio_PortType DioPortConfigData[]; + +#endif /*DIO_CFG_H_*/ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Dio_Lcfg.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Dio_Lcfg.c new file mode 100644 index 00000000..fbbe3259 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Dio_Lcfg.c @@ -0,0 +1,42 @@ +/* +* Configuration of module: Dio (Dio_Lcfg.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.0 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + + +#include "Dio.h" +#include "Dio_Cfg.h" + +const Dio_ChannelType DioChannelConfigData[] = { + DIO_CHANNEL_NAME_LED_CHANNEL, + DIO_END_OF_LIST +}; + +const Dio_PortType DioPortConfigData[] = { + DIO_PORT_NAME_LED_PORT, + DIO_END_OF_LIST +}; + +const Dio_ChannelGroupType DioConfigData[] = { + { + .port = DIO_END_OF_LIST, + .offset = 0, + .mask = 0, + } +}; + + +uint32 Dio_GetPortConfigSize(void) +{ + return sizeof(DioConfigData); +} diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM.mk b/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM.mk new file mode 100644 index 00000000..b0af67ea --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM.mk @@ -0,0 +1,3 @@ + +MOD_USE += DET ECUM IOHWAB KERNEL PORT DIO MCU RTE + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM_Cfg.h new file mode 100644 index 00000000..064184ab --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM_Cfg.h @@ -0,0 +1,55 @@ +/* +* Configuration of module: EcuM (EcuM_Cfg.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.1.10 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#if !(((ECUM_SW_MAJOR_VERSION == 2) && (ECUM_SW_MINOR_VERSION == 0)) ) +#error EcuM: Configuration file expected BSW module version to be 2.0.* +#endif + + + +#ifndef ECUM_CFG_H_ +#define ECUM_CFG_H_ + +#define ECUM_VERSION_INFO_API STD_OFF +#define ECUM_DEV_ERROR_DETECT STD_OFF + +#define ECUM_MAIN_FUNCTION_PERIOD (200) +#define ECUM_NVRAM_READALL_TIMEOUT (10000) +#define ECUM_NVRAM_WRITEALL_TIMEOUT (10000) +#define ECUM_NVRAM_MIN_RUN_DURATION (10000) + +#define ECUM_VALIDATION_TIMEOUT 0 + +typedef enum { + ECUM_USER_User_1, + ECUM_USER_ENDMARK // Must be the last in list! +} EcuM_UserList; + +// EcuM Sleep Mode IDs +#define ECUM_SLEEP_MODE_EcuMSleepMode 0 +#define ECUM_SLEEP_MODE_CNT 1 + +typedef enum { + ECUM_WKSOURCE_POWER = (1<<0), + ECUM_WKSOURCE_RESET = (1<<1), + ECUM_WKSOURCE_INTERNAL_RESET = (1<<2), + ECUM_WKSOURCE_INTERNAL_WDG = (1<<3), + ECUM_WKSOURCE_EXTERNAL_WDG = (1<<4), + ECUM_WKSOURCE_ECUMWAKEUPSOURCE = (1<<5), + ECUM_WKSOURCE_ALL_SOURCES = 0x3FFFFFFF +} EcuM_WakeupSourceType ; + +#endif /*ECUM_CFG_H_*/ + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM_PBcfg.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM_PBcfg.c new file mode 100644 index 00000000..c0e2da89 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/EcuM_PBcfg.c @@ -0,0 +1,156 @@ +/* +* Configuration of module: EcuM (EcuM_PBcfg.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 2.1.10 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#include "EcuM.h" +#include "EcuM_Generated_Types.h" + +#if defined(USE_CANSM) +extern const CanSM_ConfigType CanSM_Config; +#endif +#if defined(USE_NM) +extern const Nm_ConfigType Nm_Config; +#endif +#if defined(USE_CANNM) +extern const CanNm_ConfigType CanNm_Config; +#endif +#if defined(USE_UDPNM) +extern const UdpNm_ConfigType UdpNm_Config; +#endif +#if defined(USE_COMM) +extern const ComM_ConfigType ComM_Config; +#endif + +#if defined(USE_J1939TP) +extern const J1939Tp_ConfigType J1939Tp_Config; +#endif + +#if defined(USE_WDGM) +const EcuM_WdgMType EcuM_WdgMConfig = { + .EcuMSupervisedEntity = NULL, + .EcuMWdgMWakeupMode = ECUM_SLEEP_MODE_WDGM_MODE_ILL, + .EcuMWdgMStartupMode = ECUM_SLEEP_MODE_WDGM_MODE_ILL, + .EcuMWdgMRunMode = ECUM_SLEEP_MODE_WDGM_MODE_ILL, + .EcuMWdgMPostRunMode = ECUM_SLEEP_MODE_WDGM_MODE_ILL, + .EcuMWdgMShutdownMode = ECUM_SLEEP_MODE_WDGM_MODE_ILL, +}; +#endif + +const EcuM_SleepModeType EcuM_SleepModeConfig[] = { + { // EcuMSleepMode + .EcuMSleepModeId = ECUM_SLEEP_MODE_EcuMSleepMode, + .EcuMWakeupSourceMask = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + //.EcuMSleepModeMcuMode = MCU_MODE_SLEEP, // mpc5516 + .EcuMSleepModeMcuMode = MCU_MODE_MCUMODESETTINGCONF +#if defined(USE_WDGM) + .EcuMSleepModeWdgMMode = ECUM_SLEEP_MODE_WDGM_MODE_ILL, +#endif + } +}; + +const EcuM_WakeupSourceConfigType EcuM_WakeupSourceConfig[] = { + { // EcuMWakeupSource + .EcuMWakeupSourceId = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + .EcuMWakeupSourcePolling = false, + .EcuMValidationTimeout = 0, +#if defined(USE_COMM) + .EcuMComMChannel = ECUM_COMM_CHANNEL_ILL, +#endif + } +}; + + +EcuM_ConfigType EcuMConfig = +{ + .EcuMDefaultShutdownTarget = ECUM_STATE_RESET, + .EcuMDefaultSleepMode = 0, // Don't care + .EcuMDefaultAppMode = OSDEFAULTAPPMODE, + .EcuMNvramReadAllTimeout = ECUM_NVRAM_READALL_TIMEOUT, + .EcuMNvramWriteAllTimeout = ECUM_NVRAM_WRITEALL_TIMEOUT, + .EcuMRunMinimumDuration = ECUM_NVRAM_MIN_RUN_DURATION, +#if defined(USE_WDGM) + .EcuMWdgMConfig = &EcuM_WdgMConfig, +#endif + .EcuMSleepModeConfig = EcuM_SleepModeConfig, + +#if defined(USE_MCU) + .McuConfig = McuConfigData, +#endif +#if defined(USE_PORT) + .PortConfig = &PortConfigData, +#endif +#if defined(USE_CAN) + .CanConfig = &CanConfigData, +#endif +#if defined(USE_CANIF) + .CanIfConfig = &CanIf_Config, +#endif +#if defined(USE_CANSM) + .CanSMConfig = &CanSM_Config, +#endif +#if defined(USE_CANNM) + .CanNmConfig = &CanNm_Config, +#endif +#if defined(USE_UDPNM) + .UdpNmConfig = &UdpNm_Config, +#endif +#if defined(USE_COM) + .ComConfig = &ComConfiguration, +#endif +#if defined(USE_COMM) + .ComMConfig = &ComM_Config, +#endif +#if defined(USE_J1939TP) + .J1939TpConfig = &J1939Tp_Config, +#endif +#if defined(USE_NM) + .NmConfig = &Nm_Config, +#endif +#if defined(USE_PDUR) + .PduRConfig = &PduR_Config, +#endif +#if defined(USE_J1939TP) + .J1939TpConfig = &J1939Tp_Config, +#endif +#if defined(USE_DMA) + .DmaConfig = DmaConfig, +#endif +#if defined(USE_ADC) + .AdcConfig = AdcConfig, +#endif +#if defined(USE_PWM) + .PwmConfig = &PwmConfig, +#endif +#if defined(USE_WDG) + .WdgConfig = &WdgConfig, +#endif +#if defined(USE_WDGM) + .WdgMConfig = &WdgMConfig, +#endif +#if defined(USE_WDGIF) + .WdgIfConfig = &WdgIfConfig, +#endif +#if defined(USE_GPT) + .GptConfig = GptConfigData, +#endif +#if defined(USE_FLS) + .FlashConfig = FlsConfigSet, +#endif +#if defined(USE_EEP) + .EepConfig = EepConfigData, +#endif +#if defined(USE_SPI) + .SpiConfig = &SpiConfigData, +#endif +}; diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Analog.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Analog.c new file mode 100644 index 00000000..3544cf5e --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Analog.c @@ -0,0 +1,35 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Analog.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/******************************************** Includes ********************************************/ + +#include "IoHwAb.h" +#include "IoHwAb_Internal.h" +/***************************************** Private macros *****************************************/ + +#define IOHWAB_ADC_MAX_MILLIVOLTS ( 5000 ) +#define IOHWAB_ADC_VALUE_OF( mV ) ( mV * ADC_MAX_VALUE / IOHWAB_ADC_MAX_MILLIVOLTS ) + +/***************************************** Signal states ******************************************/ + +/**************************************** Analog scalings *****************************************/ + +/***************************************** Analog inputs ******************************************/ + +/********************************** Parameterized analog inputs ***********************************/ + +/************************************** Adc group callbacks ***************************************/ + +/******************************************** Dcm Api *********************************************/ + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Analog.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Analog.h new file mode 100644 index 00000000..15f07245 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Analog.h @@ -0,0 +1,31 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Analog.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +#ifndef IOHWAB_ANALOG_H_ +#define IOHWAB_ANALOG_H_ + +#if !(((IOHWAB_SW_MAJOR_VERSION == 1) && (IOHWAB_SW_MINOR_VERSION == 0)) ) +#error IoHwAb: Configuration file expected BSW module version to be 1.0.* +#endif + +/****************************************** Analog types ******************************************/ + +/***************************************** Analog inputs ******************************************/ + +/********************************** Parameterized analog inputs ***********************************/ + +/************************************ Analog validation macros ************************************/ + + +#endif /* IOHWAB_ANALOG_H_ */ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Cbk.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Cbk.h new file mode 100644 index 00000000..e7398516 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Cbk.h @@ -0,0 +1,27 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Cbk.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 2.0.1 +* +* Generated by Arctic Studio (http://arccore.com) +* on Wed Jul 06 20:28:46 CEST 2011 +*/ + + +#ifndef _IOHWAB_CBK_H_ +#define _IOHWAB_CBK_H_ + +//void IoHwAb_Adc_Notification_(); + + +//void IoHwAb_Icu_Notification_(); + +//void IoHwAb_Gpt_Notification_(); + +#endif \ No newline at end of file diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Cfg.h new file mode 100644 index 00000000..46a651b5 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Cfg.h @@ -0,0 +1,25 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Cfg.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +#ifndef IOHWAB_CFG_H_ +#define IOHWAB_CFG_H_ + +#if !(((IOHWAB_SW_MAJOR_VERSION == 1) && (IOHWAB_SW_MINOR_VERSION == 0)) ) +#error IoHwAb: Configuration file expected BSW module version to be 1.0.* +#endif + +#define IOHWAB_DEV_ERROR_DETECT STD_OFF + + +#endif /* IOHWAB_CFG_H_ */ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Dcm.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Dcm.h new file mode 100644 index 00000000..ba647cc4 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Dcm.h @@ -0,0 +1,31 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Dcm.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +#ifndef IOHWAB_DCM_H_ +#define IOHWAB_DCM_H_ + +#if !(((IOHWAB_SW_MAJOR_VERSION == 1) && (IOHWAB_SW_MINOR_VERSION == 0)) ) +#error IoHwAb: Configuration file expected BSW module version to be 1.0.* +#endif + +#include "IoHwAb_Types.h" + +/******************************************** Digital *********************************************/ + +Std_ReturnType IoHwAb_Dcm_DigitalSignal_Led4(uint8 action, IoHwAb_LevelType value); + +/********************************************* Analog *********************************************/ + + +#endif /* IOHWAB_DCM_H_ */ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Digital.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Digital.c new file mode 100644 index 00000000..1b79a889 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Digital.c @@ -0,0 +1,128 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Digital.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +#include "IoHwAb.h" +#include "IoHwAb_Internal.h" +#if defined(USE_DIO) +#include "Dio.h" +#else + +#if defined(USE_DET) +#include "Det.h" +#endif + + +#error "DIO Module is needed by IOHWAB" +#endif +/************************************ External Device Drivers *************************************/ + +/***************************************** Signal states ******************************************/ + +boolean IoHwAb_DigitalSignal_Led4_Locked = IOHWAB_UNLOCKED; +IoHwAb_LevelType IoHwAb_DigitalSignal_Led4_Saved = IOHWAB_LOW; +const IoHwAb_LevelType IoHwAb_DigitalSignal_Led4_Default = IOHWAB_LOW; + +/**************************************** Digital outputs *****************************************/ + +/********************************** DigitalSignal_Led4 functions **********************************/ + +Std_ReturnType IoHwAb_Set_Digital_DigitalSignal_Led4(IoHwAb_LevelType newValue, IoHwAb_StatusType *status) { + Std_ReturnType rv = E_OK; + Dio_LevelType setLevel = 0; + IoHwAb_QualityType q = IOHWAB_GOOD; + + if (IOHWAB_UNLOCKED == IoHwAb_DigitalSignal_Led4_Locked) { + setLevel = (Dio_LevelType) newValue; + } else { + setLevel = (Dio_LevelType) IoHwAb_DigitalSignal_Led4_Saved; + } + + Dio_WriteChannel(DIO_CHANNEL_NAME_LED_CHANNEL, setLevel); + status->quality = q; + + return rv; +} + +Std_ReturnType IoHwAb_Dcm_DigitalSignal_Led4(uint8 action, IoHwAb_LevelType value) { + imask_t state; + Std_ReturnType rv = E_OK; + + switch (action) { + case IOHWAB_RETURNCONTROLTOECU: + IoHwAb_DigitalSignal_Led4_Locked = IOHWAB_UNLOCKED; + break; + + case IOHWAB_RESETTODEFAULT: + IoHwAb_LockSave(state); + IoHwAb_DigitalSignal_Led4_Saved = IoHwAb_DigitalSignal_Led4_Default; + IoHwAb_DigitalSignal_Led4_Locked = IOHWAB_LOCKED; + IoHwAb_LockRestore(state); + break; + + case IOHWAB_FREEZECURRENTSTATE: + if (IOHWAB_UNLOCKED == IoHwAb_DigitalSignal_Led4_Locked) { + IoHwAb_LockSave(state); + IoHwAb_DigitalSignal_Led4_Saved = Dio_ReadChannel(DIO_CHANNEL_NAME_LED_CHANNEL); + IoHwAb_DigitalSignal_Led4_Locked = IOHWAB_LOCKED; + IoHwAb_LockRestore(state); + } + break; + + case IOHWAB_SHORTTERMADJUST: + IoHwAb_LockSave(state); + IoHwAb_DigitalSignal_Led4_Saved = value; + IoHwAb_DigitalSignal_Led4_Locked = IOHWAB_LOCKED; + IoHwAb_LockRestore(state); + break; + + default: + rv = E_NOT_OK; + break; + } + + return rv; +} + +/***************************************** Digital inputs *****************************************/ + +/************************************* Parameterized digital **************************************/ + +Std_ReturnType IoHwAb_Set_Digital(IoHwAb_SignalType signal, IoHwAb_LevelType newValue, IoHwAb_StatusType *status) { + + IOHWAB_VALIDATE_RETURN(IOHWAB_SIGNAL_IS_VALID_DIGITAL_OUTPUT(signal), IOHWAB_DIGITAL_SET_ID, IOHWAB_E_PARAM_SIGNAL, E_NOT_OK); + + switch (signal) { + case IOHWAB_SIGNAL_DIGITALSIGNAL_LED4: { + return IoHwAb_Set_Digital_DigitalSignal_Led4(newValue, status); + } + break; + + default: { + return E_NOT_OK; + } + break; + } +} + +Std_ReturnType IoHwAb_Get_Digital(IoHwAb_SignalType signal, IoHwAb_LevelType *value, IoHwAb_StatusType *status) { + + IOHWAB_VALIDATE_RETURN(IOHWAB_SIGNAL_IS_VALID_DIGITAL_INPUT(signal), IOHWAB_DIGITAL_GET_ID, IOHWAB_E_PARAM_SIGNAL, E_NOT_OK); + + switch (signal) { + default: { + return E_NOT_OK; + } + } +} + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Digital.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Digital.h new file mode 100644 index 00000000..8d93f08b --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Digital.h @@ -0,0 +1,49 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Digital.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +#ifndef IOHWAB_DIGITAL_H_ +#define IOHWAB_DIGITAL_H_ + +#if !(((IOHWAB_SW_MAJOR_VERSION == 1) && (IOHWAB_SW_MINOR_VERSION == 0)) ) +#error IoHwAb: Configuration file expected BSW module version to be 1.0.* +#endif + +/**************************************** Digital outputs *****************************************/ + +#define IOHWAB_SIGNAL_DIGITALSIGNAL_LED4 0 // TODO - rename LED4?? +Std_ReturnType IoHwAb_SetDigitalSignal_Led4(IoHwAb_LevelType newValue, IoHwAb_StatusType *status); + +/***************************************** Digital inputs *****************************************/ + +/************************************* Parameterized digital **************************************/ + +Std_ReturnType IoHwAb_Set_Digital(IoHwAb_SignalType signal, IoHwAb_LevelType newValue, IoHwAb_StatusType *status); + +Std_ReturnType IoHwAb_Get_Digital(IoHwAb_SignalType signal, IoHwAb_LevelType *value, IoHwAb_StatusType *status); + +/*********************************** Digital validation macros ************************************/ + +#define IOHWAB_SIGNAL_COUNT_DIGITAL_OUTPUT 1 + +#define IOHWAB_SIGNAL_IS_VALID_DIGITAL_OUTPUT(signal) \ + (IOHWAB_SIGNAL_DIGITALSIGNAL_LED4 == signal) || \ + (FALSE) + +#define IOHWAB_SIGNAL_COUNT_DIGITAL_INPUT 0 + +#define IOHWAB_SIGNAL_IS_VALID_DIGITAL_INPUT(signal) \ + (FALSE) + + +#endif /* IOHWAB_DIGITAL_H_ */ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Pwm.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Pwm.c new file mode 100644 index 00000000..f640e750 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Pwm.c @@ -0,0 +1,44 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Pwm.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +#include "IoHwAb.h" +#include "IoHwAb_Internal.h" +/****************************************** Pwm outputs *******************************************/ + +/************************************ Parameterized Pwm output ************************************/ + +Std_ReturnType IoHwAb_Set_Duty(IoHwAb_SignalType signal, IoHwAb_DutyType duty, IoHwAb_StatusType *status) { + + IOHWAB_VALIDATE_RETURN(IOHWAB_SIGNAL_IS_VALID_PWM_DUTY_OUTPUT(signal), IOHWAB_PWMDUTY_SET_ID, IOHWAB_E_PARAM_SIGNAL, E_NOT_OK); + + switch (signal) { + default: { + return E_NOT_OK; + } + break; + } +} + +Std_ReturnType IoHwAb_Set_FrequencyAndDuty(IoHwAb_SignalType signal, IoHwAb_FrequencyType frequency, IoHwAb_DutyType duty, IoHwAb_StatusType *status) { + + IOHWAB_VALIDATE_RETURN(IOHWAB_SIGNAL_IS_VALID_PWM_FREQUENCYANDDUTY_OUTPUT(signal), IOHWAB_PWMFREQUENCYANDDUTY_SET_ID, IOHWAB_E_PARAM_SIGNAL, E_NOT_OK); + + switch (signal) { + default: { + return E_NOT_OK; + } + break; + } +} + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Pwm.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Pwm.h new file mode 100644 index 00000000..0aad53b8 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/IoHwAb_Pwm.h @@ -0,0 +1,41 @@ +/* +* Configuration of module: IoHwAb (IoHwAb_Pwm.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 3.1.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +#ifndef IOHWAB_PWM_H_ +#define IOHWAB_PWM_H_ + +#if !(((IOHWAB_SW_MAJOR_VERSION == 1) && (IOHWAB_SW_MINOR_VERSION == 0)) ) +#error IoHwAb: Configuration file expected BSW module version to be 1.0.* +#endif + +/****************************************** Pwm outputs *******************************************/ + +/************************************ Parameterized Pwm output ************************************/ + +Std_ReturnType IoHwAb_Set_Duty(IoHwAb_SignalType signal, IoHwAb_DutyType duty, IoHwAb_StatusType *status); +Std_ReturnType IoHwAb_Set_FrequencyAndDuty(IoHwAb_SignalType signal, IoHwAb_FrequencyType frequency, IoHwAb_DutyType duty, IoHwAb_StatusType *status); + +/************************************* Pwm validation macros **************************************/ + +#define IOHWAB_SIGNAL_COUNT_PWM_DUTY_OUTPUT 0 +#define IOHWAB_SIGNAL_COUNT_PWM_FREQUENCYANDDUTY_OUTPUT 0 + +#define IOHWAB_SIGNAL_IS_VALID_PWM_DUTY_OUTPUT(signal) \ + (FALSE) + +#define IOHWAB_SIGNAL_IS_VALID_PWM_FREQUENCYANDDUTY_OUTPUT(signal) \ + (FALSE) + + +#endif /* IOHWAB_PWM_H_ */ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Mcu_Cfg.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Mcu_Cfg.c new file mode 100644 index 00000000..0db1719d --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Mcu_Cfg.c @@ -0,0 +1,48 @@ +/* +* Configuration of module: Mcu (Mcu_Cfg.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#ifndef MCU_CFG_C_ +#define MCU_CFG_C_ + +#include "Mcu.h" + + +Mcu_RamSectorSettingConfigType Mcu_RamSectorSettingConfigData[] = { +}; + +Mcu_ClockSettingConfigType Mcu_ClockSettingConfigData[] = +{ + { + .McuClockReferencePointFrequency = 16000000UL, // try 160000000UL + .Pll1 = 4, // REFCLKDIV + .Pll2 = 100, // PLLMULT + .Pll3 = 2, // ODPLL + .Pll4 = 2, // PLLDIV // try 4 + }, +}; + + +const Mcu_ConfigType McuConfigData[] = { + { + .McuClockSrcFailureNotification = 0, + .McuRamSectors = MCU_NBR_OF_RAM_SECTIONS, + .McuClockSettings = 1, + .McuDefaultClockSettings = 0, + .McuClockSettingConfig = &Mcu_ClockSettingConfigData[0], + .McuRamSectorSettingConfig = &Mcu_RamSectorSettingConfigData[0], + } +}; + +#endif /*MCU_CFG_C_*/ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Mcu_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Mcu_Cfg.h new file mode 100644 index 00000000..093dbdb7 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Mcu_Cfg.h @@ -0,0 +1,51 @@ +/* +* Configuration of module: Mcu (Mcu_Cfg.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.3 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#if !(((MCU_SW_MAJOR_VERSION == 2) && (MCU_SW_MINOR_VERSION == 0)) ) +#error Mcu: Configuration file expected BSW module version to be 2.0.* +#endif + + +#ifndef MCU_CFG_H_ +#define MCU_CFG_H_ + + +#define MCU_DEV_ERROR_DETECT STD_OFF // switch to STD_ON?? +#define MCU_PERFORM_RESET_API STD_ON +#define MCU_VERSION_INFO_API STD_ON + + +typedef enum { + MCU_MODE_MCUMODESETTINGCONF = 0, + /*MCU_MODE_RUN = 0, + MCU_MODE_SLEEP = 1, */ // for MPC551x + MCU_MODE_NORMAL = 1 // Here for backwards compatibility reasons. Not used anymore. +} Mcu_ModeType; + + +typedef enum { + MCU_CLOCKTYPE_Clock = 0, + /*MCU_CLOCKTYPE_EXT_REF_80MHZ = 0, + MCU_CLOCKTYPE_EXT_REF_66MHZ = 1,*/ // for MPC551x + MCU_NBR_OF_CLOCKS, +} Mcu_ClockType; + + +#define MCU_NBR_OF_RAM_SECTIONS 0 + + +#define MCU_DEFAULT_CONFIG McuConfigData[0] + +#endif /*MCU_CFG_H_*/ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Os_Cfg.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Os_Cfg.c new file mode 100644 index 00000000..ae06b4c1 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Os_Cfg.c @@ -0,0 +1,154 @@ +/* +* Configuration of module: Os (Os_Cfg.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 2.0.34 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + + +#include "kernel.h" + + +// ############################### EXTERNAL REFERENCES ############################# + +/* Application externals */ + +/* Interrupt externals */ + + +// Set the os tick frequency +OsTickType OsTickFreq = 100; + + +// ############################### DEBUG OUTPUT ############################# +uint32 os_dbg_mask = 0; + +// ############################### APPLICATIONS ############################# +GEN_APPLICATION_HEAD = { + GEN_APPLICATION( + /* id */ APPLICATION_ID_OsApplication1, + /* name */ "OsApplication1", + /* trusted */ true, /* NOT CONFIGURABLE IN TOOLS */ + /* core */ 0, /* Default value, multicore not enabled.*/ + /* StartupHook */ NULL, + /* ShutdownHook */ NULL, + /* ErrorHook */ NULL, + /* rstrtTaskId */ 0 /* NOT CONFIGURABLE IN TOOLS */ + ), +}; +// ################################# COUNTERS ############################### +GEN_COUNTER_HEAD = { + GEN_COUNTER( + /* id */ COUNTER_ID_OsTick, + /* name */ "OsTick", + /* type */ COUNTER_TYPE_HARD, // HW counter + /* unit */ COUNTER_UNIT_NANO, + /* maxallowedvalue*/ 0xffff, + /* ticksperbase */ 1, + /* mincycle */ 1, + /* gpt_ch */ 0, + APPLICATION_ID_OsApplication1, /* Application owner */ + 1 /* Accessing application mask */ + ), +}; + + CounterType Os_Arc_OsTickCounter = COUNTER_ID_OsTick; + + +// ################################## ALARMS ################################ +GEN_ALARM_AUTOSTART(ALARM_ID_Alarm1, ALARM_AUTOSTART_ABSOLUTE, 50, 50, OSDEFAULTAPPMODE ); + + +GEN_ALARM_HEAD = { + GEN_ALARM( + /* id */ ALARM_ID_Alarm1, + /* name */ "Alarm1", + /* counter_id */ COUNTER_ID_OsTick, + /* autostart_ref*/ GEN_ALARM_AUTOSTART_NAME(ALARM_ID_Alarm1), + /* action_type */ ALARM_ACTION_SETEVENT, + /* action_task_id*/ TASK_ID_Scheduled, + /* action_event_id*/EVENT_MASK_ScheduleEvent, + /* action_counter_id*/0, + APPLICATION_ID_OsApplication1, /* Application owner */ + 1 /* Accessing application mask */ + ), +}; + +// ################################ RESOURCES ############################### + +// ############################## STACKS (TASKS) ############################ + +DECLARE_STACK(OsIdle,OS_OSIDLE_STACK_SIZE); + +DECLARE_STACK(Scheduled,2048); +DECLARE_STACK(Startup,2048); +/* DECLARE_STACK(BlinkerTask,2048); +DECLARE_STACK(MainFunctionTask,2048); +DECLARE_STACK(StartupTask,2048); +DECLARE_STACK(StepTask,2048); */ // ti_tms570ls/examples/rte_simple + +// ################################## TASKS ################################# +GEN_TASK_HEAD = { + GEN_BTASK( /* */OsIdle, + /* name */"OsIdle", + /* priority */0, + /* schedule */FULL, + /* autostart */TRUE, + /* resource_int_p */NULL, + /* resource mask */0, + /* activation lim. */1, + /* App owner */0, + /* Accessing apps */1 + ), + GEN_ETASK( + /* */Scheduled, + /* name */"Scheduled", + /* priority */1, + /* schedule */FULL, + /* name */TRUE, + /* resource_int_p */NULL, + /* resource mask */0, + /* event mask */1, + /* App owner */APPLICATION_ID_OsApplication1, + /* Accessing apps */1 + ), + GEN_BTASK( + /* */Startup, + /* name */"Startup", + /* priority */1, + /* schedule */FULL, + /* autostart */TRUE, + /* resource_int_p */NULL, + /* resource mask */0, + /* activation lim. */1, + /* App owner */APPLICATION_ID_OsApplication1, + /* Accessing apps */1 + ), +}; + +// ################################## HOOKS ################################# +GEN_HOOKS( + StartupHook, + NULL, + ShutdownHook, + ErrorHook, + PreTaskHook, + PostTaskHook +); + +// ################################## ISRS ################################## +GEN_ISR_MAP = { + 0, +}; + +// ############################ SCHEDULE TABLES ############################# + + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Os_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Os_Cfg.h new file mode 100644 index 00000000..24612f16 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Os_Cfg.h @@ -0,0 +1,121 @@ +/* +* Configuration of module: Os (Os_Cfg.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.34 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#if !(((OS_SW_MAJOR_VERSION == 2) && (OS_SW_MINOR_VERSION == 0)) ) +#error Os: Configuration file expected BSW module version to be 2.0.* +#endif + + + +#ifndef OS_CFG_H_ +#define OS_CFG_H_ + +// Application Id's +#define APPLICATION_ID_OsApplication1 0 + +// Alarm Id's +#define ALARM_ID_Alarm1 0 +/* #define ALARM_ID_BlinkerAlarm 0 +#define ALARM_ID_MainFunctionAlarm 1 +#define ALARM_ID_StepAlarm 2 */ // ti_tms570ls/examples/rte_simple + +// Counter Id's +#define COUNTER_ID_OsTick 0 +#define COUNTER_ID_Counter1 0 // ti_tms570ls/examples/rte_simple + +// System counter +#define OSMAXALLOWEDVALUE UINT_MAX// NOT CONFIGURABLE IN TOOLS +#define OSTICKSPERBASE 1 // NOT CONFIGURABLE IN TOOLS +#define OSMINCYCLE 1 // NOT CONFIGURABLE IN TOOLS +#define OSTICKDURATION 10000000UL // Time between ticks in nano seconds + +// Counter macros +#define OSMAXALLOWEDVALUE_OsTick OSMAXALLOWEDVALUE +#define OSTICKSPERBASE_OsTick 1 // NOT CONFIGURABLE IN TOOLS +#define OSMINCYCLE_OsTick 1 +#define OS_TICKS2SEC_OsTick(_ticks) ( (OSTICKDURATION * _ticks)/1000000000UL ) +#define OS_TICKS2MS_OsTick(_ticks) ( (OSTICKDURATION * _ticks)/1000000UL ) +#define OS_TICKS2US_OsTick(_ticks) ( (OSTICKDURATION * _ticks)/1000UL ) +#define OS_TICKS2NS_OsTick(_ticks) (OSTICKDURATION * _ticks) + + + +// Event masks +#define EVENT_MASK_ScheduleEvent 1 + +// Isr Id's + +// Resource Id's + +// Linked resource id's + +// Resource masks + +// Task Id's +#define TASK_ID_OsIdle 0 + +#define TASK_ID_Scheduled 1 +#define TASK_ID_Startup 2 +/* #define TASK_ID_BlinkerTask 1 +#define TASK_ID_MainFunctionTask 2 +#define TASK_ID_StartupTask 3 +#define TASK_ID_StepTask 4 */ // ti_tms570ls/examples/rte_simple ---> Task entry points are also different, but not included in comments here + +// Task entry points +void OsIdle( void ); +void Scheduled( void ); +void Startup( void ); + +// Schedule table id's + +// Stack size +#define OS_INTERRUPT_STACK_SIZE 2048 +#define OS_OSIDLE_STACK_SIZE 512 + +#define OS_ALARM_CNT 1 +#define OS_TASK_CNT 3 +#define OS_SCHTBL_CNT 0 +#define OS_COUNTER_CNT 1 +#define OS_EVENTS_CNT 1 +//#define OS_ISRS_CNT 0 +#define OS_RESOURCE_CNT 0 +#define OS_LINKED_RESOURCE_CNT 0 +#define OS_APPLICATION_CNT 1 +#define OS_SERVICE_CNT 0 /* ARCTICSTUDIO_GENERATOR_TODO */ +#define CFG_OS_DEBUG STD_OFF + +#define OS_SC1 STD_ON /* NOT CONFIGURABLE IN TOOLS */ +#define OS_USE_APPLICATIONS STD_ON +#define OS_USE_MEMORY_PROT STD_OFF /* NOT CONFIGURABLE IN TOOLS */ +#define OS_USE_TASK_TIMING_PROT STD_OFF /* NOT CONFIGURABLE IN TOOLS */ +#define OS_USE_ISR_TIMING_PROT STD_OFF /* NOT CONFIGURABLE IN TOOLS */ +//#define OS_SC3 STD_ON /* NOT CONFIGURABLE IN TOOLS */ +#define OS_STACK_MONITORING STD_ON +#define OS_STATUS_EXTENDED STD_ON +#define OS_USE_GET_SERVICE_ID STD_ON /* NOT CONFIGURABLE IN TOOLS */ +#define OS_USE_PARAMETER_ACCESS STD_ON /* NOT CONFIGURABLE IN TOOLS */ +#define OS_RES_SCHEDULER STD_ON /* NOT CONFIGURABLE IN TOOLS */ + +#define OS_ISR_CNT 0 +#define OS_ISR2_CNT 0 +#define OS_ISR1_CNT 0 + +#define OS_ISR_MAX_CNT 10 + +#define OS_NUM_CORES 1 + +//#define NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS 65 // already defined in files irq_types.h arc/arch/ + +#endif /*OS_CFG_H_*/ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Port_Cfg.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Port_Cfg.c new file mode 100644 index 00000000..a4bc1215 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Port_Cfg.c @@ -0,0 +1,40 @@ +/* +* Configuration of module: Port (Port_Cfg.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.2 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + + +#include "Port.h" + + + +const Port_ConfigType PortConfigData = +{ + .pins = { + { + .pin = PORT_PIN_LED1, + .conf = ( PORT_PIN_OUT | PORT_FUNC_NO | PORT_PULL_NONE), + .pinmux = PINMUX_BALL_B2_SHIFT, + .pinmuxFunctionNum = PINMUX_BALL_ALTERNATE2, + .pinmuxBaseNum = 0, + } + /* { + .pin = PORT_PIN_DCAN1_TX, + .conf = ( PORT_PIN_OUT | PORT_FUNC | PORT_PULL_NONE ), + }, + { + .pin = PORT_PIN_DCAN1_RX, + .conf = ( PORT_PIN_IN | 0 | PORT_PULL_NONE ), + }, */ + } +}; diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Port_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Port_Cfg.h new file mode 100644 index 00000000..d6f83ed5 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Port_Cfg.h @@ -0,0 +1,103 @@ +/* +* Configuration of module: Port (Port_Cfg.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 2.0.2 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + + +#if !(((PORT_SW_MAJOR_VERSION == 1) && (PORT_SW_MINOR_VERSION == 0)) ) +#error Port: Configuration file expected BSW module version to be 1.0.* +#endif + + +#ifndef PORT_CFG_H_ +#define PORT_CFG_H_ + +#include "Std_Types.h" + +// TODO - check if should change to STD_ON +/** Build version info API */ +#define PORT_VERSION_INFO_API STD_ON +/** Enable Development Error Trace */ +#define PORT_DEV_ERROR_DETECT STD_OFF +/** Build change pin direction API */ +#define PORT_SET_PIN_DIRECTION_API STD_ON +/** Allow Pin mode changes during runtime */ +#define PORT_SET_PIN_MODE_API STD_ON + +#define PORT_NUMBER_OF_PINS 1 + +#define PORT_FUNC_NO (0 << 1) +#define PORT_FUNC (1 << 1) +#define PORT_PULL_NONE (1 << 2) +#define PORT_PULL_UP (1 << 3) +#define PORT_PULL_DOWN (0 << 3) +#define PORT_ODE_ENABLE (1 << 4) +#define PORT_DIRECTION_CHANGEABLE (1 << 5) + +/** pins on the base PINMUX0 */ +/* TODO: add all remaining bases */ + +/* see TMS570LS31x Tech. Ref. Manual - 4.6. Signal Multiplexing and Control (pg. 240 - 243) */ +typedef enum +{ + PINMUX_BALL_W10_SHIFT = 0, // GIOB[3] - default function + PINMUX_BALL_A5_SHIFT = 8, // GIOA[0] - default function + PINMUX_BALL_C3_SHIFT = 16, // MIBSPI3NCS[3] - default function + PINMUX_BALL_B2_SHIFT = 24, // MIBSPI3NCS[2] - deafult function +} PinMux_Ball; + +typedef enum +{ + PINMUX_BALL_DEFAULT = 0x1, + PINMUX_BALL_ALTERNATE1 = 0x2, + PINMUX_BALL_ALTERNATE2 = 0x4, + PINMUX_BALL_ALTERNATE3 = 0x8, + PINMUX_BALL_ALTERNATE4 = 0x10 +} PinMux_FunctionNumber; + + +/** HW specific symbolic names of pins */ +/** @req PORT013, PORT076 */ +/** @req PORT219: Port_PinType shall be uint8, uint16 or uint32 */ +typedef enum +{ + PORT_PIN_DCAN1_TX = 0x0800, + PORT_PIN_DCAN1_RX = 0x0801, + PORT_PIN_LED1 = 0x021b, +} Port_PinType; + +/** Port pad mappings */ +#define PORT_PAD_106 0x0800 // PORT_PIN_DCAN1_TX +#define PORT_PAD_107 0x0801 // PORT_PIN_DCAN1_RX +#define PORT_PAD_3 0x0003 // PORT_PIN_LED1 + +typedef struct { + Port_PinType pin; + uint8 conf; + PinMux_Ball pinmux; + PinMux_FunctionNumber pinmuxFunctionNum; + uint16 pinmuxBaseNum; + +} Port_ConfiguredPinType; + +/** Top level configuration container */ +/** @req PORT073 */ +typedef struct +{ + const Port_ConfiguredPinType pins[PORT_NUMBER_OF_PINS]; +} Port_ConfigType; + +/** Instance of the top level configuration container */ +extern const Port_ConfigType PortConfigData; + + +#endif /*PORT_CFG_H_*/ diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte.c new file mode 100644 index 00000000..b2324ff5 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte.c @@ -0,0 +1,50 @@ +/* +* Configuration of module: Rte (Rte.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte.c */ +#include "Os.h" +#include "Rte_Type.h" +#include "Rte_Data.h" +#include +#include "Rte_Blinker_Internal.h" +#include "Rte_EcuAbstraction_Internal.h" + +void Rte_BlinkerRunnable() { + BlinkerRunnable(); +} + +Std_ReturnType Rte_DigitalOutput_Set(IoHwAb_SignalType SignalId, + const DigitalLevel value) { + Std_ReturnType retVal = DigitalOutput_Set(SignalId, value); + return retVal; +} + +Std_ReturnType Rte_Start() { + return RTE_E_OK; +} + +void Scheduled() { + EventMaskType eventMask = 0; + while (1) { + WaitEvent(EVENT_MASK_ScheduleEvent); + GetResource(RES_SCHEDULER); + GetEvent(TASK_ID_Scheduled, &eventMask); + ClearEvent(EVENT_MASK_ScheduleEvent); + ReleaseResource(RES_SCHEDULER); + if (eventMask & EVENT_MASK_ScheduleEvent) { + Rte_BlinkerRunnable(); + } + } +} + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte.mk b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte.mk new file mode 100644 index 00000000..1e08f2bc --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte.mk @@ -0,0 +1,5 @@ +obj-y += Rte.o +obj-y += Rte_Data.o +obj-y += Rte_Cbk.o +obj-y += Rte_Blinker.o +obj-y += Rte_EcuAbstraction.o diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker.c new file mode 100644 index 00000000..111d81d3 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker.c @@ -0,0 +1,25 @@ +/* +* Configuration of module: Rte (Rte_Blinker.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_Blinker.c */ +#include +#include "Os.h" +#include "Rte_Blinker.h" +#include "Rte_Data.h" +#include "Rte_EcuAbstraction.h" + +Std_ReturnType Rte_Call_Blinker_LED_Port_Set(const DigitalLevel value) { + return Rte_DigitalOutput_Set(0, value); +} + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker.h new file mode 100644 index 00000000..34f7bca5 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker.h @@ -0,0 +1,30 @@ +/* +* Configuration of module: Rte (Rte_Blinker.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_Blinker.h */ + +#ifndef RTE_BLINKER_H +#define RTE_BLINKER_H + +#include "Rte_Type.h" + +#define RTE_E_DigitalOutput_E_NOT_OK 1 + +#define Rte_Call_LED_Port_Set Rte_Call_Blinker_LED_Port_Set + +Std_ReturnType Rte_Call_Blinker_LED_Port_Set(const DigitalLevel value); + +void BlinkerRunnable(); + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker_Internal.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker_Internal.h new file mode 100644 index 00000000..52881d86 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Blinker_Internal.h @@ -0,0 +1,28 @@ +/* +* Configuration of module: Rte (Rte_Blinker_Internal.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_Blinker.h */ + +#ifndef RTE_BLINKER_H +#define RTE_BLINKER_H + +#include "Rte_Type.h" + +#define RTE_E_DigitalOutput_E_NOT_OK 1 + +Std_ReturnType Rte_Call_Blinker_LED_Port_Set(const DigitalLevel value); + +void BlinkerRunnable(); + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Cbk.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Cbk.c new file mode 100644 index 00000000..ae1fed33 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Cbk.c @@ -0,0 +1,18 @@ +/* +* Configuration of module: Rte (Rte_Cbk.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_Cbk.c */ +#include "Os.h" +#include "Rte_Data.h" + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Data.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Data.c new file mode 100644 index 00000000..465d7618 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Data.c @@ -0,0 +1,20 @@ +/* +* Configuration of module: Rte (Rte_Data.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_Data.c */ +#include "Os.h" +#include "Rte_Data.h" +#include "Rte_Type.h" +#include + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Data.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Data.h new file mode 100644 index 00000000..886096ab --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Data.h @@ -0,0 +1,28 @@ +/* +* Configuration of module: Rte (Rte_Data.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_Data.h */ + +#ifndef RTE_DATA_H +#define RTE_DATA_H + +#include "Rte_Type.h" +#include "cirq_buffer.h" + +void Rte_BlinkerRunnable(); + +Std_ReturnType Rte_DigitalOutput_Set(IoHwAb_SignalType SignalId, + const DigitalLevel value); + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction.c new file mode 100644 index 00000000..c1d10175 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction.c @@ -0,0 +1,20 @@ +/* +* Configuration of module: Rte (Rte_EcuAbstraction.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_EcuAbstraction.c */ +#include +#include "Os.h" +#include "Rte_EcuAbstraction.h" +#include "Rte_Data.h" + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction.h new file mode 100644 index 00000000..aa78a2ac --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction.h @@ -0,0 +1,30 @@ +/* +* Configuration of module: Rte (Rte_EcuAbstraction.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_EcuAbstraction.h */ + +#ifndef RTE_ECUABSTRACTION_H +#define RTE_ECUABSTRACTION_H + +#include "Rte_Type.h" + +#define RTE_E_DigitalOutput_E_NOT_OK 1 + +Std_ReturnType DigitalOutput_Set(IoHwAb_SignalType SignalId, + const DigitalLevel value); + +Std_ReturnType DigitalOutput_ReadBack(IoHwAb_SignalType SignalId, + DigitalLevel* value); + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction_Internal.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction_Internal.h new file mode 100644 index 00000000..a437f7f4 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_EcuAbstraction_Internal.h @@ -0,0 +1,30 @@ +/* +* Configuration of module: Rte (Rte_EcuAbstraction_Internal.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_EcuAbstraction.h */ + +#ifndef RTE_ECUABSTRACTION_H +#define RTE_ECUABSTRACTION_H + +#include "Rte_Type.h" + +#define RTE_E_DigitalOutput_E_NOT_OK 1 + +Std_ReturnType DigitalOutput_Set(IoHwAb_SignalType SignalId, + const DigitalLevel value); + +Std_ReturnType DigitalOutput_ReadBack(IoHwAb_SignalType SignalId, + DigitalLevel* value); + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Type.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Type.h new file mode 100644 index 00000000..3a11a0a8 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_Type.h @@ -0,0 +1,178 @@ +/* +* Configuration of module: Rte (Rte_Type.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): MPC551x +* +* Module vendor: ArcCore +* Generator version: 0.0.13 +* +* Generated by Arctic Studio (http://arccore.com) +*/ + +/* Rte_Type.h */ + +#ifndef RTE_TYPE_H +#define RTE_TYPE_H + +#include "Rte.h" + +typedef void * Rte_Instance; + +typedef boolean BooleanType; + +#define _DEFINED_TYPEDEF_FOR_Boolean_ + +typedef uint8 DigitalLevel; +#ifndef Low +#define Low ((DigitalLevel)0) +#endif /*Low*/ +#ifndef High +#define High ((DigitalLevel)1) +#endif /*High*/ +#define DigitalLevel_LowerLimit 0 +#define DigitalLevel_UpperLimit 1 + +#define _DEFINED_TYPEDEF_FOR_DigitalLevel_ + +typedef float Float; + +#define _DEFINED_TYPEDEF_FOR_Float_ + +typedef sint32 Hertz; +#define Hertz_LowerLimit -2147483647 +#define Hertz_UpperLimit 2147483647 + +#define _DEFINED_TYPEDEF_FOR_Hertz_ + +typedef uint16 IoHwAb_SignalType; +#define IoHwAb_SignalType_LowerLimit 0 +#define IoHwAb_SignalType_UpperLimit 65535 + +#define _DEFINED_TYPEDEF_FOR_IoHwAb_SignalType_ + +typedef sint32 MilliAmpere; +#define MilliAmpere_LowerLimit -2147483647 +#define MilliAmpere_UpperLimit 2147483647 + +#define _DEFINED_TYPEDEF_FOR_MilliAmpere_ + +typedef sint32 MilliOhm; +#define MilliOhm_LowerLimit -2147483647 +#define MilliOhm_UpperLimit 2147483647 + +#define _DEFINED_TYPEDEF_FOR_MilliOhm_ + +typedef sint32 MilliVolt; +#define MilliVolt_LowerLimit -2147483647 +#define MilliVolt_UpperLimit 2147483647 + +#define _DEFINED_TYPEDEF_FOR_MilliVolt_ + +typedef uint8 NvM_RequestResultType; +#ifndef NVM_REQ_OK +#define NVM_REQ_OK ((NvM_RequestResultType)0) +#endif /*NVM_REQ_OK*/ +#ifndef NVM_REQ_NOT_OK +#define NVM_REQ_NOT_OK ((NvM_RequestResultType)1) +#endif /*NVM_REQ_NOT_OK*/ +#ifndef NVM_REQ_PENDING +#define NVM_REQ_PENDING ((NvM_RequestResultType)2) +#endif /*NVM_REQ_PENDING*/ +#ifndef NVM_REQ_INTEGRITY_FAILED +#define NVM_REQ_INTEGRITY_FAILED ((NvM_RequestResultType)3) +#endif /*NVM_REQ_INTEGRITY_FAILED*/ +#ifndef NVM_REQ_BLOCK_SKIPPED +#define NVM_REQ_BLOCK_SKIPPED ((NvM_RequestResultType)4) +#endif /*NVM_REQ_BLOCK_SKIPPED*/ +#ifndef NVM_REQ_NV_INVALIDATED +#define NVM_REQ_NV_INVALIDATED ((NvM_RequestResultType)5) +#endif /*NVM_REQ_NV_INVALIDATED*/ + +#define _DEFINED_TYPEDEF_FOR_NvM_RequestResultType_ + +typedef sint32 Percent; +#define Percent_LowerLimit -2147483647 +#define Percent_UpperLimit 2147483647 + +#define _DEFINED_TYPEDEF_FOR_Percent_ + +typedef sint16 SInt16; +#define SInt16_LowerLimit -32768 +#define SInt16_UpperLimit 32767 + +#define _DEFINED_TYPEDEF_FOR_SInt16_ + +typedef sint32 SInt32; +#define SInt32_LowerLimit -2147483648 +#define SInt32_UpperLimit 2147483647 + +#define _DEFINED_TYPEDEF_FOR_SInt32_ + +typedef sint8 SInt8; +#define SInt8_LowerLimit -128 +#define SInt8_UpperLimit 127 + +#define _DEFINED_TYPEDEF_FOR_SInt8_ + +typedef uint8 SignalQuality; +#ifndef SignalQuality_InitialValue +#define SignalQuality_InitialValue ((SignalQuality)0) +#endif /*SignalQuality_InitialValue*/ +#ifndef SignalQuality_Error +#define SignalQuality_Error ((SignalQuality)1) +#endif /*SignalQuality_Error*/ +#ifndef SignalQuality_Bad +#define SignalQuality_Bad ((SignalQuality)2) +#endif /*SignalQuality_Bad*/ +#ifndef SignalQuality_Good +#define SignalQuality_Good ((SignalQuality)3) +#endif /*SignalQuality_Good*/ +#define SignalQuality_LowerLimit 0 +#define SignalQuality_UpperLimit 3 + +#define _DEFINED_TYPEDEF_FOR_SignalQuality_ + +typedef uint16 UInt16; +#define UInt16_LowerLimit 0 +#define UInt16_UpperLimit 65535 + +#define _DEFINED_TYPEDEF_FOR_UInt16_ + +typedef uint32 UInt32; +#define UInt32_LowerLimit 0 +#define UInt32_UpperLimit 4294967295 + +#define _DEFINED_TYPEDEF_FOR_UInt32_ + +typedef uint8 UInt8; +#define UInt8_LowerLimit 0 +#define UInt8_UpperLimit 255 + +#define _DEFINED_TYPEDEF_FOR_UInt8_ + +typedef UInt8 DstPtrType[1024]; + +#define _DEFINED_TYPEDEF_FOR_DstPtrType_ + +typedef uint8 Rte_ModeType_WdgMMode; +#define RTE_TRANSITION_WdgMMode ((Rte_ModeType_WdgMMode)5) +#define RTE_MODE_WdgMMode_ALIVE_OK ((Rte_ModeType_WdgMMode)3) +#define RTE_MODE_WdgMMode_ALIVE_FAILED ((Rte_ModeType_WdgMMode)2) +#define RTE_MODE_WdgMMode_ALIVE_EXPIRED ((Rte_ModeType_WdgMMode)1) +#define RTE_MODE_WdgMMode_ALIVE_STOPPED ((Rte_ModeType_WdgMMode)4) +#define RTE_MODE_WdgMMode_ALIVE_DEACTIVATED ((Rte_ModeType_WdgMMode)0) + +typedef struct { +} Rte_PDS_Blinker_DigitalOutput_P; +typedef struct { +} Rte_PDS_Blinker_DigitalOutput_R; + +typedef struct { +} Rte_PDS_EcuAbstraction_DigitalOutput_P; +typedef struct { +} Rte_PDS_EcuAbstraction_DigitalOutput_R; + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.c b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.c new file mode 100644 index 00000000..b8773655 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.c @@ -0,0 +1,23 @@ +/* +* Configuration of module: Rte (Rte_led_rte_ecuc_mpc5516_IoHwAbComponentType.c) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.9 +* +* Generated by Arctic Studio (http://arccore.com) +* on Wed Jul 06 20:28:46 CEST 2011 +*/ + +/* Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.c */ +#include +#include "Os.h" +#include "Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.h" +#include "Rte_Data.h" + +extern Rte_CDS_led_rte_ecuc_tms570ls_IoHwAbComponentType Rte_Inst_led_rte_ecuc_tms570ls_IoHwAbComponentType; // TODO - what is the purpose?? + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.h new file mode 100644 index 00000000..ba7b281c --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.h @@ -0,0 +1,34 @@ +/* +* Configuration of module: Rte (Rte_led_rte_ecuc_mpc5516_IoHwAbComponentType.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.9 +* +* Generated by Arctic Studio (http://arccore.com) +* on Wed Jul 06 20:28:46 CEST 2011 +*/ + + +#ifndef RTE_LED_RTE_ECUC_TMS570LS_IOHWABCOMPONENTTYPE_H +#define RTE_LED_RTE_ECUC_TMS570LS_IOHWABCOMPONENTTYPE_H + +#include "Rte_Type.h" + +/*Std_ReturnType IoHwAb_Write_LEDS_LED4(const BooleanType Value); + +Std_ReturnType IoHwAb_Read_LEDS_LED4(BooleanType* Value); + +Std_ReturnType IoHwAb_Write_LEDS_LED5(const BooleanType Value); + +Std_ReturnType IoHwAb_Read_LEDS_LED5(BooleanType* Value);*/ // mpc5516 + +Std_ReturnType IoHwAb_Write_LED_CHANNEL(const BooleanType Value); + +Std_ReturnType IoHwAb_Write_LED_CHANNEL(BooleanType* Value); + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType_Internal.h b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType_Internal.h new file mode 100644 index 00000000..a717302b --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/config/Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType_Internal.h @@ -0,0 +1,35 @@ +/* +* Configuration of module: Rte (Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType_Internal.h) +* +* Created by: +* Copyright: +* +* Configured for (MCU): TMS570 +* +* Module vendor: ArcCore +* Generator version: 0.0.9 +* +* Generated by Arctic Studio (http://arccore.com) +* on Wed Jul 06 20:28:46 CEST 2011 +*/ + +/* Rte_led_rte_ecuc_tms570ls_IoHwAbComponentType.h */ + +#ifndef RTE_LED_RTE_ECUC_TMS570LS_IOHWABCOMPONENTTYPE_H +#define RTE_LED_RTE_ECUC_TMS570LS_IOHWABCOMPONENTTYPE_H + +#include "Rte_Type.h" + +/*Std_ReturnType IoHwAb_Write_LEDS_LED4(const BooleanType Value); + +Std_ReturnType IoHwAb_Read_LEDS_LED4(BooleanType* Value); + +Std_ReturnType IoHwAb_Write_LEDS_LED5(const BooleanType Value); + +Std_ReturnType IoHwAb_Read_LEDS_LED5(BooleanType* Value);*/ // mpc5516 + +Std_ReturnType IoHwAb_Write_LED_CHANNEL(const BooleanType Value); + +Std_ReturnType IoHwAb_Write_LED_CHANNEL(BooleanType* Value); + +#endif diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_ecuc_mpc5516.arxml b/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_ecuc_mpc5516.arxml new file mode 100644 index 00000000..a5c6f7e4 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_ecuc_mpc5516.arxml @@ -0,0 +1,1204 @@ + + + + + led_rte_ecuc_mpc5516 + + + + + + + + led_rte_ecuc_mpc5516 + + + + + + + MPC551x + ${RESOURCE_LOC}/config + + + + /led_rte_extract_mpc5516it/led_rte_extract + /led_rte_ecuc_mpc5516/SwComposition_led_rte_ecuc_mpc5516 + + /led_rte_ecuc_mpc5516/EcuM + /led_rte_ecuc_mpc5516/IoHwAb + /led_rte_ecuc_mpc5516/Os + /led_rte_ecuc_mpc5516/Port + /led_rte_ecuc_mpc5516/Dio + /led_rte_ecuc_mpc5516/Mcu + /led_rte_ecuc_mpc5516/Rte + + + + SwComposition_led_rte_ecuc_mpc5516 + /led_rte_extract_mpc5516it/led_rte_extract + + + EcuM + + + + + true + 2.0.2 + + + + /ArcCore/EcuM + + + EcuMGeneral + /ArcCore/EcuM/EcuMGeneral + + + /ArcCore/EcuM/EcuMGeneral/EcuMDevErrorDetect + false + + + /ArcCore/EcuM/EcuMGeneral/EcuMIncludeNvramMgr + false + + + /ArcCore/EcuM/EcuMGeneral/EcuMVersionInfoApi + false + + + /ArcCore/EcuM/EcuMGeneral/EcuMMainFunctionPeriod + 0.2 + + + + + EcuMConfiguration + /ArcCore/EcuM/EcuMConfiguration + + + /ArcCore/EcuM/EcuMConfiguration/EcuMNvramReadallTimeout + 10.0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMRunMinimumDuration + 10.0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMNvramWriteallTimeout + 10.0 + + + + + User_1 + /ArcCore/EcuM/EcuMConfiguration/EcuMUserConfig + + + EcuMDefaultShutdownTarget + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultState + EcuMStateReset + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultSleepModeRef + + + + + EcuMSleepMode + + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeSuspend + false + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeMcuModeRef + /led_rte_ecuc_mpc5516/Mcu/McuModuleConfiguration/SLEEP + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMWakeupSourceMask + /led_rte_ecuc_mpc5516/EcuM/EcuMConfiguration/EcuMWakeupSource + + + + + EcuMWakeupSource + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMResetReason + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMValidationTimeout + 0.0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourceId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourcePolling + false + + + + + + + + + IoHwAb + + + + + true + 2.0.1 + + + + /ArcCore/IoHwAb + + + IoHwAbGeneral + /ArcCore/IoHwAb/IoHwAbGeneral + + + /ArcCore/IoHwAb/IoHwAbGeneral/IoHwAbDevErrorDetect + true + + + /ArcCore/IoHwAb/IoHwAbGeneral/IoHwAbUseRte + false + + + /ArcCore/IoHwAb/IoHwAbGeneral/IoHwAbAnalogMaxVoltage + 5.0 + + + + + DigitalSignal_Led4 + + + + + + /ArcCore/IoHwAb/IoHwAbDigitalSignal + + + /ArcCore/IoHwAb/IoHwAbDigitalSignal/IoHwAbDigitalMethod + IOHWAB_DIGITAL_WRITE + + + /ArcCore/IoHwAb/IoHwAbDigitalSignal/IoHwAbDigitalInverted + false + + + /ArcCore/IoHwAb/IoHwAbDigitalSignal/IoHwAbDigitalDefaultValue + IOHWAB_LOW + + + /ArcCore/IoHwAb/IoHwAbDigitalSignal/IoHwAbDigitalType + IOHWAB_DIO + + + + + /ArcCore/IoHwAb/IoHwAbDigitalSignal/IoHwAbDioChannelRef + /led_rte_ecuc_mpc5516/Dio/LED_PORT/LEDS_LED4 + + + + + + + Os + + + + + true + 2.0.34 + + + + /ArcCore/Os + + + OsOS + /ArcCore/Os/OsOS + + + /ArcCore/Os/OsOS/OsStackMonitoring + true + + + /ArcCore/Os/OsOS/OsStatus + EXTENDED + + + /ArcCore/Os/OsOS/OsUseGetServiceId + true + + + /ArcCore/Os/OsOS/OsUseParameterAccess + true + + + /ArcCore/Os/OsOS/OsUseResScheduler + true + + + /ArcCore/Os/OsOS/OsTickFrequency + 100 + + + /ArcCore/Os/OsOS/OsInterruptStackSize + 2048 + + + /ArcCore/Os/OsOS/OsIdleStackSize + 512 + + + /ArcCore/Os/OsOS/OsNumberOfCores + 1 + + + /ArcCore/Os/OsOS/ArcOsIsrMaxCount + 10 + + + /ArcCore/Os/OsOS/ArcCoreOsUseDebug + false + + + /ArcCore/Os/OsOS/ArcCoreOsDebugTask + false + + + /ArcCore/Os/OsOS/ArcCoreOsDebugAlarm + false + + + /ArcCore/Os/OsOS/ArcCoreOsDebugResource + false + + + /ArcCore/Os/OsOS/ArcCoreOsDebugScheduleTable + false + + + /ArcCore/Os/OsOS/ArcCoreOsDebugEvent + false + + + + + OsHooks + /ArcCore/Os/OsOS/OsHooks + + + /ArcCore/Os/OsOS/OsHooks/OsErrorHook + true + + + /ArcCore/Os/OsOS/OsHooks/OsPostTaskHook + true + + + /ArcCore/Os/OsOS/OsHooks/OsPreTaskHook + true + + + /ArcCore/Os/OsOS/OsHooks/OsProtectionHook + false + + + /ArcCore/Os/OsOS/OsHooks/OsShutdownHook + true + + + /ArcCore/Os/OsOS/OsHooks/OsStartupHook + true + + + + + + + Startup + + + + + + /ArcCore/Os/OsTask + + + /ArcCore/Os/OsTask/OsTaskActivation + 1 + + + /ArcCore/Os/OsTask/OsTaskPriority + 1 + + + /ArcCore/Os/OsTask/OsTaskProcessType + BASIC + + + /ArcCore/Os/OsTask/ArcCoreOsTaskStackSize + 2048 + + + /ArcCore/Os/OsTask/OsTaskSchedule + FULL + + + + + OsTaskAutostart + /ArcCore/Os/OsTask/OsTaskAutostart + + + + + Scheduled + + + + + + /ArcCore/Os/OsTask + + + /ArcCore/Os/OsTask/OsTaskActivation + 1 + + + /ArcCore/Os/OsTask/OsTaskPriority + 1 + + + /ArcCore/Os/OsTask/OsTaskProcessType + EXTENDED + + + /ArcCore/Os/OsTask/ArcCoreOsTaskStackSize + 2048 + + + /ArcCore/Os/OsTask/OsTaskSchedule + FULL + + + + + /ArcCore/Os/OsTask/OsTaskEventRef + /led_rte_ecuc_mpc5516/Os/ScheduleEvent + + + + + OsTaskAutostart + /ArcCore/Os/OsTask/OsTaskAutostart + + + + + OsTick + + + + + + /ArcCore/Os/OsCounter + + + /ArcCore/Os/OsCounter/OsCounterMaxAllowedValue + 65535 + + + /ArcCore/Os/OsCounter/OsCounterMinCycle + 1 + + + /ArcCore/Os/OsCounter/OsCounterTicksPerBase + 0 + + + /ArcCore/Os/OsCounter/OsCounterType + OS_TICK + + + + + OsApplication1 + + + + + + /ArcCore/Os/OsApplication + + + /ArcCore/Os/OsApplication/ArcOsAppCoreId + 0 + + + /ArcCore/Os/OsApplication/OsTrusted + false + + + + + /ArcCore/Os/OsApplication/OsAppCounterRef + /led_rte_ecuc_mpc5516/Os/OsTick + + + /ArcCore/Os/OsApplication/OsAppTaskRef + /led_rte_ecuc_mpc5516/Os/Startup + + + /ArcCore/Os/OsApplication/OsAppTaskRef + /led_rte_ecuc_mpc5516/Os/Scheduled + + + /ArcCore/Os/OsApplication/OsAppAlarmRef + /led_rte_ecuc_mpc5516/Os/Alarm1 + + + + + OsApplicationHooks + /ArcCore/Os/OsApplication/OsApplicationHooks + + + /ArcCore/Os/OsApplication/OsApplicationHooks/OsAppErrorHook + false + + + /ArcCore/Os/OsApplication/OsApplicationHooks/OsAppShutdownHook + false + + + /ArcCore/Os/OsApplication/OsApplicationHooks/OsAppStartupHook + false + + + + + + + Alarm1 + + + + + + /ArcCore/Os/OsAlarm + + + /ArcCore/Os/OsAlarm/OsAlarmCounterRef + /led_rte_ecuc_mpc5516/Os/OsTick + + + + + OsAlarmAutostart + /ArcCore/Os/OsAlarm/OsAlarmAutostart + + + /ArcCore/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime + 50 + + + /ArcCore/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType + ABSOLUTE + + + /ArcCore/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime + 50 + + + + + OsAlarmSetEvent + /ArcCore/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent + + + /ArcCore/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef + /led_rte_ecuc_mpc5516/Os/ScheduleEvent + + + /ArcCore/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef + /led_rte_ecuc_mpc5516/Os/Scheduled + + + + + + + ScheduleEvent + + + + + + /ArcCore/Os/OsEvent + + + /ArcCore/Os/OsEvent/ArcOsEventId + 0 + + + /ArcCore/Os/OsEvent/ArcOsEventAutoMask + true + + + + + + + Port + + + + + true + 2.0.2 + + + + /ArcCore/Port + + + PortConfigSet + /ArcCore/Port/PortConfigSet + + + LED_PORT + /ArcCore/Port/PortConfigSet/PortContainer + + + PD[4] + + + + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinPullMode + PULL_NONE + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinDirection + PORT_PIN_OUT + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinDirectionChangeable + false + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinHysteresisEnabled + false + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinOpenDrainEnabled + false + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinId + 52 + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinSlewRate + SLEW_RATE_MIN + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinLevelValue + PORT_PIN_LEVEL_LOW + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinMode + PORT_PIN_MODE_DIO + + + + + PD[5] + + + + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinPullMode + PULL_NONE + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinDirection + PORT_PIN_OUT + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinDirectionChangeable + false + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinHysteresisEnabled + false + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinOpenDrainEnabled + false + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinId + 53 + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinSlewRate + SLEW_RATE_MIN + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinLevelValue + PORT_PIN_LEVEL_LOW + + + /ArcCore/Port/PortConfigSet/PortContainer/PortPin/PortPinMode + PORT_PIN_MODE_DIO + + + + + + + + + PortGeneral + /ArcCore/Port/PortGeneral + + + /ArcCore/Port/PortGeneral/PortDevErrorDetect + true + + + /ArcCore/Port/PortGeneral/PortSetPinDirectionApi + true + + + /ArcCore/Port/PortGeneral/PortSetPinModeApi + true + + + /ArcCore/Port/PortGeneral/PortVersionInfoApi + true + + + + + + + Dio + + + + + true + 2.0.0 + + + + /ArcCore/Dio + + + DioGeneral + /ArcCore/Dio/DioGeneral + + + /ArcCore/Dio/DioGeneral/DioDevErrorDetect + true + + + /ArcCore/Dio/DioGeneral/DioVersionInfoApi + true + + + + + LED_PORT + + + + + + /ArcCore/Dio/DioPort + + + /ArcCore/Dio/DioPort/DioPortId + 0 + + + /ArcCore/Dio/DioPort/ArcCoreDioPhysicalPort + DIO_PORT_D + + + + + LEDS_LED4 + + + + + + /ArcCore/Dio/DioPort/DioChannel + + + /ArcCore/Dio/DioPort/DioChannel/DioChannelId + 52 + + + + + LEDS_LED5 + + + + + + /ArcCore/Dio/DioPort/DioChannel + + + /ArcCore/Dio/DioPort/DioChannel/DioChannelId + 53 + + + + + + + + + Mcu + + + + + true + 2.0.2 + + + + /ArcCore/Mcu + + + McuGeneralConfiguration + /ArcCore/Mcu/McuGeneralConfiguration + + + /ArcCore/Mcu/McuGeneralConfiguration/McuDevErrorDetect + true + + + /ArcCore/Mcu/McuGeneralConfiguration/McuPerformResetApi + true + + + /ArcCore/Mcu/McuGeneralConfiguration/McuVersionInfoApi + true + + + + + McuModuleConfiguration + /ArcCore/Mcu/McuModuleConfiguration + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSrcFailureNotification + DISABLED + + + /ArcCore/Mcu/McuModuleConfiguration/McuNumberOfMcuModes + 0 + + + /ArcCore/Mcu/McuModuleConfiguration/McuRamSectors + 1 + + + /ArcCore/Mcu/McuModuleConfiguration/McuResetSetting + 0 + + + + + McuClockSettingConfig + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuDefaultClockReference + /led_rte_ecuc_mpc5516/Mcu/McuModuleConfiguration/McuClockSettingConfig/EXT_REF_80MHZ + + + + + EXT_REF_80MHZ + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointFrequency + 8000000.0 + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllEprediv + 1 + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllEmfd + 104 + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllErfd + 5 + + + + + EXT_REF_66MHZ + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointFrequency + 1.6E7 + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllEprediv + 3 + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllEmfd + 83 + + + /ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllErfd + 5 + + + + + + + RUN + + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf/McuMode + 0 + + + + + SLEEP + + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf/McuMode + 0 + + + + + + + + + Rte + + + + + true + 0.0.9 + + + + /ArcCore/Rte + + + RteGeneration + /ArcCore/Rte/RteGeneration + + + /ArcCore/Rte/RteGeneration/RteCalibrationSupport + NONE + + + /ArcCore/Rte/RteGeneration/ArcGenerateWeakRunnableStubs + false + + + /ArcCore/Rte/RteGeneration/ArcCalibrationFlashStartAddress + 0 + + + /ArcCore/Rte/RteGeneration/RteGenerationMode + + + + /ArcCore/Rte/RteGeneration/RteMeasurementSupport + false + + + /ArcCore/Rte/RteGeneration/RteOptimizationMode + + + + /ArcCore/Rte/RteGeneration/RteVfbTrace + 0 + + + /ArcCore/Rte/RteGeneration/RteVfbTraceFunction + + + + + + Blinker_prototypeInstance + /ArcCore/Rte/SwComponentInstance + + + /ArcCore/Rte/SwComponentInstance/ArcGenerationEnabled + true + + + + + /ArcCore/Rte/SwComponentInstance/ImplementationRef + /led_rte_system_mpc5516it/BlinkerKit/BlinkerImplementation + + + /ArcCore/Rte/SwComponentInstance/SoftwareComponentInstanceRef + + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/Blinker_prototype + + + + + + BlinkerRunnable_RunnableMapping + + + + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/ActivationOffset + 0.0 + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/PositionInTask + 0 + + + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/RTEEventRef + /led_rte_system_mpc5516it/BlinkerKit/BlinkerBehavior/Blinker_timingEvent + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/MappedToTaskRef + /led_rte_ecuc_mpc5516/Os/Scheduled + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/UsedOsEventRef + /led_rte_ecuc_mpc5516/Os/ScheduleEvent + + + + + + + EcuAbstraction_prototypeInstance + /ArcCore/Rte/SwComponentInstance + + + /ArcCore/Rte/SwComponentInstance/ArcGenerationEnabled + true + + + + + /ArcCore/Rte/SwComponentInstance/ImplementationRef + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstractionImplementation + + + /ArcCore/Rte/SwComponentInstance/SoftwareComponentInstanceRef + + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/EcuAbstraction_prototype + + + + + + DigitalOutput_Set_RunnableMapping + + + + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/ActivationOffset + 0.0 + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/PositionInTask + 0 + + + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/RTEEventRef + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstractionBehaviour/DigitalSignal_Led4_Set_oie + + + + + DigitalOutput_ReadBack_RunnableMapping + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/ActivationOffset + 0.0 + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/PositionInTask + 0 + + + + + /ArcCore/Rte/SwComponentInstance/RunnableEntityMapping/RTEEventRef + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstractionBehaviour/DigitalSignal_Led4_ReadBack_oie + + + + + + + + + + + GeneratedIoHardwareAbstraction + + + EcuAbstraction + + + DigitalSignal_Led4 + /ArcCore/Services/IoHwAb/Interfaces/DigitalOutput + + + + + EcuAbstractionBehaviour + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstraction + + + DigitalSignal_Led4_Set_oie + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstractionBehaviour/DigitalOutput_Set + + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstraction/DigitalSignal_Led4 + /ArcCore/Services/IoHwAb/Interfaces/DigitalOutput/Set + + + + DigitalSignal_Led4_ReadBack_oie + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstractionBehaviour/DigitalOutput_ReadBack + + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstraction/DigitalSignal_Led4 + /ArcCore/Services/IoHwAb/Interfaces/DigitalOutput/ReadBack + + + + + + + + SignalId + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/IoHwAb_SignalType + 0 + + + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstraction/DigitalSignal_Led4 + + + + + DigitalOutput_Set + true + DigitalOutput_Set + + + DigitalOutput_ReadBack + true + DigitalOutput_ReadBack + + + + + EcuAbstractionImplementation + C + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstractionBehaviour + + + IoHwAb_SignalType + 0 + 65535 + + + + + + + + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_extract.arxml b/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_extract.arxml new file mode 100644 index 00000000..a9b7bcbd --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_extract.arxml @@ -0,0 +1,86 @@ + + + + + + /com_example/config + + + + + + led_rte_extract_mpc5516it + + + led_rte_extract + + led_rte_extract_mapping + + + Blinker_prototypeImplMapping + /led_rte_system_mpc5516it/BlinkerKit/BlinkerImplementation + + + /led_rte_extract_mpc5516it/led_rte_extract/led_rte_extract_softwareComposition + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/Blinker_prototype + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/Blinker_prototype + + + + + EcuAbstraction_prototypeImplMapping + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstractionImplementation + + + /led_rte_extract_mpc5516it/led_rte_extract/led_rte_extract_softwareComposition + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/EcuAbstraction_prototype + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/EcuAbstraction_prototype + + + + + + + led_rte_extract_softwareComposition + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition + + + + led_rte_extract_toplevelcomposition + + + Blinker_prototype + /led_rte_system_mpc5516it/BlinkerKit/Blinker + + + EcuAbstraction_prototype + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstraction + + + + + LED_Port_connector + + + + + FALSE + + + + + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/EcuAbstraction_prototype + /led_rte_ecuc_mpc5516/GeneratedIoHardwareAbstraction/EcuAbstraction/DigitalSignal_Led4 + + + /led_rte_extract_mpc5516it/led_rte_extract_toplevelcomposition/Blinker_prototype + /led_rte_system_mpc5516it/BlinkerKit/Blinker/LED_Port + + + + + + + + + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_system.arxml b/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_system.arxml new file mode 100644 index 00000000..09f06d73 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/led_rte_system.arxml @@ -0,0 +1,110 @@ + + + + + + /com_example/config + + + + + + led_rte_system_mpc5516it + + + + + + + + BlinkerKit + + + + + + + + Blinker + + + + + + + + LED_Port + + + + + + /ArcCore/Services/IoHwAb/Interfaces/DigitalOutput + + + + + BlinkerBehavior + + + + + + /led_rte_system_mpc5516it/BlinkerKit/Blinker + + + Blinker_timingEvent + + + + + + /led_rte_system_mpc5516it/BlinkerKit/BlinkerBehavior/BlinkerRunnable + 0.5 + + + + + BlinkerRunnable + + + + + + true + + + syncCallPoint_1 + + + + + + + + /led_rte_system_mpc5516it/BlinkerKit/Blinker/LED_Port + /ArcCore/Services/IoHwAb/Interfaces/DigitalOutput/Set + + + + + BlinkerRunnable + + + + + BlinkerImplementation + + + + + + /led_rte_system_mpc5516it/BlinkerKit/BlinkerBehavior + + + + + + + + diff --git a/boards/ti_tms570ls/examples/tms570_hdk_led/makefile b/boards/ti_tms570ls/examples/tms570_hdk_led/makefile new file mode 100644 index 00000000..99645901 --- /dev/null +++ b/boards/ti_tms570ls/examples/tms570_hdk_led/makefile @@ -0,0 +1,14 @@ + + +PROJECTNAME=led_rte_mpc5516it +ROOTDIR?=../../../.. +include $(ROOTDIR)/scripts/project_defaults.mk + +ifneq (${MAKELEVEL},0) + + # Project files (adds all .c files in project root) + PROJECT_C_FILES=$(notdir $(wildcard ../*.c)) + obj-y += $(PROJECT_C_FILES:%.c=%.o) + + +endif