From 08bd0e7b2d02fb0d79dd3ed45f9f85e4bc24a9a6 Mon Sep 17 00:00:00 2001 From: mahi Date: Mon, 2 Apr 2012 10:36:28 +0200 Subject: [PATCH] Mixed bug fixing.. --- arch/ppc/mpc55xx/drivers/Mcu.c | 2 ++ include/NvM_Types.h | 3 +++ include/Spi.h | 6 ++++++ makefile | 16 +++++++++------- memory/NvM/NvM.c | 1 + system/EcuM/EcuM_Main.c | 1 + 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/arch/ppc/mpc55xx/drivers/Mcu.c b/arch/ppc/mpc55xx/drivers/Mcu.c index a605cff4..a0f1e3dc 100644 --- a/arch/ppc/mpc55xx/drivers/Mcu.c +++ b/arch/ppc/mpc55xx/drivers/Mcu.c @@ -412,7 +412,9 @@ Std_ReturnType Mcu_InitClock(const Mcu_ClockType ClockSetting) FMPLL.ESYNCR1.B.EPREDIV = clockSettingsPtr->Pll1; FMPLL.ESYNCR1.B.EMFD = clockSettingsPtr->Pll2; +#if !defined(CFG_SIMULATOR) while(FMPLL.SYNSR.B.LOCK != 1) {}; +#endif FMPLL.ESYNCR2.B.ERFD = clockSettingsPtr->Pll3; // Connect SYSCLK to FMPLL diff --git a/include/NvM_Types.h b/include/NvM_Types.h index 4f70b2d4..e8799e89 100644 --- a/include/NvM_Types.h +++ b/include/NvM_Types.h @@ -27,6 +27,9 @@ #define NVM_TYPES_H_ #include "Std_Types.h" +#if (NVM_USE_SERVICE_PORTS==STD_ON) +#include "Rte_NvM.h" +#endif #if !defined(_DEFINED_TYPEDEF_FOR_NvM_RequestResultType_) typedef uint8 NvM_RequestResultType; /** @req NVM470 */ diff --git a/include/Spi.h b/include/Spi.h index 0b389c59..5fef937a 100644 --- a/include/Spi.h +++ b/include/Spi.h @@ -236,6 +236,10 @@ typedef enum { #include "Spi_Cfg.h" +#if (SPI_IMPLEMENTATION==SPI_DMA) +#include "dma.h" +#endif + // All data needed to configure one SPI-channel typedef struct Spi_ChannelConfig { @@ -361,11 +365,13 @@ typedef struct Spi_HwConfig /* This channel is to be activated for use. */ uint8 Activated; +#if (SPI_IMPLEMENTATION==SPI_DMA) /* Receive DMA channel. */ Dma_ChannelType RxDmaChannel; /* Transmit DMA channel. */ Dma_ChannelType TxDmaChannel; +#endif /* Peripheral clock source. */ // McuE_PeriperalClock_t PeripheralClock; diff --git a/makefile b/makefile index 2af6b8de..d1ff0a7d 100644 --- a/makefile +++ b/makefile @@ -126,7 +126,7 @@ help: @echo " BDIR = ${BDIR}" @echo " BOARDDIR = $(BOARDDIR)" @echo " CROSS_COMPILE = $(CROSS_COMPILE)" - @echo " CURDIR = $(CURDIR)" + @echo " CURDIR = $(CURDIR)" @echo "" @@ -136,10 +136,12 @@ test: show_build: @echo "" @echo "==========[ BUILD INFO ]===========" - @echo " BDIR: $(BDIR) [$(origin BDIR)]" - @echo " BOARDDIR: $(BOARDDIR) [$(origin BOARDDIR)]" - @echo " CROSS_COMPILE: $(CROSS_COMPILE) [$(origin CROSS_COMPILE)]" - @echo " CURDIR: $(CURDIR)" + @echo " BDIR: $(BDIR) [$(origin BDIR)]" + @echo " BOARDDIR: $(BOARDDIR) [$(origin BOARDDIR)]" + @echo " CROSS_COMPILE: $(CROSS_COMPILE) [$(origin CROSS_COMPILE)]" + @echo " CURDIR: $(CURDIR)" + @echo " SELECT_CONSOLE: $(SELECT_CONSOLE) [$(origin SELECT_CONSOLE)]" + $(dir_cmd_goals) :: show_build FORCE @@ -171,8 +173,8 @@ clean: $(dir_cmd_goals) @echo @echo " >> Cleaning $(CURDIR)" # $(Q)find . -type d -name $(objdir) | xargs rm -rf - $(Q)find . -type f -name *.a| xargs rm -rf - $(Q)rm -rf libs/* +# $(Q)find . -type f -name *.a | xargs rm -rf +# $(Q)rm -rf libs/* @echo @echo " >>>>>>>>> DONE <<<<<<<<<" @echo diff --git a/memory/NvM/NvM.c b/memory/NvM/NvM.c index 3288324e..ac8378b5 100644 --- a/memory/NvM/NvM.c +++ b/memory/NvM/NvM.c @@ -1175,6 +1175,7 @@ void NvM_GetErrorStatus(NvM_BlockIdType blockId, uint8 *requestResultPtr) *requestResultPtr = AdminMultiBlock.ErrorStatus; } else if (blockId == 1) { /* TODO */ + *requestResultPtr = NVM_REQ_OK; } else { *requestResultPtr = AdminBlock[blockId-1].ErrorStatus; } diff --git a/system/EcuM/EcuM_Main.c b/system/EcuM/EcuM_Main.c index d7bc05ef..e7fa41b8 100644 --- a/system/EcuM/EcuM_Main.c +++ b/system/EcuM/EcuM_Main.c @@ -15,6 +15,7 @@ //lint -emacro(904,VALIDATE,VALIDATE_RV,VALIDATE_NO_RV) //904 PC-Lint exception to MISRA 14.7 (validate macros). +#include "Std_Types.h" #if (ECUM_USE_SERVICE_PORTS==STD_ON) /* Rte_EcuM.h will include Rte_Type.h */ #include "Rte_EcuM.h" -- 2.39.2