From 23db3b2a48ef3b283c80fded2129d2e2f4ff733f Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 11 Mar 2020 16:34:29 +0900 Subject: [PATCH] ESP32: Use __asm__ __volatile__ for inline assembly --- arch/xtensa/src/common/xtensa_idle.c | 2 +- arch/xtensa/src/esp32/esp32_cpustart.c | 2 +- arch/xtensa/src/esp32/esp32_start.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/xtensa/src/common/xtensa_idle.c b/arch/xtensa/src/common/xtensa_idle.c index 9c683e209c..4997a8bf8c 100644 --- a/arch/xtensa/src/common/xtensa_idle.c +++ b/arch/xtensa/src/common/xtensa_idle.c @@ -98,5 +98,5 @@ void up_idle(void) * sleep in a reduced power mode until an interrupt occurs to save power */ - asm("waiti 0"); + __asm__ __volatile__ ("waiti 0"); } diff --git a/arch/xtensa/src/esp32/esp32_cpustart.c b/arch/xtensa/src/esp32/esp32_cpustart.c index b57ad93136..14e8de06bb 100644 --- a/arch/xtensa/src/esp32/esp32_cpustart.c +++ b/arch/xtensa/src/esp32/esp32_cpustart.c @@ -195,7 +195,7 @@ void xtensa_appcpu_start(void) /* Move CPU0 exception vectors to IRAM */ - asm volatile ("wsr %0, vecbase\n"::"r" (&_init_start)); + __asm__ __volatile__ ("wsr %0, vecbase\n"::"r" (&_init_start)); /* Make page 0 access raise an exception */ diff --git a/arch/xtensa/src/esp32/esp32_start.c b/arch/xtensa/src/esp32/esp32_start.c index f4cd1d8431..df3f52e6b2 100644 --- a/arch/xtensa/src/esp32/esp32_start.c +++ b/arch/xtensa/src/esp32/esp32_start.c @@ -124,7 +124,7 @@ void IRAM_ATTR __start(void) /* Move CPU0 exception vectors to IRAM */ - asm volatile ("wsr %0, vecbase\n"::"r" (&_init_start)); + __asm__ __volatile__ ("wsr %0, vecbase\n"::"r" (&_init_start)); /* Set .bss to zero */