[M487] Fix compile error with GCC_ARM toolchain

pull/4608/head
ccli8 2017-05-24 09:15:21 +08:00
parent 90e35febc1
commit aaf26a12e1
2 changed files with 5 additions and 1 deletions

View File

@ -41,8 +41,10 @@ static uint8_t g_hsusbd_TestSelector = 0ul;
#ifdef __ICCARM__
#pragma data_alignment=4
static uint8_t g_hsusbd_buf[12];
#else
#elif defined (__CC_ARM)
__align(4) static uint8_t g_hsusbd_buf[12];
#elif defined ( __GNUC__ )
static uint8_t g_hsusbd_buf[12] __attribute__((aligned (4)));
#endif
uint8_t g_hsusbd_Configured = 0ul;

View File

@ -45,6 +45,8 @@ __align(4) uint8_t _SDH_ucSDHCBuffer[512];
#elif defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment = 4
uint8_t _SDH_ucSDHCBuffer[512];
#elif defined ( __GNUC__ )
uint8_t _SDH_ucSDHCBuffer[512] __attribute__((aligned (4)));
#endif
int SDH_ok = 0;