summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc17xx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-29 14:47:22 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-29 14:47:22 -0600
commit64892e44f2ce2612c77b1b20497fb007adafafb8 (patch)
tree2c917f29727a017b85193ac85959663d504b26e5 /nuttx/arch/arm/src/lpc17xx
parentc48af0eb9c61462f59a7ba63ca7a73e8df146f49 (diff)
downloadnuttx-64892e44f2ce2612c77b1b20497fb007adafafb8.tar.gz
nuttx-64892e44f2ce2612c77b1b20497fb007adafafb8.tar.bz2
nuttx-64892e44f2ce2612c77b1b20497fb007adafafb8.zip
Rename CONFIG_NUTTX_KERNEL to CONFIG_BUILD_PROTECTED; Partially integrate new CONFIG_BUILD_KERNEL
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx')
-rw-r--r--nuttx/arch/arm/src/lpc17xx/Make.defs4
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c10
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.c4
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.h4
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_start.c2
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_userspace.c4
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_userspace.h2
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S12
8 files changed, 21 insertions, 21 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/Make.defs b/nuttx/arch/arm/src/lpc17xx/Make.defs
index 19114864b..539e5de71 100644
--- a/nuttx/arch/arm/src/lpc17xx/Make.defs
+++ b/nuttx/arch/arm/src/lpc17xx/Make.defs
@@ -70,7 +70,7 @@ ifeq ($(CONFIG_ARCH_MEMCPY),y)
CMN_ASRCS += up_memcpy.S
endif
-ifeq ($(CONFIG_NUTTX_KERNEL),y)
+ifeq ($(CONFIG_BUILD_PROTECTED),y)
CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
@@ -113,7 +113,7 @@ ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
CHIP_ASRCS += lpc17_vectors.S
endif
-ifeq ($(CONFIG_NUTTX_KERNEL),y)
+ifeq ($(CONFIG_BUILD_PROTECTED),y)
CHIP_CSRCS += lpc17_userspace.c lpc17_mpuinit.c
endif
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c b/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
index cc84be352..e5116a96a 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
@@ -186,7 +186,7 @@
* Description:
* This function will be called to dynamically set aside the heap region.
*
- * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
+ * For the kernel build (CONFIG_BUILD_PROTECTED=y) with both kernel- and
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
@@ -215,7 +215,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
-#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
+#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)
/* Get the unaligned size and position of the user-space heap.
* This heap begins after the user-space .bss section at an offset
* of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment).
@@ -261,13 +261,13 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
* Name: up_allocate_kheap
*
* Description:
- * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
+ * For the kernel build (CONFIG_BUILD_PROTECTED=y) with both kernel- and
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function allocates
* (and protects) the kernel-space heap.
*
****************************************************************************/
-#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
+#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
{
/* Get the unaligned size and position of the user-space heap.
@@ -326,7 +326,7 @@ void up_addregion(void)
*/
#ifdef LPC17_AHB_HEAPBASE
-#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
+#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)
/* Yes.. allow user-mode access to the AHB SRAM user heap memory */
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.c b/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.c
index 046f6e703..c8ccee51f 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.c
@@ -46,7 +46,7 @@
#include "mpu.h"
#include "lpc17_mpuinit.h"
-#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_ARMV7M_MPU)
+#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARMV7M_MPU)
/****************************************************************************
* Private Definitions
@@ -120,5 +120,5 @@ void lpc17_mpu_uheap(uintptr_t start, size_t size)
mpu_userintsram(start, size);
}
-#endif /* CONFIG_NUTTX_KERNEL && CONFIG_ARMV7M_MPU */
+#endif /* CONFIG_BUILD_PROTECTED && CONFIG_ARMV7M_MPU */
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.h b/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.h
index 4d0e6944f..145789532 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.h
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_mpuinit.h
@@ -67,7 +67,7 @@
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
void lpc17_mpuinitialize(void);
#else
# define lpc17_mpuinitialize()
@@ -81,7 +81,7 @@ void lpc17_mpuinitialize(void);
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
void lpc17_mpu_uheap(uintptr_t start, size_t size);
#else
# define lpc17_mpu_uheap(start,size)
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_start.c b/nuttx/arch/arm/src/lpc17xx/lpc17_start.c
index 80f136f11..2cfb16f39 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_start.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_start.c
@@ -239,7 +239,7 @@ void __start(void)
* segments.
*/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
lpc17_userspace();
showprogress('E');
#endif
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.c b/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.c
index 8a2d23dde..3e8f4e774 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.c
@@ -47,7 +47,7 @@
#include "lpc17_mpuinit.h"
#include "lpc17_userspace.h"
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
/****************************************************************************
* Pre-processor Definitions
@@ -115,5 +115,5 @@ void lpc17_userspace(void)
lpc17_mpuinitialize();
}
-#endif /* CONFIG_NUTTX_KERNEL */
+#endif /* CONFIG_BUILD_PROTECTED */
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.h b/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.h
index 880e52eda..5adb8771c 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.h
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_userspace.h
@@ -69,7 +69,7 @@
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
void lpc17_userspace(void);
#endif
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S b/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S
index 9e54b3048..555bf0ddc 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S
@@ -64,7 +64,7 @@
* nested interrupt, the interrupt stack if no privileged task has run.
*/
-# if defined(CONFIG_NUTTX_KERNEL) && CONFIG_ARCH_INTERRUPTSTACK < 4
+# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 4
# error Interrupt stack must be used with high priority interrupts in kernel mode
# endif
@@ -233,7 +233,7 @@ exception_common:
/* Complete the context save */
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
/* The EXC_RETURN value will be 0xfffffff9 (privileged thread) or 0xfffffff1
* (handler mode) if the stack is on the MSP. It can only be on the PSP if
* EXC_RETURN is 0xfffffffd (unprivileged thread)
@@ -275,7 +275,7 @@ exception_common:
* r14=register values.
*/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
stmdb sp!, {r2-r11,r14} /* Save the remaining registers plus the SP value */
#else
stmdb sp!, {r2-r11} /* Save the remaining registers plus the SP value */
@@ -363,7 +363,7 @@ exception_common:
ldmia r1, {r4-r11} /* Fetch eight registers in HW save area */
ldr r1, [r0, #(4*REG_SP)] /* R1=Value of SP before interrupt */
stmdb r1!, {r4-r11} /* Store eight registers in HW save area */
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
ldmia r0, {r2-r11,r14} /* Recover R4-R11, r14 + 2 temp values */
#else
ldmia r0, {r2-r11} /* Recover R4-R11 + 2 temp values */
@@ -378,7 +378,7 @@ exception_common:
*/
2:
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
ldmia r1!, {r2-r11,r14} /* Recover R4-R11, r14 + 2 temp values */
#else
ldmia r1!, {r2-r11} /* Recover R4-R11 + 2 temp values */
@@ -403,7 +403,7 @@ exception_common:
3:
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
/* The EXC_RETURN value will be 0xfffffff9 (privileged thread) or 0xfffffff1
* (handler mode) if the stack is on the MSP. It can only be on the PSP if
* EXC_RETURN is 0xfffffffd (unprivileged thread)