diff gsm-fw/finlink/Makefile @ 633:da72b51c0572

gsm-fw/finlink: flashImage support added
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 01 Sep 2014 18:20:58 +0000
parents 8be182dd9218
children 0677a6fbb8b6
line wrap: on
line diff
--- a/gsm-fw/finlink/Makefile	Mon Sep 01 18:02:06 2014 +0000
+++ b/gsm-fw/finlink/Makefile	Mon Sep 01 18:20:58 2014 +0000
@@ -2,6 +2,7 @@
 LD=	arm-elf-ld
 OBJCOPY=arm-elf-objcopy
 
+FLASH_TARGET=	flashImage.bin
 RAM_TARGET=	ramImage.srec
 
 LIBC_A=		`${CC} -print-file-name=libc.a -mthumb-interwork`
@@ -38,7 +39,8 @@
 EXT_PIECES+=	../services/etm/xipcode.o
 endif
 
-all:		${RAM_TARGET}
+all:		${FLASH_TARGET} ${RAM_TARGET}
+flashImage:	${FLASH_TARGET}
 ramImage:	${RAM_TARGET}
 
 iramcode.o:	${INT_PIECES}
@@ -50,6 +52,15 @@
 flashImage.ld:	ld-script.src flash.m4 ../include/config.m4
 	m4 flash.m4 ld-script.src > $@
 
+flashImage.elf:	iramcode.o xipcode.o ../sysglue/flashboot.o ${LIB_DEPEND} \
+		flashImage.ld
+	${LD} -N -T flashImage.ld -o $@ -Map flashImage.map \
+		iramcode.o xipcode.o ../sysglue/flashboot.o \
+		${LIB_LINK_ORDER}
+
+flashImage.bin:	flashImage.elf
+	${OBJCOPY} -O binary $< $@
+
 ramImage.ld:	ld-script.src xram.m4 ../include/config.m4
 	m4 xram.m4 ld-script.src > $@