]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/commitdiff
i2c writer utility
authorMike Line <m-line1@ti.com>
Tue, 19 Oct 2010 18:54:13 +0000 (14:54 -0400)
committerMike Line <m-line1@ti.com>
Tue, 19 Oct 2010 18:54:13 +0000 (14:54 -0400)
src/util/i2cWrite/makestg2 [new file with mode: 0644]

diff --git a/src/util/i2cWrite/makestg2 b/src/util/i2cWrite/makestg2
new file mode 100644 (file)
index 0000000..575d990
--- /dev/null
@@ -0,0 +1,60 @@
+#*********************************************************************************
+#* FILE PURPOSE: Build the I2C EEPROM writer 
+#*********************************************************************************
+#* FILE NAME: makestg2
+#*
+#* DESCRIPTION: Builds the i2c writer
+#*
+#*********************************************************************************
+
+
+DEVICES= c6455 c6472 c6474
+
+ifndef IBL_ROOT
+ IBL_ROOT=../..
+endif
+
+ECODIR= $(IBL_ROOT)/util/i2cWrite
+
+MODULES= hw
+CLEAN_MODULES=$(addprefix clean_,$(MODULES))
+
+CSRC= i2cWrite.c
+
+include $(IBL_ROOT)/make/$(ARCH)/makeeco.mk
+
+C6X_C_DIR=   $(IBL_ROOT)/hw/i2c
+C6X_C_DIR+= ;$(IBL_ROOT)/cfg/$(TARGET)
+C6X_C_DIR+= ;$(IBL_ROOT)/device/$(TARGET)
+C6X_C_DIR+= ;$(IBL_ROOT)/arch/$(ARCH)
+C6X_C_DIR+= ;$(STDINC)
+export C6X_C_DIR
+
+export ARCH
+export TARGET
+
+$(DEVICES): gen_cdefdep $(MODULES) $(OBJS) i2cWrite.cmd
+       $(LD) -o i2cWrite.out -m i2cWrite.map i2cWrite.cmd $(RTLIBS)
+
+
+$(MODULES):
+       @echo making $@
+       make -C $(IBL_ROOT)/$@/$(ARCH)/make $@
+
+
+clean2: $(CLEAN_MODULES)
+       @rm -f $(OBJS)
+       @rm -f $(subst .c,.dc,$(CSRC))
+
+$(CLEAN_MODULES):
+       @echo cleaning $(subst clean_, ,$@)
+       make -C $(IBL_ROOT)/$(subst clean,,$@)/$(ARCH)/make clean
+
+$(OBJS): cdefdep
+
+
+gen_cdefdep:
+       @echo Checking command line dependencies
+       @echo $(ENDIAN) $(ARCH) > cdefdep.tmp
+       @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '
+