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

git-svn-id: http://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 28a0241ccd
commit 966e801032
18 changed files with 102 additions and 73 deletions
+2 -1
View File
@@ -65,7 +65,8 @@
* 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? */
+13 -13
View File
@@ -1,7 +1,7 @@
############################################################################
# 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>
#
# Redistribution and use in source and binary forms, with or without
@@ -103,11 +103,11 @@ endif
ifeq ($(CONFIG_ARM_TOOLCHAIN),BUILDROOT)
ifeq ($(CONFIG_ARM_OABI_TOOLCHAIN),y)
CROSSDEV = arm-nuttx-elf-
ARCROSSDEV = arm-nuttx-elf-
CROSSDEV ?= arm-nuttx-elf-
ARCROSSDEV ?= arm-nuttx-elf-
else
CROSSDEV = arm-nuttx-eabi-
ARCROSSDEV = arm-nuttx-eabi-
CROSSDEV ?= arm-nuttx-eabi-
ARCROSSDEV ?= arm-nuttx-eabi-
endif
MAXOPTIMIZATION = -Os
endif
@@ -115,16 +115,16 @@ endif
# CodeSourcery under Linux
ifeq ($(CONFIG_ARM_TOOLCHAIN),CODESOURCERYL)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O2
endif
# CodeSourcery under Windows
ifeq ($(CONFIG_ARM_TOOLCHAIN),CODESOURCERYW)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O2
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
@@ -134,8 +134,8 @@ endif
# devkitARM under Windows
ifeq ($(CONFIG_ARM_TOOLCHAIN),DEVKITARM)
CROSSDEV = arm-eabi-
ARCROSSDEV = arm-eabi-
CROSSDEV ?= arm-eabi-
ARCROSSDEV ?= arm-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
@@ -144,8 +144,8 @@ endif
# Generic GNU EABI toolchain on OS X, Linux or any typical Posix system
ifeq ($(CONFIG_ARM_TOOLCHAIN),GNU_EABI)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O3
endif
+2 -1
View File
@@ -252,7 +252,8 @@ static void up_dumpstate(void)
* 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? */
+21 -21
View File
@@ -1,7 +1,7 @@
############################################################################
# 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>
#
# Redistribution and use in source and binary forms, with or without
@@ -141,8 +141,8 @@ endif
# Atollic toolchain under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),ATOLLIC)
CROSSDEV = arm-atollic-eabi-
ARCROSSDEV = arm-atollic-eabi-
CROSSDEV ?= arm-atollic-eabi-
ARCROSSDEV ?= arm-atollic-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
@@ -161,12 +161,12 @@ endif
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),BUILDROOT)
ifeq ($(CONFIG_ARMV7M_OABI_TOOLCHAIN),y)
CROSSDEV = arm-nuttx-elf-
ARCROSSDEV = arm-nuttx-elf-
CROSSDEV ?= arm-nuttx-elf-
ARCROSSDEV ?= arm-nuttx-elf-
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
else
CROSSDEV = arm-nuttx-eabi-
ARCROSSDEV = arm-nuttx-eabi-
CROSSDEV ?= arm-nuttx-eabi-
ARCROSSDEV ?= arm-nuttx-eabi-
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
endif
MAXOPTIMIZATION = -Os
@@ -175,8 +175,8 @@ endif
# Code Red RedSuite under Linux
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDL)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
ifeq ($(CONFIG_ARCH_CORTEXM4),y)
ifeq ($(CONFIG_ARCH_FPU),y)
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
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDW)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
@@ -210,8 +210,8 @@ endif
# CodeSourcery under Linux
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYL)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
MAXOPTIMIZATION = -O2
endif
@@ -219,8 +219,8 @@ endif
# CodeSourcery under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYW)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
@@ -230,8 +230,8 @@ endif
# devkitARM under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),DEVKITARM)
CROSSDEV = arm-eabi-
ARCROSSDEV = arm-eabi-
CROSSDEV ?= arm-eabi-
ARCROSSDEV ?= arm-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
@@ -241,8 +241,8 @@ endif
# Generic GNU EABI toolchain on OS X, Linux or any typical Posix system
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABI)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
MAXOPTIMIZATION = -O3
ifeq ($(CONFIG_ARCH_CORTEXM4),y)
ifeq ($(CONFIG_ARCH_FPU),y)
@@ -258,8 +258,8 @@ endif
# Raisonance RIDE7 under Windows
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),RAISONANCE)
CROSSDEV = arm-none-eabi-
ARCROSSDEV = arm-none-eabi-
CROSSDEV ?= arm-none-eabi-
ARCROSSDEV ?= arm-none-eabi-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
+2 -1
View File
@@ -267,7 +267,8 @@ static void up_dumpstate(void)
* 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? */
+1 -1
View File
@@ -452,7 +452,7 @@ static inline int lpc17_configinput(lpc17_pinset_t cfgset, unsigned int port, un
#endif
}
#ifdef defined(LPC176x)
#if defined(LPC176x)
/* Set up PINSEL registers */
/* Configure as GPIO */
+5 -5
View File
@@ -1,7 +1,7 @@
############################################################################
# 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>
#
# Redistribution and use in source and binary forms, with or without
@@ -82,7 +82,7 @@ endif
# NuttX buildroot GCC toolchain under Linux or Cygwin
ifeq ($(CONFIG_AVR_TOOLCHAIN),BUILDROOT)
CROSSDEV = avr-nuttx-elf-
CROSSDEV ?= avr-nuttx-elf-
MAXOPTIMIZATION = -O2
LDFLAGS += -nostartfiles -nodefaultlibs
endif
@@ -90,7 +90,7 @@ endif
# AVR CrossPack under OS X
ifeq ($(CONFIG_AVR_TOOLCHAIN),CROSSPACK)
CROSSDEV = avr-
CROSSDEV ?= avr-
MAXOPTIMIZATION = -O2
LDFLAGS += -nostartfiles -nodefaultlibs
endif
@@ -98,7 +98,7 @@ endif
# GCC toolchain under Linux
ifeq ($(CONFIG_AVR_TOOLCHAIN),LINUXGCC)
CROSSDEV = avr-
CROSSDEV ?= avr-
MAXOPTIMIZATION = -O2
LDFLAGS += -nostartfiles -nodefaultlibs
endif
@@ -106,7 +106,7 @@ endif
# WinAVR toolchain under Windows/Cygwin
ifeq ($(CONFIG_AVR_TOOLCHAIN),WINAVR)
CROSSDEV = avr-
CROSSDEV ?= avr-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
+2 -1
View File
@@ -90,7 +90,8 @@
* 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? */
+2 -1
View File
@@ -247,7 +247,8 @@ static void up_dumpstate(void)
* 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? */
+12 -12
View File
@@ -1,7 +1,7 @@
############################################################################
# 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>
#
# Redistribution and use in source and binary forms, with or without
@@ -103,7 +103,7 @@ endif
# including Pinguino mips-elf toolchain
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),GNU_ELF)
CROSSDEV = mips-elf-
CROSSDEV ?= mips-elf-
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic
@@ -114,8 +114,8 @@ endif
# Microchip C32 toolchain under Linux
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL)
CROSSDEV = pic32-
# CROSSDEV = xc32-
CROSSDEV ?= pic32-
# CROSSDEV ?= xc32-
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
@@ -126,8 +126,8 @@ endif
# Microchip C32 toolchain under Windows
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW)
CROSSDEV = pic32-
# CROSSDEV = xc32-
CROSSDEV ?= pic32-
# CROSSDEV ?= xc32-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
@@ -141,8 +141,8 @@ endif
# Microchip C32 toolchain under Linux
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL_LITE)
CROSSDEV = pic32-
# CROSSDEV = xc32-
CROSSDEV ?= pic32-
# CROSSDEV ?= xc32-
# MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
@@ -153,8 +153,8 @@ endif
# Microchip C32 toolchain under Windows
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW_LITE)
CROSSDEV = pic32-
# CROSSDEV = xc32-
CROSSDEV ?= pic32-
# CROSSDEV ?= xc32-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
@@ -168,7 +168,7 @@ endif
# microchipOpen toolchain under Linux
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPOPENL)
CROSSDEV = mypic32-
CROSSDEV ?= mypic32-
# MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
@@ -179,7 +179,7 @@ endif
# Pinguino mips-elf toolchain under Windows
ifeq ($(CONFIG_MIPS32_TOOLCHAIN),PINGUINOW)
CROSSDEV = mips-
CROSSDEV ?= mips-
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
+3 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* 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>
*
* Redistribution and use in source and binary forms, with or without
@@ -90,7 +90,8 @@
* 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? */
+2 -1
View File
@@ -76,7 +76,8 @@
* 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? */
+2 -1
View File
@@ -209,7 +209,8 @@ static void up_dumpstate(void)
* 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? */