From d420ed93e2a62ce2c27d7069c0daf31f9263be59 Mon Sep 17 00:00:00 2001 From: joek Date: Wed, 22 Jun 2011 09:23:10 +0200 Subject: [PATCH] Integration of EA in build system and boards. --- boards/board_common.mk | 1 + boards/generic/EcuM_Callout_template.c | 2 +- boards/hcs12x_elmicro_tboard/build_config.mk | 2 +- boards/mpc5516it/build_config.mk | 2 +- boards/mpc5606s_xpc560s/build_config.mk | 2 +- memory/Ea/Ea.c | 8 ++++++-- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/boards/board_common.mk b/boards/board_common.mk index 15190cb5..44f344fc 100644 --- a/boards/board_common.mk +++ b/boards/board_common.mk @@ -42,6 +42,7 @@ vpath-$(USE_ECUM) += $(ROOTDIR)/system/EcuM #Ea obj-$(USE_EA) += Ea.o +obj-$(USE_EA) += Ea_Lcfg.o vpath-$(USE_EA) += $(ROOTDIR)/memory/Ea # Gpt diff --git a/boards/generic/EcuM_Callout_template.c b/boards/generic/EcuM_Callout_template.c index f3ed3fae..ea1f9bc3 100644 --- a/boards/generic/EcuM_Callout_template.c +++ b/boards/generic/EcuM_Callout_template.c @@ -192,7 +192,7 @@ void EcuM_AL_DriverInitTwo(const EcuM_ConfigType* ConfigPtr) #if defined(USE_EA) // Setup EA - Ea_init(); + Ea_Init(); #endif #if defined(USE_NVM) diff --git a/boards/hcs12x_elmicro_tboard/build_config.mk b/boards/hcs12x_elmicro_tboard/build_config.mk index 15ed15d9..59b21807 100644 --- a/boards/hcs12x_elmicro_tboard/build_config.mk +++ b/boards/hcs12x_elmicro_tboard/build_config.mk @@ -11,7 +11,7 @@ CFG=HC1X HCS12XD MC912XDP512 BRD_HCS12X_ELMICRO_TBOARD SIMULATOR # default or private (These become MOD_XXX=y ) MOD_AVAIL+=KERNEL MCU GPT DIO PORT COM CAN CANIF PWM ADC DEM DCM PDUR CANTP RTE IOHWAB DET ECUM RAMLOG # Network management -MOD_AVAIL+=COMM NM CANNM CANSM +MOD_AVAIL+=COMM NM CANNM CANSM NVM MEMIF EA FEE # Needed by us (These become USE_XXX=y and def-y += USE_XXX ) MOD_USE=KERNEL MCU diff --git a/boards/mpc5516it/build_config.mk b/boards/mpc5516it/build_config.mk index 5f5ba161..3e96f483 100644 --- a/boards/mpc5516it/build_config.mk +++ b/boards/mpc5516it/build_config.mk @@ -15,7 +15,7 @@ MOD_AVAIL+=ADC DIO DMA CAN GPT LIN MCU PORT PWM WDG NVM MEMIF FEE FLS SPI EEP # System + Communication + Diagnostic MOD_AVAIL+=CANIF CANTP COM DCM DEM DET ECUM IOHWAB KERNEL PDUR WDGM RTE # Network management -MOD_AVAIL+=COMM NM CANNM CANSM +MOD_AVAIL+=COMM NM CANNM CANSM EA # Additional MOD_AVAIL+= RAMLOG diff --git a/boards/mpc5606s_xpc560s/build_config.mk b/boards/mpc5606s_xpc560s/build_config.mk index 1078901a..bb4481a0 100644 --- a/boards/mpc5606s_xpc560s/build_config.mk +++ b/boards/mpc5606s_xpc560s/build_config.mk @@ -11,7 +11,7 @@ CFG=PPC E200Z0 MPC55XX MPC5606S BRD_MPC560X_XPC560S VLE # default or private # Memory + Peripherals -MOD_AVAIL+=ADC DIO DMA CAN GPT LIN MCU PORT PWM WDG NVM MEMIF FEE FLS SPI EEP +MOD_AVAIL+=ADC DIO DMA CAN GPT LIN MCU PORT PWM WDG NVM MEMIF FEE FLS SPI EEP EA # System + Communication + Diagnostic MOD_AVAIL+=CANIF CANTP COM DCM DEM DET ECUM IOHWAB KERNEL PDUR WDGM WDGIF RTE # Additional diff --git a/memory/Ea/Ea.c b/memory/Ea/Ea.c index c45ebe16..e509711f 100644 --- a/memory/Ea/Ea.c +++ b/memory/Ea/Ea.c @@ -123,7 +123,6 @@ typedef struct { const Ea_BlockConfigType *EaBlockConfig; const Ea_GeneralType *EaGeneralPtr; uint8 CurBlockIndex; - uint16 EaBlockBaseNum; MemIf_StatusType ModuleStatus; MemIf_JobResultType JobResult; Ea_JobType JobType; @@ -167,7 +166,6 @@ void Ea_Init(void) /*init internal variables*/ Ea_Global.EaBlockConfig = Ea_BlockConfigData; Ea_Global.EaGeneralPtr = &Ea_GeneralData; - Ea_Global.EaBlockBaseNum = Ea_BlockConfigData[0].EaBlockNumber >> NVM_DATASET_SEL_BITS; Ea_Global.JobResult = MEMIF_JOB_OK; Ea_Global.JobType = EA_JOB_NONE; Ea_Global.JobStatus = EA_PENDING_NONE; @@ -195,6 +193,8 @@ Std_ReturnType Ea_Read(uint16 BlockNumber, uint16 BlockOffset, uint8* DataBuffer const Ea_BlockConfigType *EaBlockCon; Std_ReturnType ReturnValue; + /*@req + */ /* Lock down the module to ourself */ imask_t mask = McuE_EnterCriticalSection(); if (Ea_Global.ModuleStatus != MEMIF_IDLE) @@ -258,6 +258,8 @@ Std_ReturnType Ea_Write(uint16 BlockNumber, uint8* DataBufferPtr) uint16 BlockIndex; const Ea_BlockConfigType *EaBlockCon; + /*@req + */ /* Lock down the module to ourself */ imask_t mask = McuE_EnterCriticalSection(); if (Ea_Global.ModuleStatus != MEMIF_IDLE) @@ -350,6 +352,8 @@ Std_ReturnType Ea_InvalidateBlock(uint16 BlockNumber) const Ea_BlockConfigType *EaBlockCon; Std_ReturnType ReturnValue; + /*@req + */ /* Lock down the module to ourself */ imask_t mask = McuE_EnterCriticalSection(); if (Ea_Global.ModuleStatus != MEMIF_IDLE) -- 2.39.2