Skip to content

Commit 2bcb1f7

Browse files
committed
Fix aes compile error with gcc
1 parent c4605e5 commit 2bcb1f7

File tree

1 file changed

+3
-9
lines changed
  • hal/targets/hal/TARGET_NUVOTON/TARGET_NUC472

1 file changed

+3
-9
lines changed

hal/targets/hal/TARGET_NUVOTON/TARGET_NUC472/aes_alt.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#endif /* MBEDTLS_SELF_TEST */
5353

5454
#include "NUC472_442.h"
55+
#include "toolchain.h"
5556

5657
//static int aes_init_done = 0;
5758

@@ -72,15 +73,8 @@ static uint32_t au32MyAESIV[4] = {
7273

7374
extern volatile int g_AES_done;
7475

75-
#ifdef __ICCARM__
76-
#pragma data_alignment=4
77-
uint8_t au8OutputData[16];
78-
#pragma data_alignment=4
79-
uint8_t au8InputData[16];
80-
#else
81-
__align(4) uint8_t au8OutputData[16];
82-
__align(4) uint8_t au8InputData[16];
83-
#endif
76+
uint8_t au8OutputData[16] MBED_ALIGN(4);
77+
uint8_t au8InputData[16] MBED_ALIGN(4);
8478

8579
static void dumpHex(uint8_t au8Data[], int len)
8680
{

0 commit comments

Comments
 (0)