diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-15 01:32:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-15 01:32:47 +0000 |
commit | 327a0b5bfe1c679660c9d0ef41f9f5519215176c (patch) | |
tree | e770cbc528962f7ad283475c4678750ffee4a5cd /nuttx/arch/arm/src | |
parent | f3fda28e68f1c84447c73fc2514aa63f0f97fed4 (diff) | |
download | px4-nuttx-327a0b5bfe1c679660c9d0ef41f9f5519215176c.tar.gz px4-nuttx-327a0b5bfe1c679660c9d0ef41f9f5519215176c.tar.bz2 px4-nuttx-327a0b5bfe1c679660c9d0ef41f9f5519215176c.zip |
Fix more compile errors and warnings introduced in recent commits
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5744 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src')
-rw-r--r-- | nuttx/arch/arm/src/armv6-m/up_initialstate.c | 4 | ||||
-rw-r--r-- | nuttx/arch/arm/src/armv7-m/up_initialstate.c | 2 |
2 files changed, 4 insertions, 2 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 */ |