From a41c98952cc7c13233afa01d9c8b168923739261 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 23 Oct 2016 13:33:48 -0600 Subject: [PATCH] Xtensa: Fix some compilation issues --- arch/xtensa/include/irq.h | 2 +- arch/xtensa/src/lx6/Toolchain.defs | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/include/irq.h b/arch/xtensa/include/irq.h index 4082567501..c973d0fe45 100644 --- a/arch/xtensa/include/irq.h +++ b/arch/xtensa/include/irq.h @@ -219,7 +219,7 @@ static inline uint32_t up_irq_save(void) __asm__ __volatile__ ( - "psil %0, %1" : "=r"(ps) : "I"(XCHAL_EXCM_LEVEL) + "rsil %0, %1" : "=r"(ps) : "I"(XCHAL_EXCM_LEVEL) ); /* Return the previous PS value so that it can be restored with diff --git a/arch/xtensa/src/lx6/Toolchain.defs b/arch/xtensa/src/lx6/Toolchain.defs index b18659fe55..7e810c5498 100644 --- a/arch/xtensa/src/lx6/Toolchain.defs +++ b/arch/xtensa/src/lx6/Toolchain.defs @@ -33,4 +33,26 @@ # ############################################################################ + +# Supported toolchains +# +# Each toolchain definition should set: +# +# CROSSDEV The GNU toolchain triple (command prefix) +# ARCROSSDEV If required, an alternative prefix used when +# invoking ar and nm. +# ARCHCPUFLAGS CPU-specific flags selecting the instruction set +# FPU options, etc. +# MAXOPTIMIZATION The maximum optimization level that results in +# reliable code generation. +# + CROSSDEV = xtensa-esp32-elf- + +ARCHCPUFLAGS = + +ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) + MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) +else + MAXOPTIMIZATION := -Os +endif