# HG changeset patch # User Michael Spacefalcon # Date 1408259712 0 # Node ID 8be182dd9218166fe6459b781351adfe2d01eef6 # Parent a8121805b6d02e3dfe5c94762732941b709cf745 gsm-fw: INT_{Dis,En}ableIRQ() functions implemented (needed by L1 code) diff -r a8121805b6d0 -r 8be182dd9218 gsm-fw/bsp/Makefile --- a/gsm-fw/bsp/Makefile Sun Aug 17 06:58:27 2014 +0000 +++ b/gsm-fw/bsp/Makefile Sun Aug 17 07:15:12 2014 +0000 @@ -3,7 +3,7 @@ ASFLAGS=-mthumb-interwork LD= arm-elf-ld -IOBJS= niq32.o +IOBJS= irq_twiddle.o niq32.o XTOBJS= armio.o clkm.o init_target.o inth.o niq.o timer.o timer1.o timer2.o @@ -16,13 +16,16 @@ SUBDIR= abb+spi rtc SUBDIR_XIPCODE= abb+spi/xipcode.o rtc/xipcode.o -all: ${IOBJS} ${XOBJS} ${SUBDIR} xipcode.o +all: ${IOBJS} ${XOBJS} ${SUBDIR} iramcode.o xipcode.o ${AOBJS}: ${HDRS} ${XTOBJS}: %.o : %.c ${HDRS} ${CC} ${CFLAGS} -mthumb -c $< +iramcode.o: ${IOBJS} + ${LD} -r -o $@ ${IOBJS} + xipcode.o: ${XOBJS} ${SUBDIR} ${LD} -r -o $@ ${XOBJS} ${SUBDIR_XIPCODE} diff -r a8121805b6d0 -r 8be182dd9218 gsm-fw/bsp/irq_twiddle.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/bsp/irq_twiddle.S Sun Aug 17 07:15:12 2014 +0000 @@ -0,0 +1,26 @@ +/* + * TI's L1 code (and possibly other parts of the software suite) calls + * functions named INT_DisableIRQ() and INT_EnableIRQ(); in the Leonardo + * fw they are implemented (in a very ugly manner, as usual) in the + * int.s entry point assembly module. Here we implement the same + * functions in a cleaner way. + */ + +#include "../nucleus/asm_defs.h" + + .code 32 + .text + + .globl INT_DisableIRQ +INT_DisableIRQ: + mrs r0, CPSR + orr r0, r0, #LOCKOUT + msr CPSR, r0 + bx lr + + .globl INT_EnableIRQ +INT_EnableIRQ: + mrs r0, CPSR + bic r0, r0, #LOCKOUT + msr CPSR, r0 + bx lr diff -r a8121805b6d0 -r 8be182dd9218 gsm-fw/finlink/Makefile --- a/gsm-fw/finlink/Makefile Sun Aug 17 06:58:27 2014 +0000 +++ b/gsm-fw/finlink/Makefile Sun Aug 17 07:15:12 2014 +0000 @@ -24,7 +24,7 @@ LIB_LINK_ORDER+= ${BASE_LIBS} LIB_LINK_ORDER+= --start-group ${LIBC_A} ${LIBGCC_A} --end-group -INT_PIECES= ../bsp/niq32.o +INT_PIECES= ../bsp/iramcode.o EXT_PIECES= ../bsp/xipcode.o ../serial/xipcode.o ../sysglue/xipcode.o \ ../services/ffs/xipcode.o ../services/dar/xipcode.o ifeq (${CONFIG_GPF},1)