diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-10-04 12:26:48 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-10-04 12:26:48 +0000 |
commit | b51648943a5b39ca0aa39b0ffbb48fc70f6597ef (patch) | |
tree | b01c975fc3b23b8afd6582a78a970fb49dd2ae4e /nuttx/arch | |
parent | dfb71b78826f39c903325b675d6293f43348a2ed (diff) | |
download | px4-nuttx-b51648943a5b39ca0aa39b0ffbb48fc70f6597ef.tar.gz px4-nuttx-b51648943a5b39ca0aa39b0ffbb48fc70f6597ef.tar.bz2 px4-nuttx-b51648943a5b39ca0aa39b0ffbb48fc70f6597ef.zip |
Cloned AVR32 code now compiles
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2965 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rwxr-xr-x | nuttx/arch/avr/include/at91uc3/irq.h | 2 | ||||
-rw-r--r-- | nuttx/arch/avr/include/avr32/irq.h | 8 | ||||
-rwxr-xr-x | nuttx/arch/avr/src/at91uc3/at91uc3_internal.h | 62 | ||||
-rwxr-xr-x | nuttx/arch/avr/src/at91uc3/chip.h | 4 | ||||
-rw-r--r-- | nuttx/arch/avr/src/avr32/up_schedulesigaction.c | 1 | ||||
-rw-r--r-- | nuttx/arch/avr/src/avr32/up_sigdeliver.c | 9 |
6 files changed, 75 insertions, 11 deletions
diff --git a/nuttx/arch/avr/include/at91uc3/irq.h b/nuttx/arch/avr/include/at91uc3/irq.h index 395c88188..adb1cc18b 100755 --- a/nuttx/arch/avr/include/at91uc3/irq.h +++ b/nuttx/arch/avr/include/at91uc3/irq.h @@ -56,7 +56,7 @@ /* Total number of IRQ numbers */ -#define NR_IRQS +#define NR_IRQS 1 /**************************************************************************** * Public Types diff --git a/nuttx/arch/avr/include/avr32/irq.h b/nuttx/arch/avr/include/avr32/irq.h index cc8222e86..2425b9f30 100644 --- a/nuttx/arch/avr/include/avr32/irq.h +++ b/nuttx/arch/avr/include/avr32/irq.h @@ -50,9 +50,11 @@ * Definitions ****************************************************************************/ -/* Indices the register state save array */ +/* Register state save array indices */ -#defin XCPTCONTEXT_REGS 1 +/* Size of the register state save array */ + +#define XCPTCONTEXT_REGS 1 /**************************************************************************** * Public Types @@ -87,6 +89,7 @@ struct xcptcontext static inline irqstate_t irqsave(void) { +# warning "Not implemented" return 0; } @@ -94,6 +97,7 @@ static inline irqstate_t irqsave(void) static inline void irqrestore(irqstate_t flags) { +# warning "Not implemented" } #endif /* __ASSEMBLY__ */ diff --git a/nuttx/arch/avr/src/at91uc3/at91uc3_internal.h b/nuttx/arch/avr/src/at91uc3/at91uc3_internal.h new file mode 100755 index 000000000..a2bf10d6c --- /dev/null +++ b/nuttx/arch/avr/src/at91uc3/at91uc3_internal.h @@ -0,0 +1,62 @@ +/************************************************************************************ + * arch/avr/src/at91uc3b/at91uc3_internal.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_AVR_SRC_AVR32_AT91UC3_INTERNAL_H +#define __ARCH_AVR_SRC_AVR32_AT91UC3_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include <nuttx/config.h> + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_AVR_SRC_AVR32_AT91UC3_INTERNAL_H */ + diff --git a/nuttx/arch/avr/src/at91uc3/chip.h b/nuttx/arch/avr/src/at91uc3/chip.h index c5133d6c1..9e8ac83f7 100755 --- a/nuttx/arch/avr/src/at91uc3/chip.h +++ b/nuttx/arch/avr/src/at91uc3/chip.h @@ -48,7 +48,7 @@ /* Get customizations for each supported chip */ -#if 0 +#if CONFIG_ARCH_CHIP_AT91UC3B0256 #else # error "Unsupported AVR32 chip" #endif @@ -57,7 +57,7 @@ * file for the proper setup */ -#include "atuc3_memorymap.h" +#include "at91uc3_memorymap.h" /************************************************************************************ * Public Types diff --git a/nuttx/arch/avr/src/avr32/up_schedulesigaction.c b/nuttx/arch/avr/src/avr32/up_schedulesigaction.c index 7f7dff6a3..c5e6a7af5 100644 --- a/nuttx/arch/avr/src/avr32/up_schedulesigaction.c +++ b/nuttx/arch/avr/src/avr32/up_schedulesigaction.c @@ -45,7 +45,6 @@ #include <nuttx/arch.h> -#include "psr.h" #include "os_internal.h" #include "up_internal.h" #include "up_arch.h" diff --git a/nuttx/arch/avr/src/avr32/up_sigdeliver.c b/nuttx/arch/avr/src/avr32/up_sigdeliver.c index 2159ce0c0..1a8c2a7bc 100644 --- a/nuttx/arch/avr/src/avr32/up_sigdeliver.c +++ b/nuttx/arch/avr/src/avr32/up_sigdeliver.c @@ -112,16 +112,15 @@ void up_sigdeliver(void) /* Then restore the task interrupt state */ - irqrestore((uint16_t)regs[REG_PRIMASK]); +#warning "Not Implemented" /* Deliver the signals */ sigdeliver(rtcb); - /* Output any debug messaged BEFORE restoreing errno - * (becuase they may alter errno), then restore the - * original errno that is needed by the user logic - * (it is probably EINTR). + /* Output any debug messaged BEFORE restoring errno (becuase they may + * alter errno), then restore the original errno that is needed by + * the user logic (it is probably EINTR). */ sdbg("Resuming\n"); |