diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-10-04 17:48:35 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-10-04 17:48:35 +0000 |
commit | 365ffcd212b8836b7dce5ec21ea4205148bc85e5 (patch) | |
tree | fc0e1809da973d97a51a1dd2de77c9fe29628a55 /nuttx/configs/stm3210e-eval/ostest | |
parent | d977e1c8ff3fa9f8186a0f0e65612d0d2bf2309b (diff) | |
download | px4-nuttx-365ffcd212b8836b7dce5ec21ea4205148bc85e5.tar.gz px4-nuttx-365ffcd212b8836b7dce5ec21ea4205148bc85e5.tar.bz2 px4-nuttx-365ffcd212b8836b7dce5ec21ea4205148bc85e5.zip |
Started a RIDE project for STM32
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2120 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3210e-eval/ostest')
-rw-r--r-- | nuttx/configs/stm3210e-eval/ostest/Make.defs | 10 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/ostest/defconfig | 3 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/ostest/ld.script | 6 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/ostest/ld.script.dfu | 110 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/ostest/setenv.sh | 3 |
5 files changed, 124 insertions, 8 deletions
diff --git a/nuttx/configs/stm3210e-eval/ostest/Make.defs b/nuttx/configs/stm3210e-eval/ostest/Make.defs index f0f3e62b7..773b3e71c 100644 --- a/nuttx/configs/stm3210e-eval/ostest/Make.defs +++ b/nuttx/configs/stm3210e-eval/ostest/Make.defs @@ -37,6 +37,12 @@ include ${TOPDIR}/.config # Setup for the selected toolchain +ifeq ($(CONFIG_STM32_DFU)y) + LDSCRIPT = ld.script.dfu +else + LDSCRIPT = ld.script +endif + ifneq ($(CONFIG_STM32_BUILDROOT),y) # Windows-native toolchains ifeq ($(CONFIG_STM32_DEVKITARM),y) @@ -51,7 +57,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/$(LDSCRIPT)}" MAXOPTIMIZATION = -O2 # The NuttX buildroot toolchain else @@ -61,7 +67,7 @@ else ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/$(LDSCRIPT) MAXOPTIMIZATION = -Os endif diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index 0a71545ca..7c5afbdf7 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -87,11 +87,12 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n # -# Identify toolchain +# Identify toolchain and liner options CONFIG_STM32_CODESOURCERY=n CONFIG_STM32_DEVKITARM=n CONFIG_STM32_RAISONANCE=n CONFIG_STM32_BUILDROOT=y +CONFIG_STM32_DFU=n # # Individual subsystems can be enabled: diff --git a/nuttx/configs/stm3210e-eval/ostest/ld.script b/nuttx/configs/stm3210e-eval/ostest/ld.script index 9ae632a11..41cb64113 100755 --- a/nuttx/configs/stm3210e-eval/ostest/ld.script +++ b/nuttx/configs/stm3210e-eval/ostest/ld.script @@ -34,14 +34,12 @@ ****************************************************************************/ /* The STM32F103ZET6 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 64Kb of SRAM beginning at address 0x2000:0000. Here we assume that the - * STM3210E-EVAL's DFU bootloader is being used. In that case, the corrct - * load .text load address is 0x08003000 (leaving 464Kb). + * 64Kb of SRAM beginning at address 0x2000:0000. */ MEMORY { - flash (rx) : ORIGIN = 0x08003000, LENGTH = 464K + flash (rx) : ORIGIN = 0x08000000, LENGTH = 512K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K } diff --git a/nuttx/configs/stm3210e-eval/ostest/ld.script.dfu b/nuttx/configs/stm3210e-eval/ostest/ld.script.dfu new file mode 100755 index 000000000..720195871 --- /dev/null +++ b/nuttx/configs/stm3210e-eval/ostest/ld.script.dfu @@ -0,0 +1,110 @@ +/**************************************************************************** + * configs/stm3210e-eval/ostest/ld.script.dfu + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * + * 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. + * + ****************************************************************************/ + +/* The STM32F103ZET6 has 512Kb of FLASH beginning at address 0x0800:0000 and + * 64Kb of SRAM beginning at address 0x2000:0000. Here we assume that the + * STM3210E-EVAL's DFU bootloader is being used. In that case, the corrct + * load .text load address is 0x08003000 (leaving 464Kb). + */ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08003000, LENGTH = 464K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + _eronly = ABSOLUTE(.); /* See below */ + + /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .ARM.extab : { + *(.ARM.extab*) + } >sram + + .ARM.exidx : { + __exidx_start = ABSOLUTE(.); + *(.ARM.exidx*) + __exidx_end = ABSOLUTE(.); + } >sram + + .bss : { /* BSS */ + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + /* 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) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/nuttx/configs/stm3210e-eval/ostest/setenv.sh b/nuttx/configs/stm3210e-eval/ostest/setenv.sh index e01711125..fcb428c2f 100755 --- a/nuttx/configs/stm3210e-eval/ostest/setenv.sh +++ b/nuttx/configs/stm3210e-eval/ostest/setenv.sh @@ -40,7 +40,8 @@ fi if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi WD=`pwd` +export RIDE_BIN="/cygdrive/c/Program Files/Raisonance/Ride/arm-gcc/bin" export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" +export PATH="${BUILDROOT_BIN}:${RIDE_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" |