diff --git a/configs/same70-xplained/kernel/Makefile b/configs/same70-xplained/kernel/Makefile index a71e019eb0..37c0e8fcf5 100644 --- a/configs/same70-xplained/kernel/Makefile +++ b/configs/same70-xplained/kernel/Makefile @@ -1,7 +1,7 @@ ############################################################################ -# configs/samv7-xult/kernel/Makefile +# configs/same70-xplainged/kernel/Makefile # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -52,11 +52,17 @@ ifeq ($(WINTOOL),y) USER_LIBPATHS = ${shell for path in $(USERLIBS); do dir=`dirname $(TOPDIR)$(DELIM)$$path`;echo "-L\"`cygpath -w $$dir`\"";done} USER_LDSCRIPT = -T "${shell cygpath -w $(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)memory.ld}" USER_LDSCRIPT += -T "${shell cygpath -w $(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)user-space.ld}" + USER_HEXFILE += "${shell cygpath -w $(TOPDIR)$(DELIM)nuttx_user.hex}" + USER_SRECFILE += "${shell cygpath -w $(TOPDIR)$(DELIM)nuttx_user.srec}" + USER_BINFILE += "${shell cygpath -w $(TOPDIR)$(DELIM)nuttx_user.bin}" else # Linux/Cygwin-native toolchain USER_LIBPATHS = $(addprefix -L$(TOPDIR)$(DELIM),$(dir $(USERLIBS))) USER_LDSCRIPT = -T$(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)memory.ld USER_LDSCRIPT += -T$(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)user-space.ld + USER_HEXFILE += "$(TOPDIR)$(DELIM)nuttx_user.hex" + USER_SRECFILE += "$(TOPDIR)$(DELIM)nuttx_user.srec" + USER_BINFILE += "$(TOPDIR)$(DELIM)nuttx_user.bin" endif USER_LDFLAGS = --undefined=$(ENTRYPT) --entry=$(ENTRYPT) $(USER_LDSCRIPT) @@ -87,15 +93,15 @@ $(TOPDIR)$(DELIM)nuttx_user.elf: nuttx_user.elf $(Q) cp -a nuttx_user.elf $(TOPDIR)$(DELIM)nuttx_user.elf ifeq ($(CONFIG_INTELHEX_BINARY),y) @echo "CP: nuttx_user.hex" - $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex nuttx_user.elf $(TOPDIR)$(DELIM)nuttx_user.hex + $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex nuttx_user.elf $(USER_HEXFILE) endif ifeq ($(CONFIG_MOTOROLA_SREC),y) @echo "CP: nuttx_user.srec" - $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O srec nuttx_user.elf $(TOPDIR)$(DELIM)nuttx_user.srec + $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O srec nuttx_user.elf $(USER_SRECFILE) endif ifeq ($(CONFIG_RAW_BINARY),y) @echo "CP: nuttx_user.bin" - $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary nuttx_user.elf $(TOPDIR)$(DELIM)nuttx_user.bin + $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary nuttx_user.elf $(USER_BINFILE) endif $(TOPDIR)$(DELIM)User.map: nuttx_user.elf diff --git a/configs/same70-xplained/scripts/memory.ld b/configs/same70-xplained/scripts/memory.ld index 65673b3d84..dc996926c7 100644 --- a/configs/same70-xplained/scripts/memory.ld +++ b/configs/same70-xplained/scripts/memory.ld @@ -33,16 +33,13 @@ * ****************************************************************************/ -/* The SAME70Q21 has 2048Kb of FLASH beginning at address 0x0040:0000 and +/* The SAMe70Q21 has 2048Kb of FLASH beginning at address 0x0040:0000 and * 384Kb of SRAM beginining at 0x2040:0000 * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0400:0000 address range. * - * NOTE: that the DTCM address of 0x2000:0000 is used for SRAM. If DTCM is - * disabled, then the accesses will actually occur on the AHB bus. - * * The user space partition will be spanned with a single region of size * 2**n bytes. The alignment of the user-space region must be the same. * As a consequence, as the user-space increases in size, the alignment @@ -55,18 +52,18 @@ * * A detailed memory map for the 384KB SRAM region is as follows: * - * 0x20000 0000: Kernel .data region. Typical size: 0.1KB - * ------- ---- Kernel .bss region. Typical size: 1.8KB - * 0x20000 0800: Kernel IDLE thread stack (approximate). Size is - * determined by CONFIG_IDLETHREAD_STACKSIZE and - * adjustments for alignment. Typical is 1KB. - * ------- ---- Padded to 4KB - * 0x20002 0000: User .data region. Size is variable. - * ------- ---- User .bss region Size is variable. - * 0x20000 2000: Beginning of kernel heap. Size determined by - * CONFIG_MM_KERNEL_HEAPSIZE. - * ------- ---- Beginning of user heap. Can vary with other settings. - * 0x20004 0000: End+1 of mappable internal SRAM + * 0x2040 0000: Kernel .data region. Typical size: 0.1KB + * ------ ---- Kernel .bss region. Typical size: 1.8KB + * 0x2040 0800: Kernel IDLE thread stack (approximate). Size is + * determined by CONFIG_IDLETHREAD_STACKSIZE and + * adjustments for alignment. Typical is 1KB. + * ------ ---- Padded to 4KB + * 0x2042 0000: User .data region. Size is variable. + * ------- ---- User .bss region Size is variable. + * 0x2044 0000: Beginning of kernel heap. Size determined by + * CONFIG_MM_KERNEL_HEAPSIZE. + * ------ ---- Beginning of user heap. Can vary with other settings. + * 0x2046 0000: End+1 of mappable internal SRAM */ MEMORY @@ -78,7 +75,7 @@ MEMORY /* 384Kb of internal SRAM */ - ksram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K - usram (rwx) : ORIGIN = 0x20020000, LENGTH = 128K - xsram (rwx) : ORIGIN = 0x20040000, LENGTH = 128K + ksram (rwx) : ORIGIN = 0x20400000, LENGTH = 128K + usram (rwx) : ORIGIN = 0x20420000, LENGTH = 128K + xsram (rwx) : ORIGIN = 0x20440000, LENGTH = 128K }