FreeCalypso > hg > freecalypso-sw
changeset 6:5eaafa83be60
loadagent: generate binary and srec images
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 29 Apr 2013 19:30:43 +0000 |
parents | 4a7a325ed1b6 |
children | aa1f6fe16fef |
files | .hgignore loadagent/Makefile |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Mon Apr 29 17:53:54 2013 +0000 +++ b/.hgignore Mon Apr 29 19:30:43 2013 +0000 @@ -2,6 +2,8 @@ \.[oa]$ \.elf$ +\.bin$ +\.srec$ ^toolchain/binutils-2.21.1/ ^toolchain/binutils-build/
--- a/loadagent/Makefile Mon Apr 29 17:53:54 2013 +0000 +++ b/loadagent/Makefile Mon Apr 29 19:30:43 2013 +0000 @@ -1,6 +1,7 @@ CC= arm-elf-gcc CFLAGS= -Os -fno-builtin LD= arm-elf-ld +OBJCOPY=arm-elf-objcopy OBJS= crt0.o main.o serio.o serwait.o PRINTF= libprintf/libprintf.a @@ -8,12 +9,18 @@ TC_LIBS=`${CC} -print-file-name=libc.a` \ `${CC} -print-file-name=libgcc.a` -all: loadagent.elf +all: loadagent.bin loadagent.srec loadagent.elf: ${OBJS} ${PRINTF} loadagent.lds ${LD} -N -T loadagent.lds -o $@ ${OBJS} ${PRINTF} \ --start-group ${TC_LIBS} --end-group +loadagent.bin: loadagent.elf + ${OBJCOPY} -O binary $< $@ + +loadagent.srec: loadagent.elf + ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ + ${PRINTF}: FRC cd libprintf; make ${MFLAGS}