Merge pull request #3676 from c1728p9/add_mbed_section_attribute

Add MBED_SECTION attribute
pull/3602/merge
Sam Grove 2017-02-02 11:03:29 -06:00 committed by GitHub
commit 3a90cde132
1 changed files with 10 additions and 0 deletions

View File

@ -268,6 +268,16 @@
#endif
#endif
#ifndef MBED_SECTION
#if (defined(__GNUC__) || defined(__clang__)) || defined(__CC_ARM)
#define MBED_SECTION(name) __attribute__ ((section (name)))
#elif defined(__ICCARM__)
#define MBED_SECTION(name) _Pragma(MBED_STRINGIFY(location=name))
#else
#error "Missing MBED_SECTION directive"
#endif
#endif
// FILEHANDLE declaration
#if defined(TOOLCHAIN_ARM)
#include <rt_sys.h>