sys section at non-writable area

This commit is contained in:
NIIBE Yutaka
2012-05-25 17:06:14 +09:00
parent 2113d5b751
commit 1e9b73de49
2 changed files with 16 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
2012-05-25 Niibe Yutaka <gniibe@fsij.org>
* src/gnuk.ld.in (.sys): New section.
* boards/OLIMEX_STM32_H103/board.h (SET_USB_CONDITION)
(SET_LED_CONDITION, GPIO_LED, IOPORT_LED, FLASH_PAGE_SIZE): New.
* boards/OLIMEX_STM32_H103/board.c (USB_Cable_Config, set_led):

View File

@@ -33,10 +33,14 @@ __stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
MEMORY
{
flash : org = @ORIGIN@, len = @FLASH_SIZE@k
flash0 : org = @ORIGIN@, len = 4k
flash : org = @ORIGIN@+0x1000, len = @FLASH_SIZE@k - 4k
ram : org = 0x20000000, len = 20k
}
__flash_start__ = ORIGIN(flash);
__flash_end__ = ORIGIN(flash) + LENGTH(flash);
__ram_start__ = ORIGIN(ram);
__ram_size__ = LENGTH(ram);
__ram_end__ = __ram_start__ + __ram_size__;
@@ -45,6 +49,15 @@ SECTIONS
{
. = 0;
.sys : ALIGN(16) SUBALIGN(16)
{
KEEP(*(.vectors))
sys.o(.text)
sys.o(.text.*)
sys.o(.rodata)
sys.o(.rodata.*)
} > flash0
.text : ALIGN(16) SUBALIGN(16)
{
_text = .;