Misc clean; mark assertions as non-returning; allow toolchain prefix to be overriden from make command line

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5591 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2013-01-31 23:29:34 +00:00
parent bca9260b06
commit 1b94639432
17 changed files with 102 additions and 72 deletions

View file

@ -4074,3 +4074,8 @@
removable serial devices (like USB serial). This support is enabled removable serial devices (like USB serial). This support is enabled
by CONFIG_SERIAL_REMOVABLE and requires VBUS sensing support from by CONFIG_SERIAL_REMOVABLE and requires VBUS sensing support from
the board-specific logic. the board-specific logic.
* arch/*/src/*/Toolchain.defs: Change assignment so that we can
override CROSSDEV with a make command line argument.
* include/assert.h: Mark assertion functions as non-returning.
* arch/*/src/*/up_assert.h: Mark _up_assert() as non-returning.

View file

@ -523,8 +523,15 @@ NuttX Buildroot Toolchain
Disadvantages: This tool chain is not was well supported as some other Disadvantages: This tool chain is not was well supported as some other
toolchains. GNU tools are not my priority and so the buildroot tools toolchains. GNU tools are not my priority and so the buildroot tools
often get behind. For example, the is still no EABI support in the often get behind. For example, until recently there was no EABI support
NuttX buildroot toolchain for ARM. in the NuttX buildroot toolchain for ARM.
NOTE: For Cortex-M3/4, there are OABI and EABI versions of the buildroot
toolchains. If you are using the older OABI toolchain the prefix for
the tools will be arm-nuttx-elf-; for the EABI toolchin the prefix will
be arm-nuttx-eabi-. If you are using the older OABI toolchain with
an ARM Cortex-M3/4, you will need to set CONFIG_ARMV7M_OABI_TOOLCHAIN
in the .config file in order to pick the right tool prefix.
SHELLS SHELLS
^^^^^^ ^^^^^^

View file

@ -65,7 +65,8 @@
* Name: _up_assert * Name: _up_assert
************************************************************************/ ************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# arch/arm/src/armv/Toolchain.defs # arch/arm/src/armv/Toolchain.defs
# #
# Copyright (C) 2012 Gregory Nutt. All rights reserved. # Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -103,11 +103,11 @@ endif
ifeq ($(CONFIG_ARM_TOOLCHAIN),BUILDROOT) ifeq ($(CONFIG_ARM_TOOLCHAIN),BUILDROOT)
ifeq ($(CONFIG_ARM_OABI_TOOLCHAIN),y) ifeq ($(CONFIG_ARM_OABI_TOOLCHAIN),y)
CROSSDEV = arm-nuttx-elf- CROSSDEV ?= arm-nuttx-elf-
ARCROSSDEV = arm-nuttx-elf- ARCROSSDEV ?= arm-nuttx-elf-
else else
CROSSDEV = arm-nuttx-eabi- CROSSDEV ?= arm-nuttx-eabi-
ARCROSSDEV = arm-nuttx-eabi- ARCROSSDEV ?= arm-nuttx-eabi-
endif endif
MAXOPTIMIZATION = -Os MAXOPTIMIZATION = -Os
endif endif
@ -115,16 +115,16 @@ endif
# CodeSourcery under Linux # CodeSourcery under Linux
ifeq ($(CONFIG_ARM_TOOLCHAIN),CODESOURCERYL) ifeq ($(CONFIG_ARM_TOOLCHAIN),CODESOURCERYL)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
endif endif
# CodeSourcery under Windows # CodeSourcery under Windows
ifeq ($(CONFIG_ARM_TOOLCHAIN),CODESOURCERYW) ifeq ($(CONFIG_ARM_TOOLCHAIN),CODESOURCERYW)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
@ -134,8 +134,8 @@ endif
# devkitARM under Windows # devkitARM under Windows
ifeq ($(CONFIG_ARM_TOOLCHAIN),DEVKITARM) ifeq ($(CONFIG_ARM_TOOLCHAIN),DEVKITARM)
CROSSDEV = arm-eabi- CROSSDEV ?= arm-eabi-
ARCROSSDEV = arm-eabi- ARCROSSDEV ?= arm-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif
@ -144,8 +144,8 @@ endif
# Generic GNU EABI toolchain on OS X, Linux or any typical Posix system # Generic GNU EABI toolchain on OS X, Linux or any typical Posix system
ifeq ($(CONFIG_ARM_TOOLCHAIN),GNU_EABI) ifeq ($(CONFIG_ARM_TOOLCHAIN),GNU_EABI)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O3 MAXOPTIMIZATION = -O3
endif endif

View file

@ -252,7 +252,8 @@ static void up_dumpstate(void)
* Name: _up_assert * Name: _up_assert
****************************************************************************/ ****************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# arch/arm/src/armv7-m/Toolchain.defs # arch/arm/src/armv7-m/Toolchain.defs
# #
# Copyright (C) 2012 Gregory Nutt. All rights reserved. # Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -141,8 +141,8 @@ endif
# Atollic toolchain under Windows # Atollic toolchain under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),ATOLLIC) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),ATOLLIC)
CROSSDEV = arm-atollic-eabi- CROSSDEV ?= arm-atollic-eabi-
ARCROSSDEV = arm-atollic-eabi- ARCROSSDEV ?= arm-atollic-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif
@ -161,12 +161,12 @@ endif
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),BUILDROOT) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),BUILDROOT)
ifeq ($(CONFIG_ARMV7M_OABI_TOOLCHAIN),y) ifeq ($(CONFIG_ARMV7M_OABI_TOOLCHAIN),y)
CROSSDEV = arm-nuttx-elf- CROSSDEV ?= arm-nuttx-elf-
ARCROSSDEV = arm-nuttx-elf- ARCROSSDEV ?= arm-nuttx-elf-
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
else else
CROSSDEV = arm-nuttx-eabi- CROSSDEV ?= arm-nuttx-eabi-
ARCROSSDEV = arm-nuttx-eabi- ARCROSSDEV ?= arm-nuttx-eabi-
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
endif endif
MAXOPTIMIZATION = -Os MAXOPTIMIZATION = -Os
@ -175,8 +175,8 @@ endif
# Code Red RedSuite under Linux # Code Red RedSuite under Linux
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDL) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDL)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
ifeq ($(CONFIG_ARCH_CORTEXM4),y) ifeq ($(CONFIG_ARCH_CORTEXM4),y)
ifeq ($(CONFIG_ARCH_FPU),y) ifeq ($(CONFIG_ARCH_FPU),y)
ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard
@ -191,8 +191,8 @@ endif
# Code Red RedSuite under Windows # Code Red RedSuite under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDW) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDW)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif
@ -210,8 +210,8 @@ endif
# CodeSourcery under Linux # CodeSourcery under Linux
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYL) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYL)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
endif endif
@ -219,8 +219,8 @@ endif
# CodeSourcery under Windows # CodeSourcery under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYW) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYW)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif
@ -230,8 +230,8 @@ endif
# devkitARM under Windows # devkitARM under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),DEVKITARM) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),DEVKITARM)
CROSSDEV = arm-eabi- CROSSDEV ?= arm-eabi-
ARCROSSDEV = arm-eabi- ARCROSSDEV ?= arm-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif
@ -241,8 +241,8 @@ endif
# Generic GNU EABI toolchain on OS X, Linux or any typical Posix system # Generic GNU EABI toolchain on OS X, Linux or any typical Posix system
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABI) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABI)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O3 MAXOPTIMIZATION = -O3
ifeq ($(CONFIG_ARCH_CORTEXM4),y) ifeq ($(CONFIG_ARCH_CORTEXM4),y)
ifeq ($(CONFIG_ARCH_FPU),y) ifeq ($(CONFIG_ARCH_FPU),y)
@ -258,8 +258,8 @@ endif
# Raisonance RIDE7 under Windows # Raisonance RIDE7 under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),RAISONANCE) ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),RAISONANCE)
CROSSDEV = arm-none-eabi- CROSSDEV ?= arm-none-eabi-
ARCROSSDEV = arm-none-eabi- ARCROSSDEV ?= arm-none-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif

View file

@ -267,7 +267,8 @@ static void up_dumpstate(void)
* Name: _up_assert * Name: _up_assert
****************************************************************************/ ****************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -452,7 +452,7 @@ static inline int lpc17_configinput(lpc17_pinset_t cfgset, unsigned int port, un
#endif #endif
} }
#ifdef defined(LPC176x) #if defined(LPC176x)
/* Set up PINSEL registers */ /* Set up PINSEL registers */
/* Configure as GPIO */ /* Configure as GPIO */

View file

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# arch/avr/src/avr/Toolchain.defs # arch/avr/src/avr/Toolchain.defs
# #
# Copyright (C) 2012 Gregory Nutt. All rights reserved. # Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -82,7 +82,7 @@ endif
# NuttX buildroot GCC toolchain under Linux or Cygwin # NuttX buildroot GCC toolchain under Linux or Cygwin
ifeq ($(CONFIG_AVR_TOOLCHAIN),BUILDROOT) ifeq ($(CONFIG_AVR_TOOLCHAIN),BUILDROOT)
CROSSDEV = avr-nuttx-elf- CROSSDEV ?= avr-nuttx-elf-
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
LDFLAGS += -nostartfiles -nodefaultlibs LDFLAGS += -nostartfiles -nodefaultlibs
endif endif
@ -90,7 +90,7 @@ endif
# AVR CrossPack under OS X # AVR CrossPack under OS X
ifeq ($(CONFIG_AVR_TOOLCHAIN),CROSSPACK) ifeq ($(CONFIG_AVR_TOOLCHAIN),CROSSPACK)
CROSSDEV = avr- CROSSDEV ?= avr-
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
LDFLAGS += -nostartfiles -nodefaultlibs LDFLAGS += -nostartfiles -nodefaultlibs
endif endif
@ -98,7 +98,7 @@ endif
# GCC toolchain under Linux # GCC toolchain under Linux
ifeq ($(CONFIG_AVR_TOOLCHAIN),LINUXGCC) ifeq ($(CONFIG_AVR_TOOLCHAIN),LINUXGCC)
CROSSDEV = avr- CROSSDEV ?= avr-
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
LDFLAGS += -nostartfiles -nodefaultlibs LDFLAGS += -nostartfiles -nodefaultlibs
endif endif
@ -106,7 +106,7 @@ endif
# WinAVR toolchain under Windows/Cygwin # WinAVR toolchain under Windows/Cygwin
ifeq ($(CONFIG_AVR_TOOLCHAIN),WINAVR) ifeq ($(CONFIG_AVR_TOOLCHAIN),WINAVR)
CROSSDEV = avr- CROSSDEV ?= avr-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif

View file

@ -90,7 +90,8 @@
* Name: _up_assert * Name: _up_assert
****************************************************************************/ ****************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -247,7 +247,8 @@ static void up_dumpstate(void)
* Name: _up_assert * Name: _up_assert
****************************************************************************/ ****************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# arch/mips/src/mips32/Toolchain.defs # arch/mips/src/mips32/Toolchain.defs
# #
# Copyright (C) 2012 Gregory Nutt. All rights reserved. # Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -103,7 +103,7 @@ endif
# including Pinguino mips-elf toolchain # including Pinguino mips-elf toolchain
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),GNU_ELF) ifeq ($(CONFIG_MIPS32_TOOLCHAIN),GNU_ELF)
CROSSDEV = mips-elf- CROSSDEV ?= mips-elf-
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic ARCHPICFLAGS = -fpic -membedded-pic
@ -114,8 +114,8 @@ endif
# Microchip C32 toolchain under Linux # Microchip C32 toolchain under Linux
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL) ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL)
CROSSDEV = pic32- CROSSDEV ?= pic32-
# CROSSDEV = xc32- # CROSSDEV ?= xc32-
MAXOPTIMIZATION = -O2 MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic ARCHPICFLAGS = -fpic -membedded-pic
@ -126,8 +126,8 @@ endif
# Microchip C32 toolchain under Windows # Microchip C32 toolchain under Windows
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW) ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW)
CROSSDEV = pic32- CROSSDEV ?= pic32-
# CROSSDEV = xc32- # CROSSDEV ?= xc32-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif
@ -141,8 +141,8 @@ endif
# Microchip C32 toolchain under Linux # Microchip C32 toolchain under Linux
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL_LITE) ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL_LITE)
CROSSDEV = pic32- CROSSDEV ?= pic32-
# CROSSDEV = xc32- # CROSSDEV ?= xc32-
# MAXOPTIMIZATION = -O2 # MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic ARCHPICFLAGS = -fpic -membedded-pic
@ -153,8 +153,8 @@ endif
# Microchip C32 toolchain under Windows # Microchip C32 toolchain under Windows
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW_LITE) ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW_LITE)
CROSSDEV = pic32- CROSSDEV ?= pic32-
# CROSSDEV = xc32- # CROSSDEV ?= xc32-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif
@ -168,7 +168,7 @@ endif
# microchipOpen toolchain under Linux # microchipOpen toolchain under Linux
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPOPENL) ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPOPENL)
CROSSDEV = mypic32- CROSSDEV ?= mypic32-
# MAXOPTIMIZATION = -O2 # MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic ARCHPICFLAGS = -fpic -membedded-pic
@ -179,7 +179,7 @@ endif
# Pinguino mips-elf toolchain under Windows # Pinguino mips-elf toolchain under Windows
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),PINGUINOW) ifeq ($(CONFIG_MIPS32_TOOLCHAIN),PINGUINOW)
CROSSDEV = mips- CROSSDEV ?= mips-
ifneq ($(CONFIG_WINDOWS_NATIVE),y) ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y WINTOOL = y
endif endif

View file

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/mips/src/mips32/up_assert.c * arch/mips/src/mips32/up_assert.c
* *
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -90,7 +90,8 @@
* Name: _up_assert * Name: _up_assert
****************************************************************************/ ****************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -76,7 +76,8 @@
* Name: _up_assert * Name: _up_assert
****************************************************************************/ ****************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -209,7 +209,8 @@ static void up_dumpstate(void)
* Name: _up_assert * Name: _up_assert
****************************************************************************/ ****************************************************************************/
static void _up_assert(int errorcode) /* noreturn_function */ static void _up_assert(int errorcode) noreturn_function;
static void _up_assert(int errorcode)
{ {
/* Are we in an interrupt handler or the idle task? */ /* Are we in an interrupt handler or the idle task? */

View file

@ -1041,8 +1041,11 @@ void uart_datasent(FAR uart_dev_t *dev)
#ifdef CONFIG_SERIAL_REMOVABLE #ifdef CONFIG_SERIAL_REMOVABLE
void uart_connected(FAR uart_dev_t *dev, bool connected) void uart_connected(FAR uart_dev_t *dev, bool connected)
{ {
irqstate_t flags;
/* Is the device disconnected? */ /* Is the device disconnected? */
flags = irqsave();
dev->disconnected = !connected; dev->disconnected = !connected;
if (!connected) if (!connected)
{ {
@ -1070,10 +1073,12 @@ void uart_connected(FAR uart_dev_t *dev, bool connected)
(void)sem_post(&dev->recvsem); (void)sem_post(&dev->recvsem);
} }
/* Notify all poll/select waiters that and hangup/error occurred */ /* Notify all poll/select waiters that and hangup occurred */
uart_pollnotify(dev, (POLLERR|POLLHUP)); uart_pollnotify(dev, (POLLERR|POLLHUP));
} }
irqrestore(flags);
} }
#endif #endif

View file

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* include/assert.h * include/assert.h
* *
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -100,23 +100,28 @@
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Global Function Prototypes * Public Data
****************************************************************************/ ****************************************************************************/
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef CONFIG_HAVE_FILENAME #ifdef CONFIG_HAVE_FILENAME
EXTERN void up_assert(FAR const uint8_t *filename, int linenum); void up_assert(FAR const uint8_t *filename, int linenum) noreturn_function;
EXTERN void up_assert_code(FAR const uint8_t *filename, int linenum, void up_assert_code(FAR const uint8_t *filename, int linenum, int errcode)
int errcode); noreturn_function;
#else #else
EXTERN void up_assert(void); void up_assert(void) noreturn_function;
EXTERN void up_assert_code(int errcode); void up_assert_code(int errcode) noreturn_function;
#endif #endif
#undef EXTERN #undef EXTERN