ZDS-II toolchain does not need up_mem.h
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@674 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
18bdc80d8f
commit
5a6f038b8c
@ -77,30 +77,12 @@ $(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
$(call COMPILE, `cygpath -w $<`, $@)
|
||||
|
||||
up_mem.h:
|
||||
@echo "#ifndef __UP_MEM_H" >up_mem.h
|
||||
@echo "#define __UP_MEM_H" >>up_mem.h
|
||||
@echo "" >>up_mem.h
|
||||
@echo "#include <nuttx/config.h>" >>up_mem.h
|
||||
@echo "" >>up_mem.h
|
||||
@echo "#ifndef CONFIG_HEAP1_BASE" >>up_mem.h
|
||||
@echo " extern far unsigned long far_heapbot;" >>up_mem.h
|
||||
@echo "# define CONFIG_HEAP1_BASE ((uint16)&far_heapbot)" >>up_mem.h
|
||||
@echo "#endif" >>up_mem.h
|
||||
@echo "" >>up_mem.h
|
||||
@echo "#ifndef CONFIG_HEAP1_END" >>up_mem.h
|
||||
@echo " extern far unsigned long far_heaptop;" >>up_mem.h
|
||||
@echo "# define CONFIG_HEAP1_END ((uint16)&far_heaptop)" >>up_mem.h
|
||||
@echo "#endif" >>up_mem.h
|
||||
@echo "" >>up_mem.h
|
||||
@echo "#endif /* __UP_MEM_H */" >>up_mem.h
|
||||
|
||||
libarch$(LIBEXT): up_mem.h $(OBJS)
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT): up_mem.h
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
||||
|
||||
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||
@ -116,11 +98,11 @@ nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/csioLDD$(LIBEXT)}\", \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/zsldevinitdummy.lib$(LIBEXT)}\" \\" >>nuttx.linkcmd
|
||||
|
||||
nuttx$(EXEEXT): up_mem.h $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
@echo "LD: nuttx.hex"
|
||||
@$(LD) $(LDFLAGS)
|
||||
|
||||
.depend: Makefile up_mem.h chip/Make.defs $(DEPSRCS)
|
||||
.depend: Makefile chip/Make.defs $(DEPSRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
fi
|
||||
@ -134,7 +116,7 @@ clean:
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
|
||||
fi
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
@rm -f nuttx.linkcmd up_mem.h *.asm *.tmp *.map
|
||||
@rm -f nuttx.linkcmd *.asm *.tmp *.map
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
|
@ -46,12 +46,35 @@
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "up_internal.h"
|
||||
#include "up_mem.h"
|
||||
|
||||
/* For the SDCC toolchain, the arch/z80/src/Makefile will parse the map file
|
||||
* to determin how much memory is available for the heap. This parsed data
|
||||
* is provided via the auto-generated file up_mem.h
|
||||
*/
|
||||
|
||||
#ifdef SDCC
|
||||
# include "up_mem.h"
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* For the ZiLOG ZDS-II toolchain(s), the heap will be set using linker-
|
||||
* defined values.
|
||||
*/
|
||||
|
||||
#ifdef __ZILOG__
|
||||
# ifndef CONFIG_HEAP1_BASE
|
||||
extern far unsigned long far_heapbot;
|
||||
# define CONFIG_HEAP1_BASE ((uint16)&far_heapbot)
|
||||
# endif
|
||||
# ifndef CONFIG_HEAP1_END
|
||||
extern far unsigned long far_heaptop;
|
||||
# define CONFIG_HEAP1_END ((uint16)&far_heaptop)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
@ -51,7 +51,6 @@
|
||||
#include "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
#include "up_mem.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
|
Loading…
Reference in New Issue
Block a user