From: arighi Date: Thu, 17 Feb 2011 14:59:38 +0000 (+0000) Subject: move RAM_FUNC functions into a distinct section in RAM X-Git-Tag: 2.7.0~251 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=66289a0e7fa93342bc3d8621fa20c5a542807e1e;p=bertos.git move RAM_FUNC functions into a distinct section in RAM This also fixes the following build warning: Warning: ignoring changed section attributes for .data git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4715 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/arm/scripts/arm7tdmi_rom.ld b/bertos/cpu/arm/scripts/arm7tdmi_rom.ld index a4715b1b..8c60ed9f 100644 --- a/bertos/cpu/arm/scripts/arm7tdmi_rom.ld +++ b/bertos/cpu/arm/scripts/arm7tdmi_rom.ld @@ -82,6 +82,9 @@ SECTIONS .data : AT (_etext) { PROVIDE (__data_start = .); + . = ALIGN (4); + *(.ramfunc) + . = ALIGN (4); *(.data .data.*) . = ALIGN (4); _edata = .; diff --git a/bertos/cpu/attr.h b/bertos/cpu/attr.h index 56b09e75..5f5217f0 100644 --- a/bertos/cpu/attr.h +++ b/bertos/cpu/attr.h @@ -144,7 +144,7 @@ * to get them transparently copied to SRAM for zero-wait-state * operation. */ - #define FAST_FUNC __attribute__((section(".data"))) + #define FAST_FUNC __attribute__((section(".ramfunc"))) /** * Data attribute to move constant data to fast memory storage. @@ -161,7 +161,7 @@ /* * Function attribute to move it into ram memory. */ - #define RAM_FUNC __attribute__((section(".data"))) + #define RAM_FUNC __attribute__((section(".ramfunc"))) #endif /* !__IAR_SYSTEMS_ICC_ */ #elif CPU_CM3 @@ -193,7 +193,7 @@ /* * Function attribute to move it into ram memory. */ - #define RAM_FUNC __attribute__((section(".data"))) + #define RAM_FUNC __attribute__((section(".ramfunc"))) #elif CPU_PPC diff --git a/bertos/cpu/cortex-m3/scripts/cortex-m3_rom.ld b/bertos/cpu/cortex-m3/scripts/cortex-m3_rom.ld index c488d06f..bed63240 100644 --- a/bertos/cpu/cortex-m3/scripts/cortex-m3_rom.ld +++ b/bertos/cpu/cortex-m3/scripts/cortex-m3_rom.ld @@ -72,6 +72,9 @@ SECTIONS . = ALIGN (0x400); PROVIDE (__data_start = .); *(vtable) + . = ALIGN (4); + *(.ramfunc) + . = ALIGN (4); *(.data .data.*) . = ALIGN (4); _edata = .;