Move PJRC led support into board-specific logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@159 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
d5aa71aedc
commit
607a3937cb
@ -48,8 +48,7 @@ CSRCS = up_initialize.c up_idle.c up_interruptcontext.c \
|
|||||||
up_releasepending.c up_reprioritizertr.c \
|
up_releasepending.c up_reprioritizertr.c \
|
||||||
up_exit.c up_assert.c up_allocateheap.c \
|
up_exit.c up_assert.c up_allocateheap.c \
|
||||||
up_irq.c up_savecontext.c up_restorecontext.c \
|
up_irq.c up_savecontext.c up_restorecontext.c \
|
||||||
up_timerisr.c up_putc.c up_debug.c up_leds.c \
|
up_timerisr.c up_putc.c up_debug.c up_delay.c
|
||||||
up_delay.c
|
|
||||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||||
SRCS = $(SSRCS) $(CSRCS)
|
SRCS = $(SSRCS) $(CSRCS)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
@ -70,6 +69,8 @@ TESTOBJS = $(TESTSRCS:.c=$(OBJEXT))
|
|||||||
TESTLINKOBJS = up_head$(OBJEXT)
|
TESTLINKOBJS = up_head$(OBJEXT)
|
||||||
TESTEXTRAOBJS = up_savecontext$(OBJEXT) up_restorecontext$(OBJEXT)
|
TESTEXTRAOBJS = up_savecontext$(OBJEXT) up_restorecontext$(OBJEXT)
|
||||||
|
|
||||||
|
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
|
||||||
|
|
||||||
IRAM_SIZE = 0x100
|
IRAM_SIZE = 0x100
|
||||||
DEF_STACK_BASE = 0x24
|
DEF_STACK_BASE = 0x24
|
||||||
LDFLAGS = --model-large --nostdlib \
|
LDFLAGS = --model-large --nostdlib \
|
||||||
@ -163,16 +164,23 @@ $(SDCCLIBDIR)/libmysdcc.lib: $(SDCCLIBDIR)/libsdcc.lib
|
|||||||
> libmysdcc.lib
|
> libmysdcc.lib
|
||||||
@sudo mv -f libmysdcc.lib $(SDCCLIBDIR)/libmysdcc.lib
|
@sudo mv -f libmysdcc.lib $(SDCCLIBDIR)/libmysdcc.lib
|
||||||
|
|
||||||
|
# This builds the libboard library in the board/ subdirectory
|
||||||
|
|
||||||
|
board/libboard$(LIBEXT):
|
||||||
|
$(MAKE) -C board TOPDIR=$(TOPDIR) libboard$(LIBEXT)
|
||||||
|
|
||||||
# This target builds the final executable
|
# This target builds the final executable
|
||||||
|
|
||||||
pass1.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS)
|
pass1.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS) board/libboard$(LIBEXT)
|
||||||
$(CC) $(LDFLAGS) $(LDPATHES) $(SDCCPATH) $(LINKOBJS) $(LDLIBS) $(SDCCLIBS) -o $@
|
$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
|
||||||
|
$(LDLIBS) -llibboard$(LIBEXT) $(SDCCLIBS) -o $@
|
||||||
@rm -f up_mem.h
|
@rm -f up_mem.h
|
||||||
@rm -f up_allocateheap$(OBJEXT) libarch$(LIBEXT)
|
@rm -f up_allocateheap$(OBJEXT) libarch$(LIBEXT)
|
||||||
@$(MAKE) TOPDIR=$(TOPDIR) libarch$(LIBEXT)
|
@$(MAKE) TOPDIR=$(TOPDIR) libarch$(LIBEXT)
|
||||||
|
|
||||||
nuttx.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS)
|
nuttx.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS)
|
||||||
$(CC) $(LDFLAGS) $(LDPATHES) $(SDCCPATH) $(LINKOBJS) $(LDLIBS) $(SDCCLIBS) -o $@
|
$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
|
||||||
|
$(LDLIBS) -llibboard$(LIBEXT) $(SDCCLIBS) -o $@
|
||||||
|
|
||||||
nuttx$(EXEEXT): pass1.ihx nuttx.ihx
|
nuttx$(EXEEXT): pass1.ihx nuttx.ihx
|
||||||
@rm -f pass1.*
|
@rm -f pass1.*
|
||||||
@ -191,17 +199,26 @@ irqtest:
|
|||||||
# Build dependencies
|
# Build dependencies
|
||||||
|
|
||||||
.depend: Makefile up_mem.h $(DEPSRCS)
|
.depend: Makefile up_mem.h $(DEPSRCS)
|
||||||
|
@if [ -e board/Makefile ]; then \
|
||||||
|
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
|
||||||
|
if
|
||||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
depend: .depend
|
depend: .depend
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@if [ -e board/Makefile ]; then \
|
||||||
|
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||||
|
fi
|
||||||
rm -f libarch$(LIBEXT) up_mem.h
|
rm -f libarch$(LIBEXT) up_mem.h
|
||||||
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~
|
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~
|
||||||
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
@if [ -e board/Makefile ]; then \
|
||||||
|
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
|
||||||
|
fi
|
||||||
rm -f Make.dep .depend
|
rm -f Make.dep .depend
|
||||||
|
|
||||||
-include Make.dep
|
-include Make.dep
|
||||||
|
@ -134,7 +134,7 @@ extern void up_dumpframe(FAR struct xcptcontext *context);
|
|||||||
# define up_dumpframe(x)
|
# define up_dumpframe(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Defined in up_leds.c */
|
/* Defined in board/up_leds.c */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
extern void up_ledinit(void);
|
extern void up_ledinit(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user