summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-07 01:54:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-07 01:54:59 +0000
commit0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa (patch)
tree655d2b930b49f60fb64154d8be99e45612987f15 /nuttx/arch
parent20ff4c56d20fe8c22d6ac44c02efd1252b32ade6 (diff)
downloadpx4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.tar.gz
px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.tar.bz2
px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.zip
Fix AVR build, Add hooks for kernel threads
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3477 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/avr/src/Makefile5
-rw-r--r--nuttx/arch/hc/src/common/up_doirq.c2
-rwxr-xr-xnuttx/arch/hc/src/common/up_internal.h2
3 files changed, 2 insertions, 7 deletions
diff --git a/nuttx/arch/avr/src/Makefile b/nuttx/arch/avr/src/Makefile
index 531a2100d..1704aad62 100644
--- a/nuttx/arch/avr/src/Makefile
+++ b/nuttx/arch/avr/src/Makefile
@@ -108,11 +108,6 @@ nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx"
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) $(EXTRA_OBJS) \
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
-ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
- @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \
- $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage
- @mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT)
-endif
@$(NM) $(NUTTX)$(EXEEXT) | \
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
sort > $(TOPDIR)/System.map
diff --git a/nuttx/arch/hc/src/common/up_doirq.c b/nuttx/arch/hc/src/common/up_doirq.c
index adb3f81ce..4fc52224e 100644
--- a/nuttx/arch/hc/src/common/up_doirq.c
+++ b/nuttx/arch/hc/src/common/up_doirq.c
@@ -101,7 +101,7 @@ uint8_t *up_doirq(int irq, uint8_t *regs)
* switch occurred during interrupt processing.
*/
- regs = current_regs;
+ regs = (uint8_t*)current_regs;
/* Restore the previous value of current_regs. NULL would indicate that
* we are no longer in an interrupt handler. It will be non-NULL if we
diff --git a/nuttx/arch/hc/src/common/up_internal.h b/nuttx/arch/hc/src/common/up_internal.h
index 1a30f28e5..efc4ce4b0 100755
--- a/nuttx/arch/hc/src/common/up_internal.h
+++ b/nuttx/arch/hc/src/common/up_internal.h
@@ -101,7 +101,7 @@ typedef void (*up_vector_t)(void);
* structure. If is non-NULL only during interrupt processing.
*/
-extern uint8_t *current_regs;
+extern volatile uint8_t *current_regs;
/* This is the beginning of heap as provided from processor-specific logic.
* This is the first address in RAM after the loaded program+bss+idle stack.