view nuc-fw/finlink/Makefile @ 137:5fe5559003b7

RV bring-up: RVT "system time" heartbeat messages now get printed every 20 s! The problem was a slight Nucleus API incompatibility between what the RVF code from TCS211 expected and what our FreeNucleus implements: in the TCS211 version of Nucleus it was OK to pass 0 for the initial_time parameter to NU_Create_Timer(), but our version flags such usage as an error. RVF used 0 as the dummy initial_time value when initializing the legacy RV timers with NU_DISABLE_TIMER. Implemented fix: using a dummy value of 1 instead.
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 11 Nov 2013 09:56:23 +0000
parents 2c5160a9d652
children
line wrap: on
line source

CC=	arm-elf-gcc
LD=	arm-elf-ld
OBJCOPY=arm-elf-objcopy

RAM_TARGET=	ramImage.srec

LIBC_A=		`${CC} -print-file-name=libc.a -mthumb-interwork`
LIBC_T=		`${CC} -print-file-name=libc.a -mthumb-interwork -mthumb`
LIBGCC_A=	`${CC} -print-file-name=libgcc.a -mthumb-interwork`
LIBGCC_T=	`${CC} -print-file-name=libgcc.a -mthumb-interwork -mthumb`

LOCAL_LIBS=	../riviera/librv.a ../nucleus/libplus.xip.a \
		../nucleus/libplus.iram.a ../sprintf/libsprintf.a

INT_PIECES=	../bsp/niq32.o
EXT_PIECES=	../bsp/xipcode.o ../serial/xipcode.o ../sysglue/xipcode.o

all:		${RAM_TARGET}
ramImage:	${RAM_TARGET}

iramcode.o:	${INT_PIECES}
	${LD} -r -o $@ ${INT_PIECES}

xipcode.o:	${EXT_PIECES}
	${LD} -r -o $@ ${EXT_PIECES}

flashImage.ld:	ld-script.src flash.m4 ../include/config.m4
	m4 flash.m4 ld-script.src > $@

ramImage.ld:	ld-script.src xram.m4 ../include/config.m4
	m4 xram.m4 ld-script.src > $@

ramImage.elf:	iramcode.o xipcode.o ${LOCAL_LIBS} ramImage.ld
	${LD} -N -T ramImage.ld -o $@ -Map ramImage.map iramcode.o xipcode.o \
		${LOCAL_LIBS} \
		--start-group ${LIBC_A} ${LIBGCC_A} --end-group

ramImage.srec:	ramImage.elf
	${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@

clean:
	rm -f *.o *errs *core *.elf *.bin *.srec *.ld *.map

FRC: