Skip to content

Commit

Permalink
Added simple mpc5668 example
Browse files Browse the repository at this point in the history
  • Loading branch information
mahi committed Jan 20, 2012
1 parent 33d6ddd commit 4bc6f31
Show file tree
Hide file tree
Showing 8 changed files with 1,123 additions and 15 deletions.
193 changes: 193 additions & 0 deletions boards/mpc5668_gkit/board_mpc5668_gkit.arxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
<?xml version="1.0" encoding="UTF-8"?>
<AUTOSAR xmlns="http://autosar.org/3.1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/3.1.5 autosar_3-1-5.xsd">
<TOP-LEVEL-PACKAGES>
<AR-PACKAGE>
<SHORT-NAME>board_mpc5668_gkit</SHORT-NAME>
<ELEMENTS>
<ECU-CONFIGURATION UUID="fdb8e39b-2097-4c78-9a47-8d7d9b00a251">
<SHORT-NAME>board_mpc5668_gkit</SHORT-NAME>
<ADMIN-DATA>
<DOC-REVISIONS>
<DOC-REVISION />
</DOC-REVISIONS>
<SDGS>
<SDG GID="Arccore::EcuOptions">
<SD GID="MCU">MPC5668</SD>
<SD GID="GENDIR">${RESOURCE_LOC}</SD>
</SDG>
</SDGS>
</ADMIN-DATA>
<ECU-SW-COMPOSITION-REF DEST="ECU-SW-COMPOSITION">/board_mpc5668_gkit/SwComposition_board_mpc5668_gkit</ECU-SW-COMPOSITION-REF>
<MODULE-REFS>
<MODULE-REF DEST="MODULE-CONFIGURATION">/board_mpc5668_gkit/Port</MODULE-REF>
<MODULE-REF DEST="MODULE-CONFIGURATION">/board_mpc5668_gkit/Mcu</MODULE-REF>
</MODULE-REFS>
</ECU-CONFIGURATION>
<ECU-SW-COMPOSITION UUID="29c41547-dc90-42d5-b7fb-980a709dd799">
<SHORT-NAME>SwComposition_board_mpc5668_gkit</SHORT-NAME>
</ECU-SW-COMPOSITION>
<MODULE-CONFIGURATION UUID="4254b159-0cf1-4761-8f2b-4f213deedef8">
<SHORT-NAME>Port</SHORT-NAME>
<ADMIN-DATA>
<SDGS>
<SDG />
<SDG GID="Arccore::ModuleOptions">
<SD GID="GENERATE_AND_VALIDATE">true</SD>
<SD GID="ARCCORE_EDITOR_VERSION">2.0.2</SD>
</SDG>
</SDGS>
</ADMIN-DATA>
<DEFINITION-REF DEST="MODULE-DEF">/ArcCore/Port</DEFINITION-REF>
<CONTAINERS>
<CONTAINER UUID="d0730988-a63d-4398-a6ef-7fc90472c788">
<SHORT-NAME>PortConfigSet</SHORT-NAME>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Port/PortConfigSet</DEFINITION-REF>
<SUB-CONTAINERS>
<CONTAINER UUID="3dd5a2af-755c-45fb-a4e4-4a68b4751b94">
<SHORT-NAME>PortContainer_1</SHORT-NAME>
<ADMIN-DATA>
<SDGS>
<SDG GID="Arccore::IdentifiableOptions" />
</SDGS>
</ADMIN-DATA>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Port/PortConfigSet/PortContainer</DEFINITION-REF>
</CONTAINER>
</SUB-CONTAINERS>
</CONTAINER>
<CONTAINER UUID="eb1bffc7-d006-438f-8ebc-bc9f7a48805e">
<SHORT-NAME>PortGeneral</SHORT-NAME>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Port/PortGeneral</DEFINITION-REF>
<PARAMETER-VALUES>
<BOOLEAN-VALUE>
<DEFINITION-REF DEST="BOOLEAN-PARAM-DEF">/ArcCore/Port/PortGeneral/PortDevErrorDetect</DEFINITION-REF>
<VALUE>false</VALUE>
</BOOLEAN-VALUE>
<BOOLEAN-VALUE>
<DEFINITION-REF DEST="BOOLEAN-PARAM-DEF">/ArcCore/Port/PortGeneral/PortSetPinDirectionApi</DEFINITION-REF>
<VALUE>false</VALUE>
</BOOLEAN-VALUE>
<BOOLEAN-VALUE>
<DEFINITION-REF DEST="BOOLEAN-PARAM-DEF">/ArcCore/Port/PortGeneral/PortSetPinModeApi</DEFINITION-REF>
<VALUE>false</VALUE>
</BOOLEAN-VALUE>
<BOOLEAN-VALUE>
<DEFINITION-REF DEST="BOOLEAN-PARAM-DEF">/ArcCore/Port/PortGeneral/PortVersionInfoApi</DEFINITION-REF>
<VALUE>true</VALUE>
</BOOLEAN-VALUE>
</PARAMETER-VALUES>
</CONTAINER>
</CONTAINERS>
</MODULE-CONFIGURATION>
<MODULE-CONFIGURATION UUID="7d4d4f2f-5fe6-491c-9178-7c012333d4f4">
<SHORT-NAME>Mcu</SHORT-NAME>
<ADMIN-DATA>
<SDGS>
<SDG />
<SDG GID="Arccore::ModuleOptions">
<SD GID="GENERATE_AND_VALIDATE">true</SD>
<SD GID="ARCCORE_EDITOR_VERSION">2.0.3</SD>
</SDG>
</SDGS>
</ADMIN-DATA>
<DEFINITION-REF DEST="MODULE-DEF">/ArcCore/Mcu</DEFINITION-REF>
<CONTAINERS>
<CONTAINER UUID="6a518624-905b-4cd3-9eeb-019352d2bd6b">
<SHORT-NAME>McuGeneralConfiguration</SHORT-NAME>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Mcu/McuGeneralConfiguration</DEFINITION-REF>
<PARAMETER-VALUES>
<BOOLEAN-VALUE>
<DEFINITION-REF DEST="BOOLEAN-PARAM-DEF">/ArcCore/Mcu/McuGeneralConfiguration/McuDevErrorDetect</DEFINITION-REF>
<VALUE>false</VALUE>
</BOOLEAN-VALUE>
<BOOLEAN-VALUE>
<DEFINITION-REF DEST="BOOLEAN-PARAM-DEF">/ArcCore/Mcu/McuGeneralConfiguration/McuPerformResetApi</DEFINITION-REF>
<VALUE>true</VALUE>
</BOOLEAN-VALUE>
<BOOLEAN-VALUE>
<DEFINITION-REF DEST="BOOLEAN-PARAM-DEF">/ArcCore/Mcu/McuGeneralConfiguration/McuVersionInfoApi</DEFINITION-REF>
<VALUE>true</VALUE>
</BOOLEAN-VALUE>
</PARAMETER-VALUES>
</CONTAINER>
<CONTAINER UUID="dad41306-3c7b-4d89-8e01-ea2b31169c22">
<SHORT-NAME>McuModuleConfiguration</SHORT-NAME>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Mcu/McuModuleConfiguration</DEFINITION-REF>
<PARAMETER-VALUES>
<ENUMERATION-VALUE>
<DEFINITION-REF DEST="ENUMERATION-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSrcFailureNotification</DEFINITION-REF>
<VALUE>DISABLED</VALUE>
</ENUMERATION-VALUE>
<INTEGER-VALUE>
<DEFINITION-REF DEST="DERIVED-INTEGER-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuNumberOfMcuModes</DEFINITION-REF>
<VALUE>0</VALUE>
</INTEGER-VALUE>
<INTEGER-VALUE>
<DEFINITION-REF DEST="DERIVED-INTEGER-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuRamSectors</DEFINITION-REF>
<VALUE>1</VALUE>
</INTEGER-VALUE>
<INTEGER-VALUE>
<DEFINITION-REF DEST="INTEGER-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuResetSetting</DEFINITION-REF>
<VALUE>0</VALUE>
</INTEGER-VALUE>
</PARAMETER-VALUES>
<SUB-CONTAINERS>
<CONTAINER UUID="84472191-b207-48c4-943a-8d5f3b3fd5ba">
<SHORT-NAME>McuClockSettingConfig</SHORT-NAME>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig</DEFINITION-REF>
<REFERENCE-VALUES>
<REFERENCE-VALUE>
<DEFINITION-REF DEST="REFERENCE-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuDefaultClockReference</DEFINITION-REF>
<VALUE-REF DEST="CONTAINER">/board_mpc5668_gkit/Mcu/McuModuleConfiguration/McuClockSettingConfig/EXT_REF_112MHZ</VALUE-REF>
</REFERENCE-VALUE>
</REFERENCE-VALUES>
<SUB-CONTAINERS>
<CONTAINER UUID="f8fe5e22-4e8e-4c0e-9534-665bb66ae538">
<SHORT-NAME>EXT_REF_112MHZ</SHORT-NAME>
<ADMIN-DATA>
<SDGS>
<SDG GID="Arccore::IdentifiableOptions">
<SD GID="@ARCCORE_COMMENT">(extal * (emfd+16)) / ((prediv+1)*(erfd+1))</SD>
</SDG>
</SDGS>
</ADMIN-DATA>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint</DEFINITION-REF>
<PARAMETER-VALUES>
<FLOAT-VALUE>
<DEFINITION-REF DEST="FLOAT-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointFrequency</DEFINITION-REF>
<VALUE>4.0E7</VALUE>
</FLOAT-VALUE>
<INTEGER-VALUE>
<DEFINITION-REF DEST="INTEGER-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllEprediv</DEFINITION-REF>
<VALUE>9</VALUE>
</INTEGER-VALUE>
<INTEGER-VALUE>
<DEFINITION-REF DEST="INTEGER-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllEmfd</DEFINITION-REF>
<VALUE>40</VALUE>
</INTEGER-VALUE>
<INTEGER-VALUE>
<DEFINITION-REF DEST="INTEGER-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuClockSettingConfig/McuClockReferencePoint/McuClockReferencePointPllErfd</DEFINITION-REF>
<VALUE>1</VALUE>
</INTEGER-VALUE>
</PARAMETER-VALUES>
</CONTAINER>
</SUB-CONTAINERS>
</CONTAINER>
<CONTAINER UUID="981c619f-8c0e-448e-8ec9-c269a1cad94f">
<SHORT-NAME>McuModeSettingConf</SHORT-NAME>
<DEFINITION-REF DEST="PARAM-CONF-CONTAINER-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf</DEFINITION-REF>
<PARAMETER-VALUES>
<INTEGER-VALUE>
<DEFINITION-REF DEST="INTEGER-PARAM-DEF">/ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf/McuMode</DEFINITION-REF>
<VALUE>0</VALUE>
</INTEGER-VALUE>
</PARAMETER-VALUES>
</CONTAINER>
</SUB-CONTAINERS>
</CONTAINER>
</CONTAINERS>
</MODULE-CONFIGURATION>
</ELEMENTS>
</AR-PACKAGE>
</TOP-LEVEL-PACKAGES>
</AUTOSAR>

2 changes: 1 addition & 1 deletion boards/mpc5668_gkit/examples/os_simple/build_config.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


#CFG+=VLE
MOD_USE+= DET ECUM MCU KERNEL RAMLOG FLS DEM
MOD_USE+= DET ECUM MCU KERNEL RAMLOG
17 changes: 8 additions & 9 deletions boards/mpc5668_gkit/examples/os_simple/config/Mcu_Cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
* Created by:
* Copyright:
*
* Configured for (MCU): MPC551x
* Configured for (MCU): MPC5668
*
* Module vendor: ArcCore
* Generator version: 2.0.3
* Generator version: 2.0.2
*
* Generated by Arctic Studio (http://arccore.com)
* on Mon Jun 13 16:26:35 CEST 2011
*/


Expand All @@ -20,16 +19,16 @@
#include "Mcu.h"


Mcu_RamSectorSettingConfigType Mcu_RamSectorSettingConfigData[MCU_NBR_OF_RAM_SECTIONS] = {
Mcu_RamSectorSettingConfigType Mcu_RamSectorSettingConfigData[] = {
};

Mcu_ClockSettingConfigType Mcu_ClockSettingConfigData[] =
{
{
.McuClockReferencePointFrequency = 48000000UL,
.Pll1 = 9, // PREDIV
.Pll2 = 40, // EMFD
.Pll3 = 1, // ERFD
.McuClockReferencePointFrequency = 40000000UL,
.Pll1 = 9,
.Pll2 = 40,
.Pll3 = 1,
},
};

Expand All @@ -38,7 +37,7 @@ const Mcu_ConfigType McuConfigData[] = {
{
.McuClockSrcFailureNotification = 0,
.McuRamSectors = MCU_NBR_OF_RAM_SECTIONS,
.McuClockSettings = 2,
.McuClockSettings = 1,
.McuDefaultClockSettings = 0,
.McuClockSettingConfig = &Mcu_ClockSettingConfigData[0],
.McuRamSectorSettingConfig = &Mcu_RamSectorSettingConfigData[0],
Expand Down
11 changes: 6 additions & 5 deletions boards/mpc5668_gkit/examples/os_simple/config/Mcu_Cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
* Created by:
* Copyright:
*
* Configured for (MCU): MPC551x
* Configured for (MCU): MPC5668
*
* Module vendor: ArcCore
* Generator version: 2.0.3
* Generator version: 2.0.2
*
* Generated by Arctic Studio (http://arccore.com)
* on Mon Jun 13 16:26:35 CEST 2011
*/


Expand All @@ -22,13 +21,15 @@
#ifndef MCU_CFG_H_
#define MCU_CFG_H_

#include "mpc55xx.h"

#define MCU_DEV_ERROR_DETECT STD_ON

#define MCU_DEV_ERROR_DETECT STD_OFF
#define MCU_PERFORM_RESET_API STD_ON
#define MCU_VERSION_INFO_API STD_ON

typedef enum {
MCU_CLOCKTYPE_EXT_REF_40MHZ = 0,
MCU_CLOCKTYPE_EXT_REF_112MHZ = 0,
MCU_NBR_OF_CLOCKS,
} Mcu_ClockType;

Expand Down
Loading

0 comments on commit 4bc6f31

Please sign in to comment.