Fix compile error with GCC_ARM toolchain

pull/4974/head
ccli8 2017-05-24 09:15:21 +08:00 committed by adbridge
parent 33deb03331
commit e3896f5db9
2 changed files with 5 additions and 1 deletions

View File

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

View File

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