mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Add MEMX support to the Teensy-2.0 platform
This commit is contained in:
@@ -129,8 +129,8 @@ SECTIONS
|
|||||||
*(.vectors)
|
*(.vectors)
|
||||||
*(.init)
|
*(.init)
|
||||||
*(.handlers)
|
*(.handlers)
|
||||||
|
*(.progmem .progmem.*)
|
||||||
*(.rodata.str1.*)
|
*(.rodata.str1.*)
|
||||||
*(.progmem .progmem.*)
|
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
_etext = . ;
|
_etext = . ;
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ SECTIONS
|
|||||||
*(.vectors)
|
*(.vectors)
|
||||||
*(.init)
|
*(.init)
|
||||||
*(.handlers)
|
*(.handlers)
|
||||||
*(.progmem .progmem.*)
|
*(.progmem .progmem.*)
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
_etext = . ;
|
_etext = . ;
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ include ${TOPDIR}/.config
|
|||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
include ${TOPDIR}/arch/avr/src/avr/Toolchain.defs
|
include ${TOPDIR}/arch/avr/src/avr/Toolchain.defs
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_AVR_HAS_MEMX_PTR),y)
|
||||||
|
LDSCRIPT = memx.ld
|
||||||
|
else
|
||||||
|
LDSCRIPT = nomemx.ld
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
# Windows-native toolchains
|
# Windows-native toolchains
|
||||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||||
@@ -44,13 +50,13 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = $(ARCHINCLUDES) "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = $(ARCHINCLUDES) "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/hello/ld.script}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include"
|
ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include"
|
||||||
ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
|
ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/hello/ld.script
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
@@ -72,6 +78,12 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -fno-builtin
|
ARCHCFLAGS = -fno-builtin
|
||||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_AVR_HAS_MEMX_PTR),y)
|
||||||
|
ARCHCFLAGS += -fdata-sections
|
||||||
|
ARCHCXXFLAGS += -fdata-sections
|
||||||
|
endif
|
||||||
|
|
||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ if [ -z "${PATH_ORIG}" ]; then
|
|||||||
export PATH_ORIG="${PATH}"
|
export PATH_ORIG="${PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This is the Cygwin path to the location where I installed the Atmel
|
||||||
|
# Studio AVR toolchain.
|
||||||
|
# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin"
|
||||||
|
# export TOOLCHAIN_BIN="/cygdrive/c/as-7/7.0/toolchain/avr8/avr8-gnu-toolchain/bin"
|
||||||
|
|
||||||
# This is the Cygwin path to the location where I installed the WinAVR
|
# This is the Cygwin path to the location where I installed the WinAVR
|
||||||
# toolchain under windows. This is *not* the default install
|
# toolchain under windows. This is *not* the default install
|
||||||
# location so you will probably have to edit this. You will also have
|
# location so you will probably have to edit this. You will also have
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ include ${TOPDIR}/.config
|
|||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
include ${TOPDIR}/arch/avr/src/avr/Toolchain.defs
|
include ${TOPDIR}/arch/avr/src/avr/Toolchain.defs
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_AVR_HAS_MEMX_PTR),y)
|
||||||
|
LDSCRIPT = memx.ld
|
||||||
|
else
|
||||||
|
LDSCRIPT = nomemx.ld
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
# Windows-native toolchains
|
# Windows-native toolchains
|
||||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||||
@@ -44,13 +50,13 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = $(ARCHINCLUDES) "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = $(ARCHINCLUDES) "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include"
|
ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include"
|
||||||
ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
|
ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
@@ -72,6 +78,12 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -fno-builtin
|
ARCHCFLAGS = -fno-builtin
|
||||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_AVR_HAS_MEMX_PTR),y)
|
||||||
|
ARCHCFLAGS += -fdata-sections
|
||||||
|
ARCHCXXFLAGS += -fdata-sections
|
||||||
|
endif
|
||||||
|
|
||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
|
|||||||
+201
-172
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,11 @@ if [ -z "${PATH_ORIG}" ]; then
|
|||||||
export PATH_ORIG="${PATH}"
|
export PATH_ORIG="${PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This is the Cygwin path to the location where I installed the Atmel
|
||||||
|
# Studio AVR toolchain.
|
||||||
|
# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin"
|
||||||
|
# export TOOLCHAIN_BIN="/cygdrive/c/as-7/7.0/toolchain/avr8/avr8-gnu-toolchain/bin"
|
||||||
|
|
||||||
# This is the Cygwin path to the location where I installed the WinAVR
|
# This is the Cygwin path to the location where I installed the WinAVR
|
||||||
# toolchain under windows. This is *not* the default install
|
# toolchain under windows. This is *not* the default install
|
||||||
# location so you will probably have to edit this. You will also have
|
# location so you will probably have to edit this. You will also have
|
||||||
|
|||||||
Executable → Regular
+14
-11
@@ -1,7 +1,7 @@
|
|||||||
/**************************************************************************************
|
/************************************************************************************
|
||||||
* configs/teensy-2.0/nsh/ld.script
|
* configs/teensy-2.0/scripts/memx.ld
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -31,15 +31,15 @@
|
|||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
**************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/* Memory Regions *********************************************************************/
|
/* Memory Regions *******************************************************************/
|
||||||
/* -------------- ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
/* ------------ ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
||||||
* FLASH | REGISTERS I/O EXT I/O ISRAM | EEPROM
|
* FLASH | REGISTERS I/O EXT I/O ISRAM | EEPROM
|
||||||
* | REGISTERS REGISTERS |
|
* | REGISTERS REGISTERS |
|
||||||
* -------------- ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
* ------------ ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
||||||
* AT90USB1286 0x0000 128Kb | 0x0000 32 0x0020 64 0x0060 160 0x0100 8Kb | 0x0000 4Kb
|
* AT90USB1286 0x0000 128Kb | 0x0000 32 0x0020 64 0x0060 160 0x0100 8Kb | 0x0000 4Kb
|
||||||
* -------------- ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
* ------------ ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
||||||
*/
|
*/
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
@@ -128,6 +128,8 @@ SECTIONS
|
|||||||
*(.vectors)
|
*(.vectors)
|
||||||
*(.init)
|
*(.init)
|
||||||
*(.handlers)
|
*(.handlers)
|
||||||
|
*(.progmem .progmem.*)
|
||||||
|
*(.rodata.str1.*)
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
_etext = . ;
|
_etext = . ;
|
||||||
@@ -138,6 +140,7 @@ SECTIONS
|
|||||||
.data :
|
.data :
|
||||||
{
|
{
|
||||||
_sdata = ABSOLUTE(.);
|
_sdata = ABSOLUTE(.);
|
||||||
|
*(.rodata .rodata.*)
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
*(.gnu.linkonce.d.*)
|
*(.gnu.linkonce.d.*)
|
||||||
CONSTRUCTORS
|
CONSTRUCTORS
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* configs/teensy-2.0/hello/ld.script
|
* configs/teensy-2.0/scripts/nomemx.ld
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -128,6 +128,7 @@ SECTIONS
|
|||||||
*(.vectors)
|
*(.vectors)
|
||||||
*(.init)
|
*(.init)
|
||||||
*(.handlers)
|
*(.handlers)
|
||||||
|
*(.progmem .progmem.*)
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
_etext = . ;
|
_etext = . ;
|
||||||
@@ -138,6 +139,7 @@ SECTIONS
|
|||||||
.data :
|
.data :
|
||||||
{
|
{
|
||||||
_sdata = ABSOLUTE(.);
|
_sdata = ABSOLUTE(.);
|
||||||
|
*(.rodata .rodata.*)
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
*(.gnu.linkonce.d.*)
|
*(.gnu.linkonce.d.*)
|
||||||
CONSTRUCTORS
|
CONSTRUCTORS
|
||||||
@@ -37,6 +37,12 @@ include ${TOPDIR}/.config
|
|||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
include ${TOPDIR}/arch/avr/src/avr/Toolchain.defs
|
include ${TOPDIR}/arch/avr/src/avr/Toolchain.defs
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_AVR_HAS_MEMX_PTR),y)
|
||||||
|
LDSCRIPT = memx.ld
|
||||||
|
else
|
||||||
|
LDSCRIPT = nomemx.ld
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
# Windows-native toolchains
|
# Windows-native toolchains
|
||||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||||
@@ -44,13 +50,13 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = $(ARCHINCLUDES) "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = $(ARCHINCLUDES) "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbmsc/ld.script}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include"
|
ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include"
|
||||||
ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
|
ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbmsc/ld.script
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
@@ -72,6 +78,12 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -fno-builtin
|
ARCHCFLAGS = -fno-builtin
|
||||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_AVR_HAS_MEMX_PTR),y)
|
||||||
|
ARCHCFLAGS += -fdata-sections
|
||||||
|
ARCHCXXFLAGS += -fdata-sections
|
||||||
|
endif
|
||||||
|
|
||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
|
|||||||
@@ -1,210 +0,0 @@
|
|||||||
/**************************************************************************************
|
|
||||||
* configs/teensy-2.0/usbmsc/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
/* Memory Regions *********************************************************************/
|
|
||||||
/* -------------- ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
|
||||||
* FLASH | REGISTERS I/O EXT I/O ISRAM | EEPROM
|
|
||||||
* | REGISTERS REGISTERS |
|
|
||||||
* -------------- ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
|
||||||
* AT90USB1286 0x0000 128Kb | 0x0000 32 0x0020 64 0x0060 160 0x0100 8Kb | 0x0000 4Kb
|
|
||||||
* -------------- ------ ------+------- -- ------ -- ------ --- ------ ----+------- ---
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0, LENGTH = 128K
|
|
||||||
sram (rw!x) : ORIGIN = 0x800100, LENGTH = 8K
|
|
||||||
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 4K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
|
|
||||||
OUTPUT_ARCH(avr:5)
|
|
||||||
ENTRY(__start)
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
/* Read-only sections, merged into text segment: */
|
|
||||||
|
|
||||||
.hash : { *(.hash) }
|
|
||||||
.dynsym : { *(.dynsym) }
|
|
||||||
.dynstr : { *(.dynstr) }
|
|
||||||
.gnu.version : { *(.gnu.version) }
|
|
||||||
.gnu.version_d : { *(.gnu.version_d) }
|
|
||||||
.gnu.version_r : { *(.gnu.version_r) }
|
|
||||||
.rel.init : { *(.rel.init) }
|
|
||||||
.rela.init : { *(.rela.init) }
|
|
||||||
|
|
||||||
.rel.text :
|
|
||||||
{
|
|
||||||
*(.rel.text)
|
|
||||||
*(.rel.text.*)
|
|
||||||
*(.rel.gnu.linkonce.t*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.rela.text :
|
|
||||||
{
|
|
||||||
*(.rela.text)
|
|
||||||
*(.rela.text.*)
|
|
||||||
*(.rela.gnu.linkonce.t*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.rel.fini : { *(.rel.fini) }
|
|
||||||
.rela.fini : { *(.rela.fini) }
|
|
||||||
|
|
||||||
.rel.rodata :
|
|
||||||
{
|
|
||||||
*(.rel.rodata)
|
|
||||||
*(.rel.rodata.*)
|
|
||||||
*(.rel.gnu.linkonce.r*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.rela.rodata :
|
|
||||||
{
|
|
||||||
*(.rela.rodata)
|
|
||||||
*(.rela.rodata.*)
|
|
||||||
*(.rela.gnu.linkonce.r*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.rel.data :
|
|
||||||
{
|
|
||||||
*(.rel.data)
|
|
||||||
*(.rel.data.*)
|
|
||||||
*(.rel.gnu.linkonce.d*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.rela.data :
|
|
||||||
{
|
|
||||||
*(.rela.data)
|
|
||||||
*(.rela.data.*)
|
|
||||||
*(.rela.gnu.linkonce.d*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.rel.ctors : { *(.rel.ctors) }
|
|
||||||
.rela.ctors : { *(.rela.ctors) }
|
|
||||||
.rel.dtors : { *(.rel.dtors) }
|
|
||||||
.rela.dtors : { *(.rela.dtors) }
|
|
||||||
.rel.got : { *(.rel.got) }
|
|
||||||
.rela.got : { *(.rela.got) }
|
|
||||||
.rel.bss : { *(.rel.bss) }
|
|
||||||
.rela.bss : { *(.rela.bss) }
|
|
||||||
.rel.plt : { *(.rel.plt) }
|
|
||||||
.rela.plt : { *(.rela.plt) }
|
|
||||||
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
_stext = . ;
|
|
||||||
*(.vectors)
|
|
||||||
*(.init)
|
|
||||||
*(.handlers)
|
|
||||||
*(.text)
|
|
||||||
*(.text.*)
|
|
||||||
_etext = . ;
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data :
|
|
||||||
{
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.bss :
|
|
||||||
{
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Global data not cleared after reset. */
|
|
||||||
|
|
||||||
.noinit :
|
|
||||||
{
|
|
||||||
_snoinit = ABSOLUTE(.);
|
|
||||||
*(.noinit*)
|
|
||||||
_enoinit = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
.eeprom :
|
|
||||||
{
|
|
||||||
_seeprom = ABSOLUTE(.);
|
|
||||||
*(.eeprom*)
|
|
||||||
_eeeprom = ABSOLUTE(.);
|
|
||||||
} > eeprom
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
|
|
||||||
/* DWARF debug sections.
|
|
||||||
Symbols in the DWARF debugging sections are relative to the beginning
|
|
||||||
of the section so we begin them at 0. */
|
|
||||||
|
|
||||||
/* DWARF 1 */
|
|
||||||
|
|
||||||
.debug 0 : { *(.debug) }
|
|
||||||
.line 0 : { *(.line) }
|
|
||||||
|
|
||||||
/* GNU DWARF 1 extensions */
|
|
||||||
|
|
||||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
|
||||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
|
||||||
|
|
||||||
/* DWARF 1.1 and DWARF 2 */
|
|
||||||
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
|
|
||||||
/* DWARF 2 */
|
|
||||||
|
|
||||||
.debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_frame 0 : { *(.debug_frame) }
|
|
||||||
.debug_str 0 : { *(.debug_str) }
|
|
||||||
.debug_loc 0 : { *(.debug_loc) }
|
|
||||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
|
||||||
}
|
|
||||||
@@ -47,6 +47,11 @@ if [ -z "${PATH_ORIG}" ]; then
|
|||||||
export PATH_ORIG="${PATH}"
|
export PATH_ORIG="${PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This is the Cygwin path to the location where I installed the Atmel
|
||||||
|
# Studio AVR toolchain.
|
||||||
|
# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin"
|
||||||
|
# export TOOLCHAIN_BIN="/cygdrive/c/as-7/7.0/toolchain/avr8/avr8-gnu-toolchain/bin"
|
||||||
|
|
||||||
# This is the Cygwin path to the location where I installed the WinAVR
|
# This is the Cygwin path to the location where I installed the WinAVR
|
||||||
# toolchain under windows. This is *not* the default install
|
# toolchain under windows. This is *not* the default install
|
||||||
# location so you will probably have to edit this. You will also have
|
# location so you will probably have to edit this. You will also have
|
||||||
|
|||||||
Reference in New Issue
Block a user