summaryrefslogtreecommitdiff
path: root/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom
diff options
context:
space:
mode:
Diffstat (limited to 'examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom')
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/CMakeLists.txt134
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.bat5
-rwxr-xr-xexamples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.sh5
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.bat3
-rwxr-xr-xexamples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.sh3
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.bat3
-rwxr-xr-xexamples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.sh3
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.bat3
-rwxr-xr-xexamples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.sh3
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.cproject137
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.project86
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/hardware_init.c60
-rw-r--r--examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/main.c390
13 files changed, 835 insertions, 0 deletions
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/CMakeLists.txt
new file mode 100644
index 0000000..75ed945
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/CMakeLists.txt
@@ -0,0 +1,134 @@
+INCLUDE(CMakeForceCompiler)
+
+# CROSS COMPILER SETTING
+SET(CMAKE_SYSTEM_NAME Generic)
+CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
+
+# THE VERSION NUMBER
+SET (Tutorial_VERSION_MAJOR 1)
+SET (Tutorial_VERSION_MINOR 0)
+
+# ENABLE ASM
+ENABLE_LANGUAGE(ASM)
+
+SET(CMAKE_STATIC_LIBRARY_PREFIX)
+SET(CMAKE_STATIC_LIBRARY_SUFFIX)
+
+SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX)
+SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX)
+
+
+# CURRENT DIRECTORY
+SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR})
+
+# DEBUG LINK FILE
+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static")
+
+# RELEASE LINK FILE
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static")
+
+# DEBUG ASM FLAGS
+SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
+
+# DEBUG C FLAGS
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
+
+# DEBUG LD FLAGS
+SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs")
+
+# RELEASE ASM FLAGS
+SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
+
+# RELEASE C FLAGS
+SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Os -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
+
+# RELEASE LD FLAGS
+SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs")
+
+# ASM MACRO
+SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG")
+
+# C MACRO
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG")
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_MCIMX7D_M4")
+SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG")
+SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_MCIMX7D_M4")
+
+# CXX MACRO
+
+# INCLUDE_DIRECTORIES
+IF(CMAKE_BUILD_TYPE MATCHES Debug)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..)
+ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..)
+ENDIF()
+
+# ADD_EXECUTABLE
+ADD_EXECUTABLE(i2c_imx_interrupt_eeprom_example
+ "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S"
+ "${ProjDirPath}/../../../../../../platform/utilities/src/debug_console_imx.c"
+ "${ProjDirPath}/../../../../../../platform/utilities/inc/debug_console_imx.h"
+ "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.c"
+ "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_imx7d.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/lmem.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/wdog_imx.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_analog_imx7d.c"
+ "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_imx7d.c"
+ "${ProjDirPath}/../../../../../../platform/drivers/src/lmem.c"
+ "${ProjDirPath}/../../../../../../platform/drivers/src/rdc.c"
+ "${ProjDirPath}/../../../../../../platform/drivers/src/wdog_imx.c"
+ "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c"
+ "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h"
+ "${ProjDirPath}/../../../../pin_mux.c"
+ "${ProjDirPath}/../../../../pin_mux.h"
+ "${ProjDirPath}/../../../../board.c"
+ "${ProjDirPath}/../../../../board.h"
+ "${ProjDirPath}/../../../../clock_freq.c"
+ "${ProjDirPath}/../../../../clock_freq.h"
+ "${ProjDirPath}/../hardware_init.c"
+ "${ProjDirPath}/../main.c"
+ "${ProjDirPath}/../../../../../../platform/drivers/src/i2c_imx.c"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/i2c_imx.h"
+ "${ProjDirPath}/../../../../../../platform/drivers/src/uart_imx.c"
+ "${ProjDirPath}/../../../../../../platform/drivers/inc/uart_imx.h"
+)
+SET_TARGET_PROPERTIES(i2c_imx_interrupt_eeprom_example PROPERTIES OUTPUT_NAME "i2c_imx_interrupt_eeprom_example.elf")
+
+TARGET_LINK_LIBRARIES(i2c_imx_interrupt_eeprom_example -Wl,--start-group)
+# LIBRARIES
+IF(CMAKE_BUILD_TYPE MATCHES Debug)
+ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
+ENDIF()
+
+# SYSTEM LIBRARIES
+TARGET_LINK_LIBRARIES(i2c_imx_interrupt_eeprom_example m)
+TARGET_LINK_LIBRARIES(i2c_imx_interrupt_eeprom_example c)
+TARGET_LINK_LIBRARIES(i2c_imx_interrupt_eeprom_example gcc)
+TARGET_LINK_LIBRARIES(i2c_imx_interrupt_eeprom_example nosys)
+TARGET_LINK_LIBRARIES(i2c_imx_interrupt_eeprom_example -Wl,--end-group)
+
+# MAP FILE
+SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/i2c_imx_interrupt_eeprom_example.map")
+SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/i2c_imx_interrupt_eeprom_example.map")
+
+# BIN AND HEX
+ADD_CUSTOM_COMMAND(TARGET i2c_imx_interrupt_eeprom_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_eeprom_example.elf ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_eeprom_example.hex)
+ADD_CUSTOM_COMMAND(TARGET i2c_imx_interrupt_eeprom_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_eeprom_example.elf ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_eeprom_example.bin)
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.bat
new file mode 100644
index 0000000..0cf721f
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.bat
@@ -0,0 +1,5 @@
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug .
+mingw32-make -j4
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release .
+mingw32-make -j4
+pause
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.sh
new file mode 100755
index 0000000..3827529
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_all.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .
+make -j4
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .
+make -j4
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.bat
new file mode 100644
index 0000000..e9ccfdd
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.bat
@@ -0,0 +1,3 @@
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug .
+mingw32-make -j4
+pause
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.sh
new file mode 100755
index 0000000..effd076
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_debug.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .
+make -j4
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.bat
new file mode 100644
index 0000000..0759349
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.bat
@@ -0,0 +1,3 @@
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release .
+mingw32-make -j4
+pause
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.sh
new file mode 100755
index 0000000..a12067d
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/build_release.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .
+make -j4
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.bat
new file mode 100644
index 0000000..ffea088
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.bat
@@ -0,0 +1,3 @@
+RD /s /Q Debug Release CMakeFiles
+DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt
+pause
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.sh
new file mode 100755
index 0000000..795ad87
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/armgcc/clean.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+rm -rf debug release CMakeFiles
+rm -rf Makefile cmake_install.cmake CMakeCache.txt
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.cproject
new file mode 100644
index 0000000..2aa5c96
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.cproject
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.arm.eclipse.build.config.baremetal.exe.debug.893051445.1002809623">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.arm.eclipse.build.config.baremetal.exe.debug.893051445.1002809623" moduleId="org.eclipse.cdt.core.settings" name="debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.arm.eclipse.builder.armcc.error" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="com.arm.eclipse.build.artefact.baremetal.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=com.arm.eclipse.build.artefact.baremetal.exe" cleanCommand="clean" description="" id="com.arm.eclipse.build.config.baremetal.exe.debug.893051445.1002809623" name="debug" parent="com.arm.eclipse.build.config.baremetal.exe.debug" postbuildStep="fromelf --bincombined --output=${ProjName}.bin ${ProjName}.axf">
+ <folderInfo id="com.arm.eclipse.build.config.baremetal.exe.debug.893051445.1002809623." name="/" resourcePath="">
+ <toolChain errorParsers="com.arm.eclipse.builder.armcc.error" id="com.arm.toolchain.baremetal.exe.debug.505048968" name="ARM Compiler" nonInternalBuilderId="com.arm.toolchain.baremetal.builder" superClass="com.arm.toolchain.baremetal.exe.debug">
+ <targetPlatform binaryParser="" id="com.arm.toolchain.baremetal.exe.debug.505048968.350348883" name=""/>
+ <builder autoBuildTarget="all" buildPath="${workspace_loc:/app/debug}" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.38020294" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
+ <tool command="armcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="" id="com.arm.tool.c.compiler.baremetal.exe.debug.1725848509" name="ARM C Compiler" superClass="com.arm.tool.c.compiler.baremetal.exe.debug">
+ <option id="com.arm.tool.c.compiler.option.incpath.349366493" name="Include path (-I)" superClass="com.arm.tool.c.compiler.option.incpath"><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/CMSIS/Include"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/devices"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/drivers/inc"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/utilities/inc"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../.."/></option>
+ <option id="com.arm.tool.c.compiler.option.defmac.1627388367" name="Define macro (-D)" superClass="com.arm.tool.c.compiler.option.defmac"><listOptionValue builtIn="false" value="__DEBUG"/><listOptionValue builtIn="false" value="CPU_MCIMX7D_M4"/></option>
+ <option id="com.arm.tool.c.compiler.option.targetcpu.1309268616" name="Target CPU (--cpu)" superClass="com.arm.tool.c.compiler.option.targetcpu" value="Cortex-M4" valueType="string"/>
+ <option id="com.arm.tool.c.compiler.option.targetfpu.1098489790" name="Target FPU (--fpu)" superClass="com.arm.tool.c.compiler.option.targetfpu" value="FPv4-SP" valueType="string"/>
+ <option id="com.arm.tool.c.compiler.option.fpmode.1539082142" name="Floating-point mode (--fpmode)" superClass="com.arm.tool.c.compiler.option.fpmode" value="com.arm.tool.c.compiler.option.fpmode.default" valueType="enumerated"/>
+ <option id="com.arm.tool.c.compiler.option.fppcs.928968199" name="Floating-point PCS (--apcs)" superClass="com.arm.tool.c.compiler.option.fppcs" value="com.arm.tool.c.compiler.option.fppcs.auto" valueType="enumerated"/>
+ <option id="com.arm.tool.c.compiler.option.flags.49715708" name="Other flags" superClass="com.arm.tool.c.compiler.option.flags" value="--c99 --split_sections " valueType="string"/>
+ <option id="com.arm.tool.c.compiler.options.debug.enabled.652416105" name="Enable debug (-g)" superClass="com.arm.tool.c.compiler.options.debug.enabled" value="true" valueType="boolean"/>
+ <option id="com.arm.tool.assembler.option.preproc.664063762" name="Preprocess input before assembling (--cpreproc)" superClass="com.arm.tool.assembler.option.preproc" value="false" valueType="boolean"/>
+ <option id="com.arm.tool.c.compiler.option.endian.2486374826" name="Byte order" superClass="com.arm.tool.c.compiler.option.endian" value="com.arm.tool.c.compiler.option.endian.auto" valueType="enumerated"/>
+ <inputType id="com.arm.tool.c.compiler.input.1814530651" superClass="com.arm.tool.c.compiler.input"/>
+ <inputType id="com.arm.tool.cpp.compiler.input.988841684" superClass="com.arm.tool.cpp.compiler.input"/>
+ <option id="com.arm.tool.c.compiler.option.gnu.4605410937" superClass="com.arm.tool.c.compiler.option.gnu" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.charsize.1764499398" superClass="com.arm.tool.c.compiler.option.charsize" valueType="enumerated" value="com.arm.tool.c.compiler.option.enum.auto"/><option id="com.arm.tool.c.compiler.baremetal.exe.debug.base.option.opt.8355686714" superClass="com.arm.tool.c.compiler.baremetal.exe.debug.base.option.opt" valueType="enumerated" value="com.arm.tool.c.compiler.option.optlevel.min"/><option id="com.arm.tool.c.compiler.option.optfor.7767292240" superClass="com.arm.tool.c.compiler.option.optfor" valueType="enumerated" value="com.arm.tool.c.compiler.option.optfor.auto"/><option id="com.arm.tool.c.compile.option.lang.953160721" superClass="com.arm.tool.c.compile.option.lang" valueType="enumerated" value="com.arm.tool.c.compile.option.lang.auto"/><option id="com.arm.tool.c.compiler.option.strict.1260773860" superClass="com.arm.tool.c.compiler.option.strict" valueType="enumerated" value="com.arm.tool.c.compiler.option.strict.auto"/><option id="com.arm.tool.c.compiler.option.suppress.2346558405" superClass="com.arm.tool.c.compiler.option.suppress" valueType="string" value="1296,66"/><option id="com.arm.tool.c.compiler.options.debug.format.8086919207" superClass="com.arm.tool.c.compiler.options.debug.format" valueType="enumerated" value="com.arm.tool.c.compiler.options.debug.format.auto"/><option id="com.arm.tool.c.compiler.option.inst.7255146638" superClass="com.arm.tool.c.compiler.option.inst" valueType="enumerated" value="com.arm.tool.c.compiler.option.inst.auto"/><option id="com.arm.tool.c.compiler.option.inter.3284635693" superClass="com.arm.tool.c.compiler.option.inter" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.unalign.9678057855" superClass="com.arm.tool.c.compiler.option.unalign" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.vector.3904447586" superClass="com.arm.tool.c.compiler.option.vector" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.enum.2057066530" superClass="com.arm.tool.c.compiler.option.enum" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.suppresswarn.4587327564" superClass="com.arm.tool.c.compiler.option.suppresswarn" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.warnaserr.8255453340" superClass="com.arm.tool.c.compiler.option.warnaserr" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.enablerem.6382377895" superClass="com.arm.tool.c.compiler.option.enablerem" valueType="boolean" value="false"/></tool>
+ <tool id="com.arm.tool.cpp.compiler.baremetal.exe.debug.1769458477" name="ARM C++ Compiler" superClass="com.arm.tool.cpp.compiler.baremetal.exe.debug">
+ <option id="com.arm.tool.c.compiler.option.flags.125692915" name="Other flags" superClass="com.arm.tool.c.compiler.option.flags" value="--c99 --split_sections " valueType="string"/>
+ </tool>
+ <tool command="armasm" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="" id="com.arm.tool.assembler.1155958963" name="ARM Assembler" superClass="com.arm.tool.assembler">
+ <option id="com.arm.tool.assembler.option.cpu.423475341" name="Target CPU (--cpu)" superClass="com.arm.tool.assembler.option.cpu" value="Cortex-M4" valueType="string"/>
+ <option id="com.arm.tool.assembler.option.fpu.560570852" name="Target FPU (--fpu)" superClass="com.arm.tool.assembler.option.fpu" value="FPv4-SP" valueType="string"/>
+ <option id="com.arm.tool.assembler.option.fpmode.2114797651" name="Floating-point mode (--fpmode)" superClass="com.arm.tool.assembler.option.fpmode" value="com.arm.tool.c.compiler.option.fpmode.default" valueType="enumerated"/>
+ <option id="com.arm.tool.assembler.option.fppcs.2043711002" name="Floating-point PCS (--apcs)" superClass="com.arm.tool.assembler.option.fppcs" value="com.arm.tool.c.compiler.option.fppcs.auto" valueType="enumerated"/>
+ <option id="com.arm.tool.assembler.option.flags.2068342579" name="Other flags" superClass="com.arm.tool.assembler.option.flags" value="-I&quot;${ProjDirPath}/../../../..&quot; " valueType="string"/>
+ <option id="com.arm.tool.assembler.option.preproc.664063762" name="Preprocess input before assembling (--cpreproc)" superClass="com.arm.tool.assembler.option.preproc" value="true" valueType="boolean"/>
+ <option id="com.arm.tool.assembler.option.preprocflags.7983891183" superClass="com.arm.tool.assembler.option.preprocflags" valueType="string" value="-D__DEBUG"/><option id="com.arm.tool.assembler.option.unalign.9606525205" superClass="com.arm.tool.assembler.option.unalign" valueType="boolean" value="false"/><option id="com.arm.tool.assembler.option.inter.2347180924" superClass="com.arm.tool.assembler.option.inter" valueType="boolean" value="false"/><option id="com.arm.tool.assembler.option.inst.555912041" superClass="com.arm.tool.assembler.option.inst" valueType="enumerated" value="com.arm.tool.c.compiler.option.inst.auto"/><option id="com.arm.tool.assembler.option.endian.4734164270" superClass="com.arm.tool.assembler.option.endian" valueType="enumerated" value="com.arm.tool.c.compiler.option.endian.little"/><option id="com.arm.tool.assembler.option.debug.format.9194391276" superClass="com.arm.tool.assembler.option.debug.format" valueType="enumerated" value="com.arm.tool.c.compiler.options.debug.format.auto"/><option id="com.arm.tool.assembler.option.sup.2331632543" superClass="com.arm.tool.assembler.option.sup" valueType="string" value="1296,66"/></tool>
+ <tool command="armlink" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="" id="com.arm.tool.c.linker.1088675316" name="ARM Linker" superClass="com.arm.tool.c.linker">
+ <option id="com.arm.tool.c.linker.option.cpu.267638742" name="Target CPU (--cpu)" superClass="com.arm.tool.c.linker.option.cpu" value="Cortex-M4" valueType="string"/>
+ <option id="com.arm.tool.c.linker.option.scatter.1868789905" name="Scatter file (--scatter)" superClass="com.arm.tool.c.linker.option.scatter" value="${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/arm/MCIMX7D_M4_tcm.scf" valueType="string"/>
+ <option id="com.arm.tool.c.linker.option.libs.1325797835" name="Libraries (--library)" superClass="com.arm.tool.c.linker.option.libs"/>
+ <option id="com.arm.tool.c.linker.option.libsearch.1542315655" name="Library search path (--userlibpath)" superClass="com.arm.tool.c.linker.option.libsearch"/>
+ <option id="com.arm.tool.c.linker.libs.491659161" name="Other library files" superClass="com.arm.tool.c.linker.libs"/>
+ <option id="com.arm.tool.c.linker.option.entry.1665317816" name="Image entry point (--entry)" superClass="com.arm.tool.c.linker.option.entry" value="Reset_Handler" valueType="string"/>
+ <option id="com.arm.tool.c.linker.option.imagemap.909474066" name="Generate image map (--map)" superClass="com.arm.tool.c.linker.option.imagemap" value="false" valueType="boolean"/>
+ <option id="com.arm.tool.c.linker.option.syslibs.948170747" name="Standard library search path (--libpath)" superClass="com.arm.tool.c.linker.option.syslibs"/>
+
+ <inputType id="com.arm.tool.c.linker.input.334720080" superClass="com.arm.tool.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ <option id="com.arm.tool.c.linker.option.fpu.9444770986" superClass="com.arm.tool.c.linker.option.fpu" valueType="string" value="FPv4-SP"/><option id="com.arm.tool.c.linker.option.sizes.7472107895" superClass="com.arm.tool.c.linker.option.sizes" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.totals.1256857349" superClass="com.arm.tool.c.linker.option.totals" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.compress.2111313252" superClass="com.arm.tool.c.linker.option.compress" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.stack.9765546647" superClass="com.arm.tool.c.linker.option.stack" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.inlineinfo.6286451311" superClass="com.arm.tool.c.linker.option.inlineinfo" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.elim.5505139000" superClass="com.arm.tool.c.linker.option.elim" valueType="boolean" value="false"/></tool>
+ <tool id="com.arm.tool.librarian.109887334" name="ARM Librarian" superClass="com.arm.tool.librarian"/>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.arm.eclipse.build.config.baremetal.exe.debug.2022285397.1552618666">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.arm.eclipse.build.config.baremetal.exe.debug.2022285397.1552618666" moduleId="org.eclipse.cdt.core.settings" name="release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.arm.eclipse.builder.armcc.error" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="com.arm.eclipse.build.artefact.baremetal.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=com.arm.eclipse.build.artefact.baremetal.exe" cleanCommand="clean" description="" id="com.arm.eclipse.build.config.baremetal.exe.debug.2022285397.1552618666" name="release" parent="com.arm.eclipse.build.config.baremetal.exe.debug" postbuildStep="fromelf --bincombined --output=${ProjName}.bin ${ProjName}.axf">
+ <folderInfo id="com.arm.eclipse.build.config.baremetal.exe.debug.2022285397.1552618666." name="/" resourcePath="">
+ <toolChain id="com.arm.toolchain.baremetal.exe.debug.1871020344" name="ARM Compiler" nonInternalBuilderId="com.arm.toolchain.baremetal.builder" superClass="com.arm.toolchain.baremetal.exe.debug">
+ <targetPlatform id="com.arm.toolchain.baremetal.exe.debug.1871020344.229212655" name=""/>
+ <builder autoBuildTarget="all" buildPath="${workspace_loc:/app/release}" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.1172218807" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
+ <tool id="com.arm.tool.c.compiler.baremetal.exe.debug.724686906" name="ARM C Compiler" superClass="com.arm.tool.c.compiler.baremetal.exe.debug">
+ <option id="com.arm.tool.c.compiler.option.incpath.2126170575" name="Include path (-I)" superClass="com.arm.tool.c.compiler.option.incpath"><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/CMSIS/Include"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/devices"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/drivers/inc"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../../platform/utilities/inc"/><listOptionValue builtIn="false" value="${ProjDirPath}/../../../.."/></option>
+ <option id="com.arm.tool.c.compiler.option.defmac.741292309" name="Define macro (-D)" superClass="com.arm.tool.c.compiler.option.defmac"><listOptionValue builtIn="false" value="__NDEBUG"/><listOptionValue builtIn="false" value="CPU_MCIMX7D_M4"/></option>
+ <option id="com.arm.tool.c.compiler.option.targetcpu.499083253" name="Target CPU (--cpu)" superClass="com.arm.tool.c.compiler.option.targetcpu" value="Cortex-M4" valueType="string"/>
+ <option id="com.arm.tool.c.compiler.option.targetfpu.747092604" name="Target FPU (--fpu)" superClass="com.arm.tool.c.compiler.option.targetfpu" value="FPv4-SP" valueType="string"/>
+ <option id="com.arm.tool.c.compiler.option.fpmode.885590841" name="Floating-point mode (--fpmode)" superClass="com.arm.tool.c.compiler.option.fpmode" value="com.arm.tool.c.compiler.option.fpmode.default" valueType="enumerated"/>
+ <option id="com.arm.tool.c.compiler.option.fppcs.1131381472" name="Floating-point PCS (--apcs)" superClass="com.arm.tool.c.compiler.option.fppcs" value="com.arm.tool.c.compiler.option.fppcs.auto" valueType="enumerated"/>
+ <option id="com.arm.tool.c.compiler.baremetal.exe.debug.option.opt.445197165" name="Optimization level" superClass="com.arm.tool.c.compiler.baremetal.exe.debug.option.opt" value="com.arm.tool.c.compiler.option.optlevel.max" valueType="enumerated"/>
+ <option id="com.arm.tool.c.compiler.option.flags.1769123778" name="Other flags" superClass="com.arm.tool.c.compiler.option.flags" value="--c99 --split_sections " valueType="string"/>
+ <inputType id="com.arm.tool.c.compiler.input.1270990193" superClass="com.arm.tool.c.compiler.input"/>
+ <inputType id="com.arm.tool.cpp.compiler.input.840085126" superClass="com.arm.tool.cpp.compiler.input"/>
+ <option id="com.arm.tool.c.compiler.option.gnu.5166248476" superClass="com.arm.tool.c.compiler.option.gnu" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.charsize.6897504515" superClass="com.arm.tool.c.compiler.option.charsize" valueType="enumerated" value="com.arm.tool.c.compiler.option.enum.auto"/><option id="com.arm.tool.c.compiler.baremetal.exe.debug.base.option.opt.5029209368" superClass="com.arm.tool.c.compiler.baremetal.exe.debug.base.option.opt" valueType="enumerated" value="com.arm.tool.c.compiler.option.optlevel.max"/><option id="com.arm.tool.c.compiler.option.optfor.4262746939" superClass="com.arm.tool.c.compiler.option.optfor" valueType="enumerated" value="com.arm.tool.c.compiler.option.optfor.auto"/><option id="com.arm.tool.c.compile.option.lang.5373193877" superClass="com.arm.tool.c.compile.option.lang" valueType="enumerated" value="com.arm.tool.c.compile.option.lang.auto"/><option id="com.arm.tool.c.compiler.option.strict.4942818060" superClass="com.arm.tool.c.compiler.option.strict" valueType="enumerated" value="com.arm.tool.c.compiler.option.strict.auto"/><option id="com.arm.tool.c.compiler.options.debug.enabled.658736692" superClass="com.arm.tool.c.compiler.options.debug.enabled" valueType="boolean" value="true"/><option id="com.arm.tool.c.compiler.option.suppress.5143511658" superClass="com.arm.tool.c.compiler.option.suppress" valueType="string" value="1296,66"/><option id="com.arm.tool.c.compiler.options.debug.format.6363606486" superClass="com.arm.tool.c.compiler.options.debug.format" valueType="enumerated" value="com.arm.tool.c.compiler.options.debug.format.auto"/><option id="com.arm.tool.c.compiler.option.inst.5418682658" superClass="com.arm.tool.c.compiler.option.inst" valueType="enumerated" value="com.arm.tool.c.compiler.option.inst.auto"/><option id="com.arm.tool.c.compiler.option.endian.8001977691" superClass="com.arm.tool.c.compiler.option.endian" valueType="enumerated" value="com.arm.tool.c.compiler.option.endian.auto"/><option id="com.arm.tool.c.compiler.option.inter.558082799" superClass="com.arm.tool.c.compiler.option.inter" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.unalign.153278238" superClass="com.arm.tool.c.compiler.option.unalign" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.vector.6646095944" superClass="com.arm.tool.c.compiler.option.vector" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.enum.2641671836" superClass="com.arm.tool.c.compiler.option.enum" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.suppresswarn.6887123668" superClass="com.arm.tool.c.compiler.option.suppresswarn" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.warnaserr.4190381133" superClass="com.arm.tool.c.compiler.option.warnaserr" valueType="boolean" value="false"/><option id="com.arm.tool.c.compiler.option.enablerem.5652104326" superClass="com.arm.tool.c.compiler.option.enablerem" valueType="boolean" value="false"/></tool>
+ <tool id="com.arm.tool.cpp.compiler.baremetal.exe.debug.1278927352" name="ARM C++ Compiler" superClass="com.arm.tool.cpp.compiler.baremetal.exe.debug">
+ <option id="com.arm.tool.c.compiler.option.flags.191883218" name="Other flags" superClass="com.arm.tool.c.compiler.option.flags" value="--c99 --split_sections " valueType="string"/>
+ </tool>
+ <tool id="com.arm.tool.assembler.782505281" name="ARM Assembler" superClass="com.arm.tool.assembler">
+ <option id="com.arm.tool.assembler.option.cpu.1791675215" name="Target CPU (--cpu)" superClass="com.arm.tool.assembler.option.cpu" value="Cortex-M4" valueType="string"/>
+ <option id="com.arm.tool.assembler.option.fpu.1669042968" name="Target FPU (--fpu)" superClass="com.arm.tool.assembler.option.fpu" value="FPv4-SP" valueType="string"/>
+ <option id="com.arm.tool.assembler.option.fpmode.150044025" name="Floating-point mode (--fpmode)" superClass="com.arm.tool.assembler.option.fpmode" value="com.arm.tool.c.compiler.option.fpmode.default" valueType="enumerated"/>
+ <option id="com.arm.tool.assembler.option.fppcs.1033303317" name="Floating-point PCS (--apcs)" superClass="com.arm.tool.assembler.option.fppcs" value="com.arm.tool.c.compiler.option.fppcs.auto" valueType="enumerated"/>
+ <option id="com.arm.tool.assembler.option.flags.1985199179" name="Other flags" superClass="com.arm.tool.assembler.option.flags" value="-I&quot;${ProjDirPath}/../../../..&quot; " valueType="string"/>
+ <option id="com.arm.tool.assembler.option.preproc.664063763" name="Preprocess input before assembling (--cpreproc)" superClass="com.arm.tool.assembler.option.preproc" value="false" valueType="boolean"/>
+ <option id="com.arm.tool.assembler.option.preprocflags.3170396460" superClass="com.arm.tool.assembler.option.preprocflags" valueType="string" value=""/><option id="com.arm.tool.assembler.option.unalign.279009523" superClass="com.arm.tool.assembler.option.unalign" valueType="boolean" value="false"/><option id="com.arm.tool.assembler.option.inter.7597968347" superClass="com.arm.tool.assembler.option.inter" valueType="boolean" value="false"/><option id="com.arm.tool.assembler.option.inst.2778768371" superClass="com.arm.tool.assembler.option.inst" valueType="enumerated" value="com.arm.tool.c.compiler.option.inst.auto"/><option id="com.arm.tool.assembler.option.endian.8942062191" superClass="com.arm.tool.assembler.option.endian" valueType="enumerated" value="com.arm.tool.c.compiler.option.endian.little"/><option id="com.arm.tool.assembler.option.debug.format.9290817109" superClass="com.arm.tool.assembler.option.debug.format" valueType="enumerated" value="com.arm.tool.c.compiler.options.debug.format.auto"/><option id="com.arm.tool.assembler.option.sup.4094099335" superClass="com.arm.tool.assembler.option.sup" valueType="string" value="1296,66"/></tool>
+ <tool id="com.arm.tool.c.linker.1301355868" name="ARM Linker" superClass="com.arm.tool.c.linker">
+ <option id="com.arm.tool.c.linker.option.cpu.522518248" name="Target CPU (--cpu)" superClass="com.arm.tool.c.linker.option.cpu" value="Cortex-M4" valueType="string"/>
+ <option id="com.arm.tool.c.linker.option.scatter.208008498" name="Scatter file (--scatter)" superClass="com.arm.tool.c.linker.option.scatter" value="${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/arm/MCIMX7D_M4_tcm.scf" valueType="string"/>
+ <option id="com.arm.tool.c.linker.option.libs.1119897339" name="Libraries (--library)" superClass="com.arm.tool.c.linker.option.libs"/>
+ <option id="com.arm.tool.c.linker.option.libsearch.226638094" name="Library search path (--userlibpath)" superClass="com.arm.tool.c.linker.option.libsearch"/>
+ <option id="com.arm.tool.c.linker.libs.962860959" name="Other library files" superClass="com.arm.tool.c.linker.libs"/>
+ <option id="com.arm.tool.c.linker.option.entry.2139204104" name="Image entry point (--entry)" superClass="com.arm.tool.c.linker.option.entry" value="Reset_Handler" valueType="string"/>
+ <option id="com.arm.tool.c.linker.option.imagemap.754891612" name="Generate image map (--map)" superClass="com.arm.tool.c.linker.option.imagemap" value="false" valueType="boolean"/>
+ <option id="com.arm.tool.c.linker.option.syslibs.948170748" name="Standard library search path (--libpath)" superClass="com.arm.tool.c.linker.option.syslibs"/>
+
+ <inputType id="com.arm.tool.c.linker.input.2130990920" superClass="com.arm.tool.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ <option id="com.arm.tool.c.linker.option.fpu.8831592745" superClass="com.arm.tool.c.linker.option.fpu" valueType="string" value="FPv4-SP"/><option id="com.arm.tool.c.linker.option.sizes.2215521281" superClass="com.arm.tool.c.linker.option.sizes" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.totals.388751172" superClass="com.arm.tool.c.linker.option.totals" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.compress.1255586765" superClass="com.arm.tool.c.linker.option.compress" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.stack.4491611419" superClass="com.arm.tool.c.linker.option.stack" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.inlineinfo.699941613" superClass="com.arm.tool.c.linker.option.inlineinfo" valueType="boolean" value="false"/><option id="com.arm.tool.c.linker.option.elim.2367724064" superClass="com.arm.tool.c.linker.option.elim" valueType="boolean" value="false"/></tool>
+ <tool id="com.arm.tool.librarian.2006874949" name="ARM Librarian" superClass="com.arm.tool.librarian"/>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="com.arm.eclipse.build.project.baremetal.exe.1023008919" name="Bare-metal Executable" projectType="com.arm.eclipse.build.project.baremetal.exe"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="com.arm.eclipse.build.config.baremetal.exe.debug.893051445;com.arm.eclipse.build.config.baremetal.exe.debug.893051445.;com.arm.tool.c.compiler.baremetal.exe.debug.1501911384;com.arm.tool.c.compiler.input.905747706">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.arm.eclipse.builder.armcc.ARMCompilerDiscoveryProfile"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope" versionNumber="1">
+ <resource resourceType="PROJECT" workspacePath="/app"/>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+</cproject>
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.project b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.project
new file mode 100644
index 0000000..1574d7d
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/ds5/.project
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>i2c_imx_interrupt_eeprom_example_imx7d_val_m4</name>
+ <comment/>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value/>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value/>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value/>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+ <linkedResources>
+ <link><name>startup</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>startup/startup_MCIMX7D_M4.s</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.s</locationURI></link><link><name>utilities</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>utilities/debug_console_imx.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/utilities/src/debug_console_imx.c</locationURI></link><link><name>utilities</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>utilities/debug_console_imx.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/utilities/inc/debug_console_imx.h</locationURI></link><link><name>utilities</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>utilities/print_scan.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.c</locationURI></link><link><name>utilities</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>utilities/print_scan.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.h</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/ccm_analog_imx7d.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.h</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/ccm_imx7d.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.h</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/lmem.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/lmem.h</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/rdc.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc.h</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/rdc_defs_imx7d.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.h</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/wdog_imx.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/wdog_imx.h</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/ccm_analog_imx7d.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.c</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/ccm_imx7d.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_imx7d.c</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/lmem.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/src/lmem.c</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/rdc.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/src/rdc.c</locationURI></link><link><name>system</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>system/wdog_imx.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/src/wdog_imx.c</locationURI></link><link><name>startup</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>startup/system_MCIMX7D_M4.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c</locationURI></link><link><name>startup</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>startup/system_MCIMX7D_M4.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h</locationURI></link><link><name>board</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>board/pin_mux.c</name><type>1</type><locationURI>PARENT-4-PROJECT_LOC/pin_mux.c</locationURI></link><link><name>board</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>board/pin_mux.h</name><type>1</type><locationURI>PARENT-4-PROJECT_LOC/pin_mux.h</locationURI></link><link><name>board</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>board/board.c</name><type>1</type><locationURI>PARENT-4-PROJECT_LOC/board.c</locationURI></link><link><name>board</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>board/board.h</name><type>1</type><locationURI>PARENT-4-PROJECT_LOC/board.h</locationURI></link><link><name>board</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>board/clock_freq.c</name><type>1</type><locationURI>PARENT-4-PROJECT_LOC/clock_freq.c</locationURI></link><link><name>board</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>board/clock_freq.h</name><type>1</type><locationURI>PARENT-4-PROJECT_LOC/clock_freq.h</locationURI></link><link><name>board</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>board/hardware_init.c</name><type>1</type><locationURI>PARENT-1-PROJECT_LOC/hardware_init.c</locationURI></link><link><name>source</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>source/main.c</name><type>1</type><locationURI>PARENT-1-PROJECT_LOC/main.c</locationURI></link><link><name>driver</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>driver/i2c_imx.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/src/i2c_imx.c</locationURI></link><link><name>driver</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>driver/i2c_imx.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/i2c_imx.h</locationURI></link><link><name>driver</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>driver/uart_imx.c</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/src/uart_imx.c</locationURI></link><link><name>driver</name><type>2</type><locationURI>virtual:/virtual</locationURI></link><link><name>driver/uart_imx.h</name><type>1</type><locationURI>PARENT-6-PROJECT_LOC/platform/drivers/inc/uart_imx.h</locationURI></link></linkedResources>
+ <variableList>
+ </variableList>
+</projectDescription>
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/hardware_init.c b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/hardware_init.c
new file mode 100644
index 0000000..3ffd205
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/hardware_init.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2015, Freescale Semiconductor, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * o Redistributions of source code must retain the above copyright notice, this list
+ * of conditions and the following disclaimer.
+ *
+ * o Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or
+ * other materials provided with the distribution.
+ *
+ * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "board.h"
+#include "pin_mux.h"
+
+void hardware_init(void)
+{
+ /* Board specific RDC settings */
+ BOARD_RdcInit();
+
+ /* Board specific clock settings */
+ BOARD_ClockInit();
+
+ /* initialize debug uart */
+ dbg_uart_init();
+
+ /* In this example, we need to grasp board I2C exclusively */
+ RDC_SetPdapAccess(RDC, BOARD_I2C_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false);
+
+ /* Select I2C clock derived from OSC clock(24M) */
+ CCM_UpdateRoot(CCM, BOARD_I2C_CCM_ROOT, ccmRootmuxI2cOsc24m, 0, 0);
+ /* Enable I2C clock */
+ CCM_EnableRoot(CCM, BOARD_I2C_CCM_ROOT);
+ CCM_ControlGate(CCM, BOARD_I2C_CCM_CCGR, ccmClockNeededRunWait);
+
+ /* I2C Pin setting */
+ configure_i2c_pins(BOARD_I2C_BASEADDR);
+}
+
+/*******************************************************************************
+ * EOF
+ ******************************************************************************/
diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/main.c b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/main.c
new file mode 100644
index 0000000..2de3c14
--- /dev/null
+++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt_eeprom/main.c
@@ -0,0 +1,390 @@
+/*
+ * Copyright (c) 2015, Freescale Semiconductor, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * o Redistributions of source code must retain the above copyright notice, this list
+ * of conditions and the following disclaimer.
+ *
+ * o Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or
+ * other materials provided with the distribution.
+ *
+ * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "board.h"
+#include "debug_console_imx.h"
+#include "i2c_imx.h"
+
+#define EEPROM_ADDRESS (0x50)
+
+typedef struct _i2c_state {
+ const uint8_t* cmdBuff; /*!< The buffer of I2C command. */
+ const uint8_t* txBuff; /*!< The buffer of data being sent.*/
+ uint8_t* rxBuff; /*!< The buffer of received data. */
+ volatile uint32_t cmdSize; /*!< The remaining number of commands to be transmitted. */
+ volatile uint32_t txSize; /*!< The remaining number of bytes to be transmitted. */
+ volatile uint32_t rxSize; /*!< The remaining number of bytes to be received. */
+ volatile bool isBusy; /*!< True if there is an active transmission. */
+ volatile uint32_t operateDir; /*!< Overall I2C bus operating direction. */
+ volatile uint32_t currentDir; /*!< Current Data transfer direction. */
+ volatile uint32_t currentMode; /*!< Current I2C Bus role of this module. */
+} i2c_state_t;
+
+/* I2C runtime state structure */
+static i2c_state_t i2cState;
+
+static bool compare(uint8_t* bufA, uint8_t* bufB, uint32_t length);
+
+static void I2C_XFER_Config(i2c_init_config_t* initConfig);
+static bool I2C_XFER_Write(const uint8_t* cmdBuff, uint32_t cmdSize, const uint8_t* txBuffer, uint32_t txSize);
+static bool I2C_XFER_Read(const uint8_t* cmdBuff, uint32_t cmdSize, uint8_t* rxBuffer, uint32_t rxSize);
+static bool I2C_XFER_IsBusy(void);
+
+int main(void)
+{
+ /* Setup I2C init structure. */
+ i2c_init_config_t i2cInitConfig = {
+ .baudRate = 400000u,
+ .slaveAddress = 0x00
+ };
+ uint8_t txBuffer[5];
+ uint8_t rxBuffer[5];
+ uint8_t cmdBuffer[5];
+
+ /* Initialize board specified hardware. */
+ hardware_init();
+
+ /* Get current module clock frequency. */
+ i2cInitConfig.clockRate = get_i2c_clock_freq(BOARD_I2C_BASEADDR);
+
+ PRINTF("\n\r++++++++++++++++ I2C Send/Receive Interrupt Driven Example +++++++++++++++++\n\r");
+ PRINTF("This example will write data to on board EEPROM through I2C Bus\n\r");
+ PRINTF("and read them back to see if the EEPROM is programmed successfully. \n\r\n\r");
+
+ PRINTF("[1].Initialize the I2C module with initialize structure. \n\r");
+ I2C_XFER_Config(&i2cInitConfig);
+
+ PRINTF("[2].Launch a I2C write action to 0x0000 address. \n\r");
+ cmdBuffer[0] = EEPROM_ADDRESS << 1;
+ cmdBuffer[1] = 0x00;
+ cmdBuffer[2] = 0x00;
+
+ PRINTF("[3].Prepare Data for Sending. \n\r");
+ txBuffer[0] = 0x11;
+ txBuffer[1] = 0x22;
+ txBuffer[2] = 0x33;
+ txBuffer[3] = 0x44;
+ txBuffer[4] = 0x55;
+
+ PRINTF("[4].Write data to EEPROM. \n\r");
+ I2C_XFER_Write(cmdBuffer, 3, txBuffer, 5);
+ PRINTF("[5].Wait until transmission is finished. \n\r");
+ while(I2C_XFER_IsBusy());
+
+ PRINTF("[6].Launch a I2C read action from 0x0000 address. \n\r");
+ cmdBuffer[0] = EEPROM_ADDRESS << 1;
+ cmdBuffer[1] = 0x00;
+ cmdBuffer[2] = 0x00;
+ cmdBuffer[3] = (EEPROM_ADDRESS << 1) + 1;
+
+ PRINTF("[7].Read data from EEPROM. \n\r");
+ I2C_XFER_Read(cmdBuffer, 4, rxBuffer, 5);
+ PRINTF("[8].Wait until transmission is finished. \n\r");
+ while (I2C_XFER_IsBusy());
+
+ PRINTF("[9].Compare data between txBuf and rxBuf: \n\r");
+ if (compare(txBuffer, rxBuffer, 5))
+ PRINTF(" txBuf and rxBuf are same, example passed!!!\n\r");
+ else
+ PRINTF(" txBuf and rxBuf are different, example failed!!! \n\r");
+
+ while (true);
+}
+
+static bool compare(uint8_t* bufA, uint8_t* bufB, uint32_t length)
+{
+ for (uint32_t i = 0; i < length; i++)
+ {
+ if (bufA[i] != bufB[i])
+ return false;
+ }
+
+ return true;
+}
+
+static void I2C_XFER_Config(i2c_init_config_t* initConfig)
+{
+ /* Initialize I2C state structure content. */
+ i2cState.cmdBuff = 0;
+ i2cState.txBuff = 0;
+ i2cState.rxBuff = 0;
+ i2cState.cmdSize = 0;
+ i2cState.txSize = 0;
+ i2cState.rxSize = 0;
+ i2cState.isBusy = false;
+ i2cState.operateDir = i2cDirectionReceive;
+ i2cState.currentDir = i2cDirectionReceive;
+ i2cState.currentMode = i2cModeSlave;
+
+ /* Initialize I2C baud rate, mode, transfer direction and slave address. */
+ I2C_Init(BOARD_I2C_BASEADDR, initConfig);
+
+ /* Set I2C Interrupt priority */
+ NVIC_SetPriority(BOARD_I2C_IRQ_NUM, 3);
+
+ /* Call core API to enable the IRQ. */
+ NVIC_EnableIRQ(BOARD_I2C_IRQ_NUM);
+
+ /* Finally, enable the I2C module */
+ I2C_Enable(BOARD_I2C_BASEADDR);
+}
+
+static bool I2C_XFER_Write(const uint8_t* cmdBuff, uint32_t cmdSize,
+ const uint8_t* txBuffer, uint32_t txSize)
+{
+ if ((i2cState.isBusy) || (0 == txSize))
+ return false;
+
+ /* Initialize i2c transfer struct */
+ i2cState.cmdBuff = cmdBuff;
+ i2cState.cmdSize = cmdSize;
+ i2cState.txBuff = txBuffer;
+ i2cState.txSize = txSize;
+ i2cState.isBusy = true;
+ i2cState.operateDir = i2cDirectionTransmit;
+
+ /* Clear I2C interrupt flag to avoid spurious interrupt */
+ I2C_ClearStatusFlag(BOARD_I2C_BASEADDR, i2cStatusInterrupt);
+
+ if (I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusBusBusy))
+ {
+ /* Reset i2c transfer state. */
+ i2cState.operateDir = i2cDirectionReceive;
+ i2cState.isBusy = false;
+ return false;
+ }
+
+ /* Set I2C work under Tx mode */
+ I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionTransmit);
+ i2cState.currentDir = i2cDirectionTransmit;
+
+ /* Switch to Master Mode and Send Start Signal. */
+ I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeMaster);
+ i2cState.currentMode = i2cModeMaster;
+
+ if (0 != cmdSize)
+ {
+ I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.cmdBuff);
+ i2cState.cmdBuff++;
+ i2cState.cmdSize--;
+ }
+ else
+ {
+ I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.txBuff);
+ i2cState.txBuff++;
+ i2cState.txSize--;
+ }
+
+ /* Enable I2C interrupt, subsequent data transfer will be handled in ISR. */
+ I2C_SetIntCmd(BOARD_I2C_BASEADDR, true);
+
+ return true;
+}
+
+static bool I2C_XFER_Read(const uint8_t* cmdBuff, uint32_t cmdSize,
+ uint8_t* rxBuffer, uint32_t rxSize)
+{
+ if ((i2cState.isBusy) || (0 == rxSize))
+ return false;
+
+ /* Initialize i2c transfer struct */
+ i2cState.cmdBuff = cmdBuff;
+ i2cState.cmdSize = cmdSize;
+ i2cState.rxBuff = rxBuffer;
+ i2cState.rxSize = rxSize;
+ i2cState.isBusy = true;
+ i2cState.operateDir = i2cDirectionReceive;
+
+ /* Clear I2C interrupt flag to avoid spurious interrupt */
+ I2C_ClearStatusFlag(BOARD_I2C_BASEADDR, i2cStatusInterrupt);
+
+ if (I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusBusBusy))
+ {
+ /* Reset i2c transfer state. */
+ i2cState.operateDir = i2cDirectionReceive;
+ i2cState.isBusy = false;
+ return false;
+ }
+
+ /* Set I2C work under Tx mode */
+ I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionTransmit);
+ i2cState.currentDir = i2cDirectionTransmit;
+
+ /* Switch to Master Mode and Send Start Signal. */
+ I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeMaster);
+ i2cState.currentMode = i2cModeMaster;
+
+ /* Is there command to be sent before receive data? */
+ if (0 != i2cState.cmdSize)
+ {
+ if (1 == i2cState.cmdSize)
+ I2C_SendRepeatStart(BOARD_I2C_BASEADDR);
+ I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.cmdBuff);
+ i2cState.cmdBuff++;
+ i2cState.cmdSize--;
+ }
+ else
+ {
+ /* Change to receive state. */
+ I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive);
+ i2cState.currentDir = i2cDirectionReceive;
+
+ if (1 == rxSize)
+ /* Send Nack */
+ I2C_SetAckBit(BOARD_I2C_BASEADDR, false);
+ else
+ /* Send Ack */
+ I2C_SetAckBit(BOARD_I2C_BASEADDR, true);
+ /* dummy read to clock in 1st byte */
+ I2C_ReadByte(BOARD_I2C_BASEADDR);
+ }
+
+ /* Enable I2C interrupt, subsequent data transfer will be handled in ISR. */
+ I2C_SetIntCmd(BOARD_I2C_BASEADDR, true);
+
+ return true;
+}
+
+static bool I2C_XFER_IsBusy(void)
+{
+ return i2cState.isBusy;
+}
+
+void BOARD_I2C_HANDLER(void)
+{
+ /* Clear interrupt flag. */
+ I2C_ClearStatusFlag(BOARD_I2C_BASEADDR, i2cStatusInterrupt);
+
+ /* Exit the ISR if no transfer is happening for this instance. */
+ if (!i2cState.isBusy)
+ return;
+
+ if (i2cModeMaster == i2cState.currentMode)
+ {
+ if (i2cDirectionTransmit == i2cState.currentDir)
+ {
+ if ((I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusReceivedAck)) ||
+ ((0 == i2cState.txSize) && (0 == i2cState.cmdSize)))
+ {
+ if ((i2cDirectionTransmit == i2cState.operateDir) ||
+ (I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusReceivedAck)))
+ {
+ /* Switch to Slave mode and Generate a Stop Signal. */
+ I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeSlave);
+ i2cState.currentMode = i2cModeSlave;
+
+ /* Switch back to Rx direction. */
+ I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive);
+ i2cState.currentDir = i2cDirectionReceive;
+
+ /* Close I2C interrupt. */
+ I2C_SetIntCmd(BOARD_I2C_BASEADDR, false);
+ /* Release I2C Bus. */
+ i2cState.isBusy = false;
+ }
+ else
+ {
+ /* Switch back to Rx direction. */
+ I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive);
+ i2cState.currentDir = i2cDirectionReceive;
+
+ if (1 == i2cState.rxSize)
+ /* Send Nack */
+ I2C_SetAckBit(BOARD_I2C_BASEADDR, false);
+ else
+ /* Send Ack */
+ I2C_SetAckBit(BOARD_I2C_BASEADDR, true);
+ /* dummy read to clock in 1st byte */
+ *i2cState.rxBuff = I2C_ReadByte(BOARD_I2C_BASEADDR);
+ }
+ }
+ else
+ {
+ if (0 != i2cState.cmdSize)
+ {
+ if ((1 == i2cState.cmdSize) && (i2cDirectionReceive == i2cState.operateDir))
+ I2C_SendRepeatStart(BOARD_I2C_BASEADDR);
+ I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.cmdBuff);
+ i2cState.cmdBuff++;
+ i2cState.cmdSize--;
+ }
+ else
+ {
+ I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.txBuff);
+ i2cState.txBuff++;
+ i2cState.txSize--;
+ }
+ }
+ }
+ else
+ {
+ /* Normal read operation. */
+ if (2 == i2cState.rxSize)
+ /* Send Nack */
+ I2C_SetAckBit(BOARD_I2C_BASEADDR, false);
+ else
+ /* Send Nack */
+ I2C_SetAckBit(BOARD_I2C_BASEADDR, true);
+
+ if (1 == i2cState.rxSize)
+ {
+ /* Switch back to Tx direction to avoid additional I2C bus read. */
+ I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionTransmit);
+ i2cState.currentDir = i2cDirectionTransmit;
+ }
+ *i2cState.rxBuff = I2C_ReadByte(BOARD_I2C_BASEADDR);
+ i2cState.rxBuff++;
+ i2cState.rxSize--;
+
+ /* receive finished. */
+ if (0 == i2cState.rxSize)
+ {
+ /* Switch to Slave mode and Generate a Stop Signal. */
+ I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeSlave);
+ i2cState.currentMode = i2cModeSlave;
+
+ /* Switch back to Rx direction. */
+ I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive);
+ i2cState.currentDir = i2cDirectionReceive;
+
+ /* Close I2C interrupt. */
+ I2C_SetIntCmd(BOARD_I2C_BASEADDR, false);
+ /* Release I2C Bus. */
+ i2cState.isBusy = false;
+ }
+ }
+ }
+}
+
+/*******************************************************************************
+ * EOF
+ ******************************************************************************/