From 5137db82902ded4cabb4667ade17d1732f73c736 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka <gniibe@fsij.org> Date: Wed, 30 Jul 2014 16:09:39 +0900 Subject: Cortex-M0 works. --- example-led/Makefile | 5 +++-- example-led/sample.ld | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'example-led') diff --git a/example-led/Makefile b/example-led/Makefile index 43c131a..14ff7ff 100644 --- a/example-led/Makefile +++ b/example-led/Makefile @@ -12,9 +12,10 @@ CC = $(CROSS)gcc LD = $(CROSS)gcc OBJCOPY = $(CROSS)objcopy -MCU = cortex-m3 +# MCU = cortex-m3 +MCU = cortex-m0 # -save-temps CWARN = -Wall -Wextra -Wstrict-prototypes -DEFS = -DHAVE_SYS_H -DFREE_STANDING +DEFS = -DHAVE_SYS_H -DFREE_STANDING -DMHZ=48 # DEFS = -DFREE_STANDING -DHAVE_SYS_H -DBUSY_LOOP -DCHX_FLAGS_MAIN=CHOPSTX_SCHED_RR OPT = -O3 -Os -g LIBS = diff --git a/example-led/sample.ld b/example-led/sample.ld index f98d789..07761e0 100644 --- a/example-led/sample.ld +++ b/example-led/sample.ld @@ -9,8 +9,12 @@ __process3_stack_size__ = 0x0100; /* third thread program */ MEMORY { +/* flash0 : org = 0x08000000, len = 4k flash : org = 0x08000000+0x1000, len = 60k +*/ + flash0 : org = 0x08000000, len = 1k + flash : org = 0x08000000+0x0400, len = 60k ram : org = 0x20000000, len = 20k } @@ -36,9 +40,11 @@ SECTIONS build/sys.o(.rodata) build/sys.o(.rodata.*) . = ALIGN(1024); +/* *(.sys.0) *(.sys.1) *(.sys.2) +*/ } > flash0 _text = .; @@ -78,6 +84,13 @@ SECTIONS _etext = .; _textdata = _etext; + .vectors_in_ram : + { + . = ALIGN(8); + __vector_ram_addr__ = .; + KEEP(*(.data.startup.*)) + } > ram + .process_stack : { . = ALIGN(8); -- cgit v1.2.3