summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/arch/arm/src/common/up_internal.h21
-rw-r--r--nuttx/configs/zkit-arm-1769/src/Makefile32
2 files changed, 32 insertions, 21 deletions
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 87fad04bd..6e874b2ca 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -112,11 +112,15 @@
/* Macros to handle saving and restoring interrupt state. In the current ARM
* model, the state is always copied to and from the stack and TCB. In the
- * Cortex-M3 model, the state is copied from the stack to the TCB, but only
- * a referenced is passed to get the state from the TCB.
+ * Cortex-M0/3 model, the state is copied from the stack to the TCB, but only
+ * a referenced is passed to get the state from the TCB. Cortex-M4 is the
+ * same, but may have additional complexity for floating point support in
+ * some configurations.
*/
-#if defined(CONFIG_ARCH_CORTEXM3) || defined(CONFIG_ARCH_CORTEXM4)
+#if defined(CONFIG_ARCH_CORTEXM0) || defined(CONFIG_ARCH_CORTEXM3) || \
+ defined(CONFIG_ARCH_CORTEXM4)
+
# if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_ARMV7M_CMNVECTOR)
# define up_savestate(regs) \
do { \
@@ -128,9 +132,12 @@
# define up_savestate(regs) up_copystate(regs, (uint32_t*)current_regs)
# endif
# define up_restorestate(regs) (current_regs = regs)
+
#else
+
# define up_savestate(regs) up_copystate(regs, (uint32_t*)current_regs)
# define up_restorestate(regs) up_copystate((uint32_t*)current_regs, regs)
+
#endif
/****************************************************************************
@@ -164,7 +171,8 @@ extern const uint32_t g_heapbase;
/* Address of the saved user stack pointer */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
-#if defined(CONFIG_ARCH_CORTEXM3) || defined(CONFIG_ARCH_CORTEXM4)
+#if defined(CONFIG_ARCH_CORTEXM0) || defined(CONFIG_ARCH_CORTEXM3) || \
+ defined(CONFIG_ARCH_CORTEXM4)
extern uint32_t g_intstackbase;
# else
extern uint32_t g_userstack;
@@ -254,7 +262,8 @@ void up_pminitialize(void);
# define up_pminitialize()
#endif
-#if defined(CONFIG_ARCH_CORTEXM3) || defined(CONFIG_ARCH_CORTEXM4)
+#if defined(CONFIG_ARCH_CORTEXM0) || defined(CONFIG_ARCH_CORTEXM3) || \
+ defined(CONFIG_ARCH_CORTEXM4)
void up_systemreset(void) noreturn_function;
#endif
@@ -290,7 +299,7 @@ void up_prefetchabort(uint32_t *regs);
void up_syscall(uint32_t *regs);
void up_undefinedinsn(uint32_t *regs);
-#endif /* CONFIG_ARCH_CORTEXM3 || CONFIG_ARCH_CORTEXM4 */
+#endif /* CONFIG_ARCH_CORTEXM0 || CONFIG_ARCH_CORTEXM3 || CONFIG_ARCH_CORTEXM4 */
void up_vectorundefinsn(void);
void up_vectorswi(void);
diff --git a/nuttx/configs/zkit-arm-1769/src/Makefile b/nuttx/configs/zkit-arm-1769/src/Makefile
index f766616cd..f16354913 100644
--- a/nuttx/configs/zkit-arm-1769/src/Makefile
+++ b/nuttx/configs/zkit-arm-1769/src/Makefile
@@ -40,32 +40,34 @@
-include $(TOPDIR)/Make.defs
-CFLAGS += -I$(TOPDIR)/sched
-
-ASRCS =
-CSRCS = up_boot.c up_leds.c up_ssp.c
+ASRCS =
+CSRCS = up_boot.c up_leds.c up_ssp.c
ifeq ($(CONFIG_NSH_ARCHINIT),y)
-CSRCS += up_nsh.c
+CSRCS += up_nsh.c
endif
ifeq ($(CONFIG_USBMSC),y)
-CSRCS += up_usbmsc.c
+CSRCS += up_usbmsc.c
endif
-AOBJS = $(ASRCS:.S=$(OBJEXT))
-COBJS = $(CSRCS:.c=$(OBJEXT))
+AOBJS = $(ASRCS:.S=$(OBJEXT))
+COBJS = $(CSRCS:.c=$(OBJEXT))
-SRCS = $(ASRCS) $(CSRCS)
-OBJS = $(AOBJS) $(COBJS)
+SRCS = $(ASRCS) $(CSRCS)
+OBJS = $(AOBJS) $(COBJS)
-ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
+ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
ifeq ($(WINTOOL),y)
- CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
- -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
- -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
+ CFLAGS += -I "${shell cygpath -w $(TOPDIR)/sched}"
+ CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}"
+ CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/common}"
+ CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
else
- CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m
+ CFLAGS += -I$(TOPDIR)/sched
+ CFLAGS += -I$(ARCH_SRCDIR)/chip
+ CFLAGS += -I$(ARCH_SRCDIR)/common
+ CFLAGS += -I$(ARCH_SRCDIR)/armv7-m
endif
all: libboard$(LIBEXT)