aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-14 14:53:19 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-14 14:53:19 +0000
commit721061da2af13b2887962b8649507b3f0f47aabc (patch)
tree162fc3c861ea9cd9d7d2ab9c62d1f75c0be6b63b /demos
parent611ff4d2ed3e92f9f577f7dc320b1557e96d381f (diff)
downloadChibiOS-721061da2af13b2887962b8649507b3f0f47aabc.tar.gz
ChibiOS-721061da2af13b2887962b8649507b3f0f47aabc.tar.bz2
ChibiOS-721061da2af13b2887962b8649507b3f0f47aabc.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@232 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/ARMCM3-STM32F103-GCC/Makefile5
-rw-r--r--demos/ARMCM3-STM32F103-GCC/ch.ld80
2 files changed, 82 insertions, 3 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/Makefile b/demos/ARMCM3-STM32F103-GCC/Makefile
index 2de43bf20..dc01e39e3 100644
--- a/demos/ARMCM3-STM32F103-GCC/Makefile
+++ b/demos/ARMCM3-STM32F103-GCC/Makefile
@@ -71,8 +71,7 @@ SRC = ../../ports/ARMCM3/chcore.c \
board.c main.c
# List ASM source files here
-ASMSRC =
-#../../ports/ARMCM3/crt0.s
+ASMSRC = ../../ports/ARMCM3/crt0.s
# List all user directories here
UINCDIR = ../../src/include ../../src/lib ../../ports/ARMCM3
@@ -109,7 +108,7 @@ OBJS = $(ASMOBJS) $(COBJS)
LIBS = $(DLIBS) $(ULIBS)
MCFLAGS = -mcpu=$(MCU) -mthumb
-ASFLAGS = $(MCFLAGS) -mthumb -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
+ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
ODFLAGS = -x --syms
diff --git a/demos/ARMCM3-STM32F103-GCC/ch.ld b/demos/ARMCM3-STM32F103-GCC/ch.ld
new file mode 100644
index 000000000..2ddc2aab4
--- /dev/null
+++ b/demos/ARMCM3-STM32F103-GCC/ch.ld
@@ -0,0 +1,80 @@
+/*
+ ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * ST32F103 memory setup.
+ */
+__main_stack_size__ = 0x0100;
+__process_stack_size__ = 0x0100;
+__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
+
+MEMORY
+{
+ flash : org = 0x08000000, len = 128k
+ ram : org = 0x20000000, len = 20k
+}
+
+__ram_start__ = ORIGIN(ram);
+__ram_size__ = LENGTH(ram);
+__ram_end__ = __ram_start__ + __ram_size__;
+
+SECTIONS
+{
+ . = 0;
+
+ .text :
+ {
+ _text = .;
+ *(.text);
+ *(.rodata);
+ *(.rodata*);
+ *(.glue_7t);
+ *(.glue_7);
+ . = ALIGN(4);
+ _etext = .;
+ } > flash
+
+ _textdata = _etext;
+
+ .data :
+ {
+ _data = .;
+ *(.data)
+ . = ALIGN(4);
+ *(.ramtext)
+ . = ALIGN(4);
+ _edata = .;
+ } > ram AT > flash
+
+ .bss :
+ {
+ _bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ *(COMMON)
+ . = ALIGN(4);
+ _bss_end = .;
+ } > ram
+}
+
+PROVIDE(end = .);
+_end = .;
+
+__heap_base__ = _end;
+__heap_end__ = __ram_end__ - __stacks_total_size__;