diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2014-07-30 16:09:39 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2014-12-10 18:50:09 +0900 |
commit | 5137db82902ded4cabb4667ade17d1732f73c736 (patch) | |
tree | 19c16f9d6b6d0320765d15f3d988f10810712155 /example-led | |
parent | 522380097ea768e7474c0de8195cc0ced03904e8 (diff) |
Cortex-M0 works.
Diffstat (limited to 'example-led')
-rw-r--r-- | example-led/Makefile | 5 | ||||
-rw-r--r-- | example-led/sample.ld | 13 |
2 files changed, 16 insertions, 2 deletions
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); |