Resync new repository with old repo r5166

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5154 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-09-17 18:35:37 +00:00
parent a5f05e3e5b
commit 7a2692df6a
191 changed files with 2605 additions and 563 deletions
+22
View File
@@ -3349,3 +3349,25 @@
* configs/*/nxwm/defconfig and sched/task_exithook.c: Fixes for
bugs that crept in during recent changes. (Submitted by Max
Holtzberg).
* arch/arm/include/armv7-m/irq.h: Fix a critical bug in irqsave().
It looks like sometimes the compile will re-order some instructions
inapproapriately. This end result is that interrupts will get
stuff off.
* drivers/mtd/w25.c: Beginning of a driver for the Windbond SPI
FLASH family (W25x16, W25x32, and W25x64). The initial check-in
is basically just the SST25 driver with some name changes.
* arch/arm/include/armv7-m/irq.h and arch/arm/src/stm32/stm32_spi.c:
Back out the last change in irq.h. It is (most likely) fine the
way it was. The really interrupt related problem was in stm32_spi.c:
When SPI3 is not enabled, then the irqrestore() falls in the
else clause.
* include/nuttx/compiler.h and other files: Moved always_inline
and noinline __attributes__ here. Also replaced all occurrences
of explicit __atributes__ in other files with definitions from
this header file.
* drivers/mtd/w25.c: The Windbond SPI FLASH W25 FLASH driver is
code complete (but still untested).
* arch/arm/src/stm32/stm32_i2c.c: I2C improvements from Mike Smith.
Unified configuration logic; dynamic timeout calculations;
I2C reset logic to recover from locked devices on the bus.
+9 -9
View File
@@ -1,4 +1,4 @@
NuttX TODO List (Last updated August 12, 2012)
NuttX TODO List (Last updated September 16, 2012)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with
@@ -6,7 +6,7 @@ standards, things that could be improved, and ideas for enhancements.
nuttx/
(5) Task/Scheduler (sched/)
(6) Task/Scheduler (sched/)
(1) On-demand paging (sched/)
(1) Memory Managment (mm/)
(2) Signals (sched/, arch/)
@@ -110,6 +110,13 @@ o Task/Scheduler (sched/)
Status: Open
Priority: Low
Title: posix_spawn()
Description: This would be a good interface to add to NuttX. It is really
just a re-packaging of the existing, non-standard NuttX exec()
function.
Status: Open
Priority: Medium low.
o On-demand paging (sched/)
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -541,13 +548,6 @@ o Network (net/, drivers/net)
Status: Open
Priority: Low... fix defconfig files as necessary.
Title: UNFINISHED ENC28J60 DRIVER
Description: So far, I have not come up with a usable hardware platform to
verify the ENC28J60 Ethernet driver (drivers/net/enc28j60.c).
So it is untested.
Status: Open
Priority: Low unless you need it.
o USB (drivers/usbdev, drivers/usbhost)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+2 -2
View File
@@ -1,7 +1,7 @@
/************************************************************************
* up_assert.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -65,7 +65,7 @@
* Name: _up_assert
************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+5 -4
View File
@@ -153,13 +153,14 @@ config ARCH_HAVE_INTERRUPTSTACK
bool
config ARCH_INTERRUPTSTACK
bool "Use interrupt stack"
int "Interrupt Stack Size"
depends on ARCH_HAVE_INTERRUPTSTACK
default y
default 0
---help---
This architecture supports an interrupt stack. If defined, this symbol
is the size of the interrupt stack in bytes. If not defined, the user
task stacks will be used during interrupt handling.
will be the size of the interrupt stack in bytes. If not defined (or
defined to be zero), the user task stacks will be used during interrupt
handling.
comment "Boot options"
+1
View File
@@ -103,6 +103,7 @@ config ARCH_CHIP_STM32
bool "STMicro STM32"
select ARCH_HAVE_CMNVECTOR
select ARCH_HAVE_MPU
select ARCH_HAVE_I2CRESET
---help---
STMicro STM32 architectures (ARM Cortex-M3/4).
+20 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/include/armv7-m/irq.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@
#include <nuttx/irq.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <stdint.h>
#endif
@@ -131,6 +132,7 @@ struct xcptcontext
/* Disable IRQs */
static inline void irqdisable(void) inline_function;
static inline void irqdisable(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
@@ -138,6 +140,7 @@ static inline void irqdisable(void)
/* Save the current primask state & disable IRQs */
static inline irqstate_t irqsave(void) inline_function;
static inline irqstate_t irqsave(void)
{
unsigned short primask;
@@ -153,11 +156,13 @@ static inline irqstate_t irqsave(void)
: "=r" (primask)
:
: "memory");
return primask;
}
/* Enable IRQs */
static inline void irqenable(void) inline_function;
static inline void irqenable(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
@@ -165,6 +170,7 @@ static inline void irqenable(void)
/* Restore saved primask state */
static inline void irqrestore(irqstate_t primask) inline_function;
static inline void irqrestore(irqstate_t primask)
{
/* If bit 0 of the primask is 0, then we need to restore
@@ -184,6 +190,7 @@ static inline void irqrestore(irqstate_t primask)
/* Get/set the primask register */
static inline uint8_t getprimask(void) inline_function;
static inline uint8_t getprimask(void)
{
uint32_t primask;
@@ -193,9 +200,11 @@ static inline uint8_t getprimask(void)
: "=r" (primask)
:
: "memory");
return (uint8_t)primask;
}
static inline void setprimask(uint32_t primask) inline_function;
static inline void setprimask(uint32_t primask)
{
__asm__ __volatile__
@@ -208,18 +217,22 @@ static inline void setprimask(uint32_t primask)
/* Get/set the basepri register */
static inline uint8_t getbasepri(void) inline_function;
static inline uint8_t getbasepri(void)
{
uint32_t basepri;
__asm__ __volatile__
(
"\tmrs %0, basepri\n"
: "=r" (basepri)
:
: "memory");
return (uint8_t)basepri;
}
static inline void setbasepri(uint32_t basepri) inline_function;
static inline void setbasepri(uint32_t basepri)
{
__asm__ __volatile__
@@ -232,6 +245,7 @@ static inline void setbasepri(uint32_t basepri)
/* Get/set IPSR */
static inline uint32_t getipsr(void) inline_function;
static inline uint32_t getipsr(void)
{
uint32_t ipsr;
@@ -241,9 +255,11 @@ static inline uint32_t getipsr(void)
: "=r" (ipsr)
:
: "memory");
return ipsr;
}
static inline void setipsr(uint32_t ipsr) inline_function;
static inline void setipsr(uint32_t ipsr)
{
__asm__ __volatile__
@@ -256,6 +272,7 @@ static inline void setipsr(uint32_t ipsr)
/* Get/set CONTROL */
static inline uint32_t getcontrol(void) inline_function;
static inline uint32_t getcontrol(void)
{
uint32_t control;
@@ -265,9 +282,11 @@ static inline uint32_t getcontrol(void)
: "=r" (control)
:
: "memory");
return control;
}
static inline void setcontrol(uint32_t control) inline_function;
static inline void setcontrol(uint32_t control)
{
__asm__ __volatile__
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_assert.c
*
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -252,7 +252,7 @@ static void up_dumpstate(void)
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+1 -1
View File
@@ -74,7 +74,7 @@
/* SYS call 1:
*
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*/
#define SYS_restore_context (1)
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/armv7-m/up_assert.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -262,7 +262,7 @@ static void up_dumpstate(void)
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+1 -1
View File
@@ -69,7 +69,7 @@
* Description:
* Restore the current thread context. Full prototype is:
*
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*
* Return:
* None
+1 -1
View File
@@ -280,7 +280,7 @@ int up_svcall(int irq, FAR void *context)
/* R0=SYS_restore_context: This a restore context command:
*
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*
* At this point, the following values are saved in context:
*
+4 -1
View File
@@ -40,7 +40,10 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <sys/types.h>
# include <stdint.h>
#endif
@@ -223,7 +226,7 @@ extern void up_boot(void);
extern void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_decodeirq(uint32_t *regs);
extern int up_saveusercontext(uint32_t *saveregs);
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
/* Signal handling **********************************************************/
+61 -8
View File
@@ -191,14 +191,17 @@ menu "STM32 Peripheral Support"
config STM32_ADC1
bool "ADC1"
default n
select STM32_ADC
config STM32_ADC2
bool "ADC2"
default n
select STM32_ADC
config STM32_ADC3
bool "ADC3"
default n
select STM32_ADC
config STM32_CRC
bool "CRC"
@@ -228,12 +231,14 @@ config STM32_CAN1
bool "CAN1"
default n
select CAN
select STM32_CAN
config STM32_CAN2
bool "CAN2"
default n
depends on STM32_STM32F20XX || STM32_STM32F40XX
select CAN
select STM32_CAN
config STM32_CCMDATARAM
bool "CMD/DATA RAM"
@@ -248,10 +253,12 @@ config STM32_CRYP
config STM32_DAC1
bool "DAC1"
default n
select STM32_DAC
config STM32_DAC2
bool "DAC2"
default n
select STM32_DAC
config STM32_DCMI
bool "DCMI"
@@ -276,15 +283,18 @@ config STM32_HASH
config STM32_I2C1
bool "I2C1"
default n
select STM32_I2C
config STM32_I2C2
bool "I2C2"
default n
select STM32_I2C
config STM32_I2C3
bool "I2C3"
default n
depends on STM32_STM32F20XX || STM32_STM32F40XX
select STM32_I2C
config STM32_IWDG
bool "IWDG"
@@ -319,23 +329,27 @@ config STM32_SPI1
bool "SPI1"
default n
select SPI
select STM32_SPI
config STM32_SPI2
bool "SPI2"
default n
select SPI
select STM32_SPI
config STM32_SPI3
bool "SPI3"
default n
depends on STM32_STM32F20XX || STM32_STM32F40XX
select SPI
select STM32_SPI
config STM32_SPI4
bool "SPI4"
default n
depends on STM32_STM32F10XX
select SPI
select STM32_SPI
config STM32_SYSCFG
bool "SYSCFG"
@@ -450,19 +464,18 @@ endmenu
config STM32_ADC
bool
default y if STM32_ADC1 || STM32_ADC2 || STM32_ADC3
config STM32_DAC
bool
default y if STM32_DAC1 || STM32_ADC2
config STM32_SPI
bool
default y if STM32_SPI1 || STM32_SPI2 || STM32_SPI3 || STM32_SPI4
config STM32_I2C
bool
config STM32_CAN
bool
default y if STM32_CAN1 || STM32_CAN2
menu "Alternate Pin Mapping"
@@ -571,10 +584,10 @@ choice
config STM32_CAN1_NO_REMAP
bool "No pin remapping"
config CONFIG_STM32_CAN1_REMAP1
config STM32_CAN1_REMAP1
bool "CAN1 alternate pin remapping #1"
config CONFIG_STM32_CAN1_REMAP2
config STM32_CAN1_REMAP2
bool "CAN1 alternate pin remapping #2"
endchoice
@@ -1600,6 +1613,46 @@ config STM32_SPI_DMA
endmenu
menu "I2C Configuration"
depends on STM32_I2C
config STM32_I2C_DYNTIMEO
bool "Use dynamic timeouts"
default n
depends on STM32_I2C
config STM32_I2C_DYNTIMEO_USECPERBYTE
int "Timeout Microseconds per Byte"
default 0
depends on STM32_I2C_DYNTIMEO
config STM32_I2C_DYNTIMEO_STARTSTOP
int "Timeout for Start/Stop (Milliseconds)"
default 5000
depends on STM32_I2C_DYNTIMEO
config STM32_I2CTIMEOSEC
int "Timeout seconds"
default 0
depends on STM32_I2C
config STM32_I2CTIMEOMS
int "Timeout Milliseconds"
default 500
depends on STM32_I2C && !STM32_I2C_DYNTIMEO
config STM32_I2CTIMEOTICKS
int "Timeout for Done and Stop (ticks)"
default 500
depends on STM32_I2C && !STM32_I2C_DYNTIMEO
config STM32_I2C_DUTY16_9
bool "Frequency with Tlow/Thigh = 16/9 "
default n
depends on STM32_I2C
endmenu
menu "SDIO Configuration"
depends on STM32_SDIO
@@ -1826,13 +1879,13 @@ config STM32_USBHOST_REGDEBUG
default n
depends on USBHOST && STM32_OTGFS
---help---
Enable very low-level register access debug. Depends on CONFIG_DEBUG.
Enable very low-level register access debug. Depends on DEBUG.
config STM32_USBHOST_PKTDUMP
bool "Packet Dump Debug"
default n
depends on USBHOST && STM32_OTGFS
---help---
Dump all incoming and outgoing USB packets. Depends on CONFIG_DEBUG.
Dump all incoming and outgoing USB packets. Depends on DEBUG.
endmenu
File diff suppressed because it is too large Load Diff
+18 -13
View File
@@ -49,7 +49,7 @@
* 3. Add a calls to up_spiinitialize() in your low level application
* initialization logic
* 4. The handle returned by up_spiinitialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling
* SPI driver to higher level logic (e.g., calling
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver).
*
@@ -881,7 +881,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
else
{
/* Less than fPCLK/128. This is as slow as we can go */
setbits = SPI_CR1_FPCLCKd256; /* 111: fPCLK/256 */
actual = priv->spiclock >> 8;
}
@@ -941,22 +941,22 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
setbits = 0;
clrbits = SPI_CR1_CPOL|SPI_CR1_CPHA;
break;
case SPIDEV_MODE1: /* CPOL=0; CPHA=1 */
setbits = SPI_CR1_CPHA;
clrbits = SPI_CR1_CPOL;
break;
case SPIDEV_MODE2: /* CPOL=1; CPHA=0 */
setbits = SPI_CR1_CPOL;
clrbits = SPI_CR1_CPHA;
break;
case SPIDEV_MODE3: /* CPOL=1; CPHA=1 */
setbits = SPI_CR1_CPOL|SPI_CR1_CPHA;
clrbits = 0;
break;
default:
return;
}
@@ -1008,7 +1008,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits)
setbits = 0;
clrbits = SPI_CR1_DFF;
break;
case 16:
setbits = SPI_CR1_DFF;
clrbits = 0;
@@ -1111,7 +1111,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
}
/* Exchange one word */
word = spi_send(dev, word);
/* Is there a buffer to receive the return value? */
@@ -1120,7 +1120,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
{
*dest++ = word;
}
}
}
}
else
{
@@ -1144,7 +1144,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
}
/* Exchange one word */
word = (uint8_t)spi_send(dev, (uint16_t)word);
/* Is there a buffer to receive the return value? */
@@ -1152,7 +1152,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
if (dest)
{
*dest++ = word;
}
}
}
}
}
@@ -1331,7 +1331,7 @@ static void spi_portinitialize(FAR struct stm32_spidev_s *priv)
priv->txdma = stm32_dmachannel(priv->txch);
DEBUGASSERT(priv->rxdma && priv->txdma);
#endif
/* Enable spi */
spi_modifycr1(priv, SPI_CR1_SPE, 0);
@@ -1360,7 +1360,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
FAR struct stm32_spidev_s *priv = NULL;
irqstate_t flags = irqsave();
#ifdef CONFIG_STM32_SPI1
if (port == 1)
{
@@ -1431,7 +1431,12 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
spi_portinitialize(priv);
}
}
else
#endif
{
spidbg("ERROR: Unsupported SPI port: %d\n", port);
return NULL;
}
irqrestore(flags);
return (FAR struct spi_dev_s *)priv;
+5 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/avr/src/avr/avr_internal.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,10 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <sys/types.h>
# include <stdint.h>
# include <stdbool.h>
@@ -111,7 +114,7 @@ extern void up_copystate(uint8_t *dest, uint8_t *src);
*
************************************************************************************/
extern void up_fullcontextrestore(uint8_t *restoreregs) __attribute__ ((noreturn));
extern void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function;
/************************************************************************************
* Name: up_switchcontext
+5 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/avr/src/avr32/up_internal.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,10 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <stdint.h>
#endif
@@ -109,7 +112,7 @@ extern void up_copystate(uint32_t *dest, uint32_t *src);
*
************************************************************************************/
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
/************************************************************************************
* Name: up_switchcontext
+1 -1
View File
@@ -90,7 +90,7 @@
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+3 -1
View File
@@ -41,7 +41,9 @@
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <stdint.h>
#endif
@@ -152,7 +154,7 @@ extern void up_copystate(uint8_t *dest, uint8_t *src);
extern void up_decodeirq(uint8_t *regs);
extern void up_irqinitialize(void);
extern int up_saveusercontext(uint8_t *saveregs);
extern void up_fullcontextrestore(uint8_t *restoreregs) __attribute__ ((noreturn));
extern void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function;
extern void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs);
/* Interrupt handling */
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/hc/src/m9s12/m9s12_assert.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -247,7 +247,7 @@ static void up_dumpstate(void)
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/include/mips32/syscall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -150,7 +150,7 @@
/* SYS call 1:
*
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*/
#define SYS_restore_context (1)
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/mips32/up_assert.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -90,7 +90,7 @@
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/mips32/up_swint0.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -290,7 +290,7 @@ int up_swint0(int irq, FAR void *context)
{
/* R4=SYS_restore_context: This a restore context command:
*
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*
* At this point, the following values are saved in context:
*
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/common/up_assert.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -76,7 +76,7 @@
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+4 -1
View File
@@ -40,7 +40,10 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <stdint.h>
#endif
@@ -144,7 +147,7 @@ extern void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_dataabort(uint32_t *regs);
extern void up_decodeirq(uint32_t *regs);
extern uint32_t *up_doirq(int irq, uint32_t *regs);
extern void up_fullcontextrestore(uint32_t *regs) __attribute__ ((noreturn));
extern void up_fullcontextrestore(uint32_t *regs) noreturn_function;
extern void up_irqinitialize(void);
extern void up_prefetchabort(uint32_t *regs);
extern int up_saveusercontext(uint32_t *regs);
+2 -1
View File
@@ -41,6 +41,7 @@
**************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
#include <sys/types.h>
#include <nuttx/irq.h>
@@ -150,7 +151,7 @@ extern volatile int g_eventloop;
/* up_setjmp.S ************************************************************/
extern int up_setjmp(int *jb);
extern void up_longjmp(int *jb, int val) __attribute__ ((noreturn));
extern void up_longjmp(int *jb, int val) noreturn_function;
/* up_devconsole.c ********************************************************/
+6 -4
View File
@@ -45,7 +45,9 @@
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <stdint.h>
#endif
@@ -323,7 +325,7 @@ struct gdt_entry_s
uint8_t access; /* Access flags, determine ring segment can be used in */
uint8_t granularity;
uint8_t hibase; /* The last 8 bits of the base */
} __attribute__((packed));
} packed_struct;
/* This structure refers to the array of GDT entries, and is in the format
* required by the lgdt instruction.
@@ -333,7 +335,7 @@ struct gdt_ptr_s
{
uint16_t limit; /* The upper 16 bits of all selector limits */
uint32_t base; /* The address of the first GDT entry */
} __attribute__((packed));
} packed_struct;
/* IDT data structures ******************************************************
*
@@ -349,7 +351,7 @@ struct idt_entry_s
uint8_t zero; /* This must always be zero */
uint8_t flags; /* (See documentation) */
uint16_t hibase; /* Upper 16-bits of vector address for interrupt */
} __attribute__((packed));
} packed_struct;
/* A struct describing a pointer to an array of interrupt handlers. This is
* in a format suitable for giving to 'lidt'.
@@ -359,7 +361,7 @@ struct idt_ptr_s
{
uint16_t limit;
uint32_t base; /* The address of the first GDT entry */
} __attribute__((packed));
} packed_struct;
/****************************************************************************
* Inline functions
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/x86/src/common/up_assert.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -209,7 +209,7 @@ static void up_dumpstate(void)
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+4 -1
View File
@@ -40,7 +40,10 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <stdint.h>
#endif
@@ -174,7 +177,7 @@ extern void up_irqinitialize(void);
extern void weak_function up_dmainitialize(void);
#endif
extern int up_saveusercontext(uint32_t *saveregs);
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
extern void up_sigdeliver(void);
extern void up_lowputc(char ch);
+2 -1
View File
@@ -39,6 +39,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
#include <string.h>
@@ -62,7 +63,7 @@
* Private Function Prototypes
****************************************************************************/
static void idt_outb(uint8_t val, uint16_t addr) __attribute__((noinline));
static void idt_outb(uint8_t val, uint16_t addr) noinline_function;
static void up_remappic(void);
static void up_idtentry(unsigned int index, uint32_t base, uint16_t sel,
uint8_t flags);
+2 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************
* arch/x86/src/qemu/qemu_fullcontextrestore.S
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -89,7 +89,7 @@
* Name: up_fullcontextrestore
*
* Full C prototype:
* void up_fullcontextrestore(uint32_t *regs) __attribute__ ((noreturn));
* void up_fullcontextrestore(uint32_t *regs) noreturn_function;
*
**************************************************************************/
+3 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/x86/src/qemu/qemu_handlers.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
#include <nuttx/arch.h>
#include <arch/io.h>
@@ -52,7 +53,7 @@
* Private Function Prototypes
****************************************************************************/
static void idt_outb(uint8_t val, uint16_t addr) __attribute__((noinline));
static void idt_outb(uint8_t val, uint16_t addr) noinline_function;
/****************************************************************************
* Private Data
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_assert.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -77,7 +77,7 @@
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_assert.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -77,7 +77,7 @@
* Name: _up_assert
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
+1 -1
View File
@@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=4096
CONFIG_DRAM_START=0x800100
CONFIG_ARCH_NOINTC=y
CONFIG_ARCH_IRQPRIO=n
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=n
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=32768
CONFIG_DRAM_START=0x00000000
CONFIG_ARCH_NOINTC=y
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=32768
CONFIG_DRAM_START=0x00000000
CONFIG_ARCH_NOINTC=y
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=65536
CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_NOINTC=y
CONFIG_ARCH_IRQPRIO=n
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608
CONFIG_DRAM_START=0x11028000
CONFIG_DRAM_VSTART=0x11028000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608
CONFIG_DRAM_START=0x11028000
CONFIG_DRAM_VSTART=0x11028000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608
CONFIG_DRAM_START=0x11028000
CONFIG_DRAM_VSTART=0x11028000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608
CONFIG_DRAM_START=0x11028000
CONFIG_DRAM_VSTART=0x11028000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608
CONFIG_DRAM_START=0x11028000
CONFIG_DRAM_VSTART=0x11028000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608
CONFIG_DRAM_START=0x11028000
CONFIG_DRAM_VSTART=0x11028000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531
CONFIG_DRAM_SIZE=65536
CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531
CONFIG_DRAM_SIZE=65536
CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531
CONFIG_DRAM_SIZE=65536
CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531
CONFIG_DRAM_SIZE=65536
CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531
CONFIG_DRAM_SIZE=65536
CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y
+1 -1
View File
@@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531
CONFIG_DRAM_SIZE=65536
CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y

Some files were not shown because too many files have changed in this diff Show More