From: arighi Date: Wed, 9 Feb 2011 15:23:45 +0000 (+0000) Subject: CM3: allow to define function in RAM by the RAM_FUNC macro X-Git-Tag: 2.7.0~275 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;ds=sidebyside;h=22086313c01d2cb1291b65e55004a6d1240cd291;hp=cc09f32ae0c39abdf4ffd0d387907279a0704ab7;p=bertos.git CM3: allow to define function in RAM by the RAM_FUNC macro git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4691 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/attr.h b/bertos/cpu/attr.h index c8090f95..73745341 100644 --- a/bertos/cpu/attr.h +++ b/bertos/cpu/attr.h @@ -190,6 +190,11 @@ #define PAUSE asm volatile ("wfi" ::: "memory") #define BREAKPOINT /* asm("bkpt 0") DOES NOT WORK */ + /* + * Function attribute to move it into ram memory. + */ + #define RAM_FUNC __attribute__((section(".data"))) + #elif CPU_PPC #define CPU_REG_BITS (CPU_PPC32 ? 32 : 64)