summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/kinetis
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/kinetis
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/kinetis')
-rw-r--r--nuttx/arch/arm/src/kinetis/Make.defs4
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c8
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_mpuinit.c4
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_mpuinit.h4
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_start.c2
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_userspace.c4
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_userspace.h2
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_vectors.S12
8 files changed, 20 insertions, 20 deletions
diff --git a/nuttx/arch/arm/src/kinetis/Make.defs b/nuttx/arch/arm/src/kinetis/Make.defs
index 6f0de0594..4e5689d27 100644
--- a/nuttx/arch/arm/src/kinetis/Make.defs
+++ b/nuttx/arch/arm/src/kinetis/Make.defs
@@ -58,7 +58,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
@@ -91,7 +91,7 @@ ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += kinetis_timerisr.c
endif
-ifeq ($(CONFIG_NUTTX_KERNEL),y)
+ifeq ($(CONFIG_BUILD_PROTECTED),y)
CHIP_CSRCS += kinetis_userspace.c kinetis_mpuinit.c
endif
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c b/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c
index fab0b3cb5..a03b13222 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c
@@ -76,7 +76,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.
*
@@ -105,7 +105,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).
@@ -151,13 +151,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.
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_mpuinit.c b/nuttx/arch/arm/src/kinetis/kinetis_mpuinit.c
index bd81374ff..07ea72229 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_mpuinit.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_mpuinit.c
@@ -46,7 +46,7 @@
#include "mpu.h"
#include "kinetis_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 kinetis_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/kinetis/kinetis_mpuinit.h b/nuttx/arch/arm/src/kinetis/kinetis_mpuinit.h
index 1e88b67a2..f3cf95370 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_mpuinit.h
+++ b/nuttx/arch/arm/src/kinetis/kinetis_mpuinit.h
@@ -67,7 +67,7 @@
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
void kinetis_mpuinitialize(void);
#else
# define kinetis_mpuinitialize()
@@ -81,7 +81,7 @@ void kinetis_mpuinitialize(void);
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
void kinetis_mpu_uheap(uintptr_t start, size_t size);
#else
# define kinetis_mpu_uheap(start,size)
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_start.c b/nuttx/arch/arm/src/kinetis/kinetis_start.c
index b611709a6..1d463ec2e 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_start.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_start.c
@@ -146,7 +146,7 @@ void __start(void)
* segments.
*/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
kinetis_userspace();
#endif
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_userspace.c b/nuttx/arch/arm/src/kinetis/kinetis_userspace.c
index d0d57145d..4fc37a090 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_userspace.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_userspace.c
@@ -47,7 +47,7 @@
#include "kinetis_mpuinit.h"
#include "kinetis_userspace.h"
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
/****************************************************************************
* Pre-processor Definitions
@@ -115,5 +115,5 @@ void kinetis_userspace(void)
kinetis_mpuinitialize();
}
-#endif /* CONFIG_NUTTX_KERNEL */
+#endif /* CONFIG_BUILD_PROTECTED */
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_userspace.h b/nuttx/arch/arm/src/kinetis/kinetis_userspace.h
index ecad3b609..39b4b6ef5 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_userspace.h
+++ b/nuttx/arch/arm/src/kinetis/kinetis_userspace.h
@@ -69,7 +69,7 @@
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_BUILD_PROTECTED
void kinetis_userspace(void);
#endif
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_vectors.S b/nuttx/arch/arm/src/kinetis/kinetis_vectors.S
index 8ba6db658..ed0ba52a1 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_vectors.S
+++ b/nuttx/arch/arm/src/kinetis/kinetis_vectors.S
@@ -63,7 +63,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
@@ -621,7 +621,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)
@@ -663,7 +663,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 */
@@ -751,7 +751,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 */
@@ -766,7 +766,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 */
@@ -791,7 +791,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)