summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/src/atmega
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-08 18:10:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-08 18:10:55 +0000
commitc626aec4434149e17e4cd98174e59095a3a06e05 (patch)
tree7c1b6cbe99bb7af241fce8d7455181d9c025b73c /nuttx/arch/avr/src/atmega
parent583f057b1912513fce544714949e29fbe8bdf253 (diff)
downloadpx4-nuttx-c626aec4434149e17e4cd98174e59095a3a06e05.tar.gz
px4-nuttx-c626aec4434149e17e4cd98174e59095a3a06e05.tar.bz2
px4-nuttx-c626aec4434149e17e4cd98174e59095a3a06e05.zip
More AVR context switching logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3683 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/src/atmega')
-rw-r--r--nuttx/arch/avr/src/atmega/Make.defs16
-rwxr-xr-xnuttx/arch/avr/src/atmega/atmega_head.S7
2 files changed, 19 insertions, 4 deletions
diff --git a/nuttx/arch/avr/src/atmega/Make.defs b/nuttx/arch/avr/src/atmega/Make.defs
index 3699543dd..9bcf64ea0 100644
--- a/nuttx/arch/avr/src/atmega/Make.defs
+++ b/nuttx/arch/avr/src/atmega/Make.defs
@@ -40,10 +40,18 @@ HEAD_ASRC = atmega_head.S
# Common AVR files
CMN_ASRCS = up_switchcontext.S
-CMN_CSRCS = up_allocateheap.c up_copystate.c up_createstack.c up_exit.c \
- up_idle.c up_initialize.c up_interruptcontext.c up_lowputs.c \
- up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \
- up_puts.c up_releasestack.c up_udelay.c up_usestack.c
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
+ up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c \
+ up_interruptcontext.c up_lowputs.c up_mdelay.c up_modifyreg8.c \
+ up_modifyreg16.c up_modifyreg32.c up_puts.c up_releasepending.c \
+ up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c \
+ up_sigdeliver.c up_udelay.c up_unblocktask.c up_usestack.c
+
+# Configuration-dependent common files
+
+ifeq ($(CONFIG_ARCH_STACKDUMP),y)
+CMN_CSRCS += up_dumpstate.c
+endif
# Required ATMEGA files
diff --git a/nuttx/arch/avr/src/atmega/atmega_head.S b/nuttx/arch/avr/src/atmega/atmega_head.S
index aff46a39e..2ebd8ecec 100755
--- a/nuttx/arch/avr/src/atmega/atmega_head.S
+++ b/nuttx/arch/avr/src/atmega/atmega_head.S
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <arch/irq.h>
#include <avr/io.h>
#include <avr/sfr_defs.h>
@@ -186,6 +187,9 @@ __start:
/* Copy initial global data values from FLASH into RAM */
+ .global __do_copy_data; /* Required to suppress dragging in logic from libgcc */
+__do_copy_data:
+
#ifdef HAVE_RAMPZ
ldi r17, hi8(_edata)
ldi r26, lo8(_sdata)
@@ -223,6 +227,9 @@ __start:
/* Clear uninitialized data */
+ .global __do_clear_bss; /* Required to suppress dragging in logic from libgcc */
+__do_clear_bss:
+
ldi r17, hi8(_ebss)
ldi r26, lo8(_sbss)
ldi r27, hi8(_sbss)