1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-02 13:24:12 +01:00

[sam] fixing int handlers prototypes and build files cleanup

This commit is contained in:
Thibaut VIARD 2012-03-27 12:20:47 +02:00
parent baf2b2cc07
commit e84859656a
6 changed files with 31 additions and 29 deletions

View File

@ -8,7 +8,7 @@
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
@ -17,7 +17,6 @@
#
# Tool suffix when cross-compiling
#CROSS_COMPILE = ../../../../tools/CodeSourcery_arm/bin/arm-none-eabi-
CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-
# Compilation tools
@ -25,11 +24,13 @@ AR = $(CROSS_COMPILE)ar
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
AS = $(CROSS_COMPILE)as
#LD = $(CROSS_COMPILE)ld
#SIZE = $(CROSS_COMPILE)size
NM = $(CROSS_COMPILE)nm
#OBJCOPY = $(CROSS_COMPILE)objcopy
ifeq ($(OS),Windows_NT)
RM=cs-rm -Rf
else
RM=rm -Rf
endif
SEP=\\
# ---------------------------------------------------------------------------------------
@ -49,7 +50,7 @@ CFLAGS += -Wcast-align
#CFLAGS += -Wmissing-noreturn
#CFLAGS += -Wconversion
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -nostdlib
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -nostdlib -std=c99
CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT)
# To reduce application size use only integer printf function.
@ -69,7 +70,7 @@ CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long
#CPPFLAGS += -Wmissing-noreturn
#CPPFLAGS += -Wconversion
CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fno-rtti -fno-exceptions
CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fno-rtti -fno-exceptions -std=c++98
CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP)
# To reduce application size use only integer printf function.

View File

@ -269,7 +269,7 @@ RingBuffer rx_buffer1 ;
UARTClass Serial( UART, UART_IRQn, ID_UART, &rx_buffer1 ) ;
// IT handlers
void UART_IrqHandler(void)
void UART_Handler(void)
{
Serial.IrqHandler() ;
}
@ -287,17 +287,17 @@ USARTClass Serial3( USART1, USART1_IRQn, ID_USART1, &rx_buffer3 ) ;
USARTClass Serial4( USART2, USART2_IRQn, ID_USART2, &rx_buffer4 ) ;
// IT handlers
void USART0_IrqHandler( void )
void USART0_Handler( void )
{
Serial2.IrqHandler() ;
}
void USART1_IrqHandler( void )
void USART1_Handler( void )
{
Serial3.IrqHandler() ;
}
void USART2_IrqHandler( void )
void USART2_Handler( void )
{
Serial4.IrqHandler() ;
}

View File

@ -8,7 +8,7 @@
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
@ -17,7 +17,6 @@
#
# Tool suffix when cross-compiling
#CROSS_COMPILE = ../../../../tools/CodeSourcery_arm/bin/arm-none-eabi-
CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-
# Compilation tools
@ -25,11 +24,13 @@ AR = $(CROSS_COMPILE)ar
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
AS = $(CROSS_COMPILE)as
#LD = $(CROSS_COMPILE)ld
#SIZE = $(CROSS_COMPILE)size
NM = $(CROSS_COMPILE)nm
#OBJCOPY = $(CROSS_COMPILE)objcopy
ifeq ($(OS),Windows_NT)
RM=cs-rm -Rf
else
RM=rm -Rf
endif
SEP=\\
# ---------------------------------------------------------------------------------------
@ -49,7 +50,7 @@ CFLAGS += -Wcast-align
#CFLAGS += -Wmissing-noreturn
#CFLAGS += -Wconversion
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -nostdlib
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -nostdlib -std=c99
CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT)
# To reduce application size use only integer printf function.
@ -69,7 +70,7 @@ CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long
#CPPFLAGS += -Wmissing-noreturn
#CPPFLAGS += -Wconversion
CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fno-rtti -fno-exceptions
CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fno-rtti -fno-exceptions -std=c++98
CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP)
# To reduce application size use only integer printf function.

View File

@ -275,7 +275,7 @@ RingBuffer rx_buffer1 ;
UARTClass Serial( UART, UART_IRQn, ID_UART, &rx_buffer1 ) ;
// IT handlers
void UART_IrqHandler(void)
void UART_Handler(void)
{
Serial.IrqHandler() ;
}
@ -293,17 +293,17 @@ USARTClass Serial3( USART1, USART1_IRQn, ID_USART1, &rx_buffer3 ) ;
USARTClass Serial4( USART2, USART2_IRQn, ID_USART2, &rx_buffer4 ) ;
// IT handlers
void USART0_IrqHandler( void )
void USART0_Handler( void )
{
Serial2.IrqHandler() ;
}
void USART1_IrqHandler( void )
void USART1_Handler( void )
{
Serial3.IrqHandler() ;
}
void USART2_IrqHandler( void )
void USART2_Handler( void )
{
Serial4.IrqHandler() ;
}

View File

@ -146,12 +146,12 @@ extern "C" {
#endif
// IT handlers
extern void UART0_IrqHandler( void )
extern void UART0_Handler( void )
{
Serial.IrqHandler() ;
}
extern void UART1_IrqHandler( void )
extern void UART1_Handler( void )
{
Serial2.IrqHandler() ;
}
@ -177,12 +177,12 @@ extern "C" {
#endif
// IT handlers
extern void USART0_IrqHandler( void )
extern void USART0_Handler( void )
{
Serial3.IrqHandler() ;
}
extern void USART1_IrqHandler( void )
extern void USART1_Handler( void )
{
Serial4.IrqHandler() ;
}

View File

@ -93,7 +93,7 @@ extern "C" {
#endif
// IT handlers
extern void UART_IrqHandler( void )
extern void UART_Handler( void )
{
Serial.IrqHandler() ;
}
@ -119,12 +119,12 @@ extern "C" {
#endif
// IT handlers
extern void USART0_IrqHandler( void )
extern void USART0_Handler( void )
{
Serial2.IrqHandler() ;
}
extern void USART1_IrqHandler( void )
extern void USART1_Handler( void )
{
Serial3.IrqHandler() ;
}