summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_initialstate.c4
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_initialstate.c2
-rw-r--r--nuttx/arch/mips/src/mips32/up_swint0.c2
-rw-r--r--nuttx/sched/os_bringup.c2
4 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/armv6-m/up_initialstate.c b/nuttx/arch/arm/src/armv6-m/up_initialstate.c
index 646d148c1..97c048ef4 100644
--- a/nuttx/arch/arm/src/armv6-m/up_initialstate.c
+++ b/nuttx/arch/arm/src/armv6-m/up_initialstate.c
@@ -115,17 +115,18 @@ void up_initial_state(struct tcb_s *tcb)
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
}
+#ifdef CONFIG_NXFLAT
/* Make certain that bit 0 is set in the main entry address. This is
* only an issue when NXFLAT is enabled. NXFLAT doesn't know anything
* about thumb; the addresses that NXFLAT sets are based on file header
* info and won't have bit 0 set.
*/
-#ifdef CONFIG_NXFLAT
tcb->entry.main = (main_t)((uint32_t)tcb->entry.main | 1);
#endif
#endif /* CONFIG_PIC */
+#ifdef CONFIG_NUTTX_KERNEL
/* All tasks start via a stub function in kernel space. So all
* tasks must start in privileged thread mode. If CONFIG_NUTTX_KERNEL
* is defined, then that stub function will switch to unprivileged
@@ -133,6 +134,7 @@ void up_initial_state(struct tcb_s *tcb)
*/
xcp->regs[REG_EXC_RETURN] = EXC_RETURN_PRIVTHR;
+#endif
/* Enable or disable interrupts, based on user configuration */
diff --git a/nuttx/arch/arm/src/armv7-m/up_initialstate.c b/nuttx/arch/arm/src/armv7-m/up_initialstate.c
index 091115fba..c19d32f11 100644
--- a/nuttx/arch/arm/src/armv7-m/up_initialstate.c
+++ b/nuttx/arch/arm/src/armv7-m/up_initialstate.c
@@ -115,13 +115,13 @@ void up_initial_state(struct tcb_s *tcb)
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
}
+#ifdef CONFIG_NXFLAT
/* Make certain that bit 0 is set in the main entry address. This
* is only an issue when NXFLAT is enabled. NXFLAT doesn't know
* anything about thumb; the addresses that NXFLAT sets are based
* on file header info and won't have bit 0 set.
*/
-#ifdef CONFIG_NXFLAT
tcb->entry.main = (main_t)((uint32_t)tcb->entry.main | 1);
#endif
#endif /* CONFIG_PIC */
diff --git a/nuttx/arch/mips/src/mips32/up_swint0.c b/nuttx/arch/mips/src/mips32/up_swint0.c
index 9f7081fd3..7be82a9e7 100644
--- a/nuttx/arch/mips/src/mips32/up_swint0.c
+++ b/nuttx/arch/mips/src/mips32/up_swint0.c
@@ -130,7 +130,7 @@ static void dispatch_syscall(void)
/* Refer to arch/arm/src/armv7-m/up_svcall.h for how this is done for ARM */
/* __asm__ __volatile__ */
-/* (
+/* ( */
/* Save registers */
/* Get the base of the stub lookup table */
/* Get the offset of the stub for this syscall */
diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c
index 4ef493409..bdaa0e86a 100644
--- a/nuttx/sched/os_bringup.c
+++ b/nuttx/sched/os_bringup.c
@@ -232,7 +232,7 @@ int os_bringup(void)
(main_t)CONFIG_USER_ENTRYPOINT,
(FAR char * const *)NULL);
#endif
- DEBUGASSERT(taskid > 0);
+ ASSERT(taskid > 0);
/* We an save a few bytes by discarding the IDLE thread's environment. */