From 2bcb1f7a16aadfea55d5e5604a3a6e7b8f4a198c Mon Sep 17 00:00:00 2001 From: ccli8 Date: Thu, 25 Aug 2016 10:39:11 +0800 Subject: [PATCH] Fix aes compile error with gcc --- .../hal/TARGET_NUVOTON/TARGET_NUC472/aes_alt.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hal/targets/hal/TARGET_NUVOTON/TARGET_NUC472/aes_alt.c b/hal/targets/hal/TARGET_NUVOTON/TARGET_NUC472/aes_alt.c index f6920f5ba0..375657443d 100644 --- a/hal/targets/hal/TARGET_NUVOTON/TARGET_NUC472/aes_alt.c +++ b/hal/targets/hal/TARGET_NUVOTON/TARGET_NUC472/aes_alt.c @@ -52,6 +52,7 @@ #endif /* MBEDTLS_SELF_TEST */ #include "NUC472_442.h" +#include "toolchain.h" //static int aes_init_done = 0; @@ -72,15 +73,8 @@ static uint32_t au32MyAESIV[4] = { extern volatile int g_AES_done; -#ifdef __ICCARM__ -#pragma data_alignment=4 -uint8_t au8OutputData[16]; -#pragma data_alignment=4 -uint8_t au8InputData[16]; -#else -__align(4) uint8_t au8OutputData[16]; -__align(4) uint8_t au8InputData[16]; -#endif +uint8_t au8OutputData[16] MBED_ALIGN(4); +uint8_t au8InputData[16] MBED_ALIGN(4); static void dumpHex(uint8_t au8Data[], int len) {