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

[sam] daily commit: EWARM project working, GCC compiling but fail due to missing match for Reset_Handler

This commit is contained in:
Thibaut VIARD 2011-09-09 19:15:21 +02:00
parent 3916472a36
commit 79ee7a1f6a
61 changed files with 4493 additions and 857 deletions

View File

@ -1,83 +1,28 @@
/*
%atmel_license%
*/
#ifndef Arduino_h
#define Arduino_h
#include <stdint.h>
//#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "libsam/chip.h"
#include "binary.h"
#ifdef __cplusplus
extern "C"{
#endif // __cplusplus
#define HIGH 0x1
#define LOW 0x0
#include "wiring_constants.h"
#define INPUT 0x0
#define OUTPUT 0x1
#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L )
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) )
#define microsecondsToClockCycles(a) ( ((a) * (SystemCoreClock / 1000L)) / 1000L )
#define true 0x1
#define false 0x0
#define PI 3.1415926535897932384626433832795
#define HALF_PI 1.5707963267948966192313216916398
#define TWO_PI 6.283185307179586476925286766559
#define DEG_TO_RAD 0.017453292519943295769236907684886
#define RAD_TO_DEG 57.295779513082320876798154814105
#define SERIAL 0x0
#define DISPLAY 0x1
#define LSBFIRST 0
#define MSBFIRST 1
#define CHANGE 1
#define FALLING 2
#define RISING 3
#define DEFAULT 1
#define EXTERNAL 0
// undefine stdlib's abs if encountered
#ifdef abs
#undef abs
#endif // abs
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(x) ((x)>0?(x):-(x))
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define radians(deg) ((deg)*DEG_TO_RAD)
#define degrees(rad) ((rad)*RAD_TO_DEG)
#define sq(x) ((x)*(x))
#define interrupts() __enable_irq()
#define noInterrupts() __disable_irq()
#define clockCyclesPerMicrosecond() ( VARIANT_MCK / 1000000L )
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (VARIANT_MCK / 1000L) )
#define microsecondsToClockCycles(a) ( ((a) * (VARIANT_MCK / 1000L)) / 1000L )
#define lowByte(w) ((uint8_t) ((w) & 0xff))
#define highByte(w) ((uint8_t) ((w) >> 8))
#define bitRead(value, bit) (((value) >> (bit)) & 0x01)
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
typedef unsigned int word;
#define bit(b) (1UL << (b))
// TODO: to be checked
typedef uint8_t boolean ;
typedef uint8_t byte ;
#include "wiring.h"
#include "wiring_digital.h"
@ -93,8 +38,8 @@ extern void loop( void ) ;
//
// These perform slightly better as macros compared to inline functions
//
#define digitalPinToPort( Pin ) ( APinDescription[Pin]->pPort )
#define digitalPinToBitMask( Pin ) ( APinDescription[Pin]->dwPin )
#define digitalPinToPort( ulPin ) ( g_APinDescription[ulPin]->pPort )
#define digitalPinToBitMask( ulPin ) ( g_APinDescription[ulPin]->dwPin )
#define digitalPinToTimer( P ) ( )
#define analogInPinToBit( P ) ( P )
#define portOutputRegister( P ) ( )
@ -107,31 +52,18 @@ extern void loop( void ) ;
#define NOT_ON_TIMER 0
#define TIMER0 1
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
typedef void (*voidFuncPtr)( void ) ;
/* Define attribute */
#if defined ( __CC_ARM ) /* Keil µVision 4 */
#define WEAK (__attribute__ ((weak)))
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#define WEAK __weak
#elif defined ( __GNUC__ ) /* GCC CS */
#define WEAK __attribute__ ((weak))
#endif
#ifdef __cplusplus
#include "WCharacter.h"
#include "WString.h"
#include "HardwareSerial.h"
uint16_t makeWord( uint16_t w ) ;
uint16_t makeWord( byte h, byte l ) ;
#define word(...) makeWord(__VA_ARGS__)
#include "Tone.h"
#include "WMath.h"
#endif // __cplusplus
//! Include variant header
#include "variant.h"
//! Definitions and types for pins
/* Definitions and types for pins */
typedef enum _EAnalogChannel
{
ADC0,
@ -158,15 +90,23 @@ typedef enum _EAnalogChannel
typedef struct _PinDescription
{
Pio* pPort ;
uint32_t dwPin ;
uint32_t dwPeripheralId ;
EPioType dwPinType ;
uint32_t dwPinAttribute ;
EAnalogChannel dwAnalogChannel ;
uint32_t ulPin ;
uint32_t ulPeripheralId ;
EPioType ulPinType ;
uint32_t ulPinAttribute ;
EAnalogChannel ulAnalogChannel ;
} PinDescription ;
extern const PinDescription APinDescription[] ;
extern const PinDescription g_APinDescription[] ;
#include "pins_arduino.h"
#ifdef __cplusplus
} // extern "C"
#include "WCharacter.h"
#include "WString.h"
#include "Tone.h"
#include "WMath.h"
#include "HardwareSerial.h"
#endif // __cplusplus
#endif // Arduino_h

View File

@ -1,18 +0,0 @@
#include <stdint.h>
#include "HardwareSerial.h"
extern void store_char( uint8_t c, ring_buffer* pBuffer )
{
int i = (unsigned int)(pBuffer->head + 1) % SERIAL_BUFFER_SIZE;
// if we should be storing the received character into the location
// just before the tail (meaning that the head would advance to the
// current location of the tail), we're about to overflow the buffer
// and so we don't write the character or advance the head.
if ( i != pBuffer->tail )
{
pBuffer->buffer[pBuffer->head] = c ;
pBuffer->head = i ;
}
}

View File

@ -1,27 +1,19 @@
/*
%atmel_license%
*/
#ifndef HardwareSerial_h
#define HardwareSerial_h
#include <stdint.h>
#include "Stream.h"
// Define constants and variables for buffering incoming serial data. We're
// using a ring buffer (I think), in which head is the index of the location
// to which to write the next incoming character and tail is the index of the
// location from which to read.
#define SERIAL_BUFFER_SIZE 64
typedef struct _ring_buffer
{
uint8_t buffer[SERIAL_BUFFER_SIZE] ;
volatile int head ;
volatile int tail ;
} ring_buffer ;
#include "RingBuffer.h"
class HardwareSerial : public Stream
{
protected:
ring_buffer *_rx_buffer ;
ring_buffer *_tx_buffer ;
RingBuffer *_rx_buffer ;
RingBuffer *_tx_buffer ;
public:
virtual void begin( const uint32_t dwBaudRate ) =0 ;
@ -37,7 +29,4 @@ class HardwareSerial : public Stream
// using Print::write ; // pull in write(str) and write(buf, size) from Print
} ;
// Complementary API
extern void store_char( uint8_t c, ring_buffer* pBuffer ) ;
#endif // HardwareSerial_h

View File

@ -0,0 +1,29 @@
/*
%atmel_license%
*/
#include "RingBuffer.h"
#include <string.h>
RingBuffer::RingBuffer( void )
{
memset( _aucBuffer, 0, SERIAL_BUFFER_SIZE ) ;
_iHead=0 ;
_iTail=0 ;
}
void RingBuffer::store_char( uint8_t c )
{
int i = (uint32_t)(_iHead + 1) % SERIAL_BUFFER_SIZE ;
// if we should be storing the received character into the location
// just before the tail (meaning that the head would advance to the
// current location of the tail), we're about to overflow the buffer
// and so we don't write the character or advance the head.
if ( i != _iTail )
{
_aucBuffer[_iHead] = c ;
_iHead = i ;
}
}

View File

@ -0,0 +1,28 @@
/*
%atmel_license%
*/
#ifndef _RING_BUFFER_
#define _RING_BUFFER_
#include <stdint.h>
// Define constants and variables for buffering incoming serial data. We're
// using a ring buffer (I think), in which head is the index of the location
// to which to write the next incoming character and tail is the index of the
// location from which to read.
#define SERIAL_BUFFER_SIZE 64
class RingBuffer
{
public:
uint8_t _aucBuffer[SERIAL_BUFFER_SIZE] ;
int _iHead ;
int _iTail ;
public:
RingBuffer( void ) ;
void store_char( uint8_t c ) ;
} ;
#endif /* _RING_BUFFER_ */

View File

@ -20,7 +20,7 @@
#ifndef Stream_h
#define Stream_h
#include <inttypes.h>
#include <stdint.h>
#include "Print.h"
class Stream : public Print

View File

@ -0,0 +1,9 @@
/*
%atmel_license%
*/
#ifndef _WIRING_TONE_
#define _WIRING_TONE_
#endif /* _WIRING_TONE_ */

View File

@ -1,26 +1,5 @@
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
Part of the Wiring project - http://wiring.org.co
Copyright (c) 2004-06 Hernando Barragan
Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
$Id$
%atmel_license%
*/
extern "C" {
@ -28,7 +7,7 @@ extern "C" {
#include "stdint.h"
}
void randomSeed( uint32_t dwSeed )
extern void randomSeed( uint32_t dwSeed )
{
if ( dwSeed != 0 )
{
@ -36,7 +15,7 @@ void randomSeed( uint32_t dwSeed )
}
}
long random( long howbig )
extern long random( long howbig )
{
if ( howbig == 0 )
{
@ -46,7 +25,7 @@ long random( long howbig )
return rand() % howbig;
}
long random( long howsmall, long howbig )
extern long random( long howsmall, long howbig )
{
if (howsmall >= howbig)
{
@ -58,17 +37,17 @@ long random( long howsmall, long howbig )
return random(diff) + howsmall;
}
long map(long x, long in_min, long in_max, long out_min, long out_max)
extern long map(long x, long in_min, long in_max, long out_min, long out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
uint32_t makeWord( uint32_t w )
extern uint16_t makeWord( uint32_t w )
{
return w ;
}
uint32_t makeWord( uint8_t h, uint8_t l )
extern uint16_t makeWord( uint8_t h, uint8_t l )
{
return (h << 8) | l ;
}

View File

@ -1,3 +1,7 @@
/*
%atmel_license%
*/
#ifndef _WIRING_MATH_
#define _WIRING_MATH_
@ -6,4 +10,10 @@ extern long random( long, long ) ;
extern void randomSeed( uint32_t dwSeed ) ;
extern long map( long, long, long, long, long ) ;
extern uint16_t makeWord( uint16_t w ) ;
extern uint16_t makeWord( byte h, byte l ) ;
#define word(...) makeWord(__VA_ARGS__)
#endif /* _WIRING_MATH_ */

View File

@ -12,13 +12,13 @@ all: sam3s_ek
.PHONY: sam3s_ek
sam3s_ek:
@echo --- Making sam3s_ek
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f arduino_sam3s_ek.mk
# @$(MAKE) $(SUBMAKE_OPTIONS) -f arduino_sam3s_ek.mk
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_sam3s_ek.mk
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_sam3s_ek.mk
.PHONY: clean
clean:
@echo --- Cleaning sam3s_ek
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f arduino_sam3s_ek.mk $@
# @$(MAKE) $(SUBMAKE_OPTIONS) -f arduino_sam3s_ek.mk $@
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_sam3s_ek.mk $@
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_sam3s_ek.mk $@

View File

@ -30,7 +30,8 @@ vpath %.cpp $(PROJECT_BASE_PATH) $(PROJECT_BASE_PATH)
VPATH+=$(PROJECT_BASE_PATH)
INCLUDES = -I$(PROJECT_BASE_PATH)
INCLUDES =
INCLUDES += -I$(PROJECT_BASE_PATH)
INCLUDES += -I$(SYSTEM_PATH)
INCLUDES += -I$(SYSTEM_PATH)/libsam
INCLUDES += -I$(VARIANT_PATH)
@ -134,16 +135,12 @@ $(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp
# @$(CC) -c $(CPPFLAGS) $< -o $@
$(CC) -xc++ -c $(CPPFLAGS) $< -o $@
$(OUTPUT_PATH)/variant.o: $(VARIANT_PATH)/variant.cpp
# @$(CC) -c $(CPPFLAGS) $< -o $@
@$(CXX) -c $(CPPFLAGS) $< -o $@
@$(CC) -xc++ -c $(CPPFLAGS) $< -o $@
$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
@$(AS) -c $(ASFLAGS) $< -o $@
$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ)) $(OUTPUT_PATH)/variant.o
$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
@$(AR) -v -r "$(OUTPUT_BIN)/$@" $^
@$(NM) "$(OUTPUT_BIN)/$@" > "$(OUTPUT_BIN)/$@.txt"

View File

@ -257,7 +257,7 @@
</option>
<option>
<name>CCRequirePrototypes</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>CCMultibyteSupport</name>
@ -887,7 +887,7 @@
</option>
<option>
<name>IarchiveOutput</name>
<state>S:\projets\Arduino_project\github\arduino_arm_git\hardware\sam\cores\sam\build_iar\Debug\Exe\libarduino_sam3s_ek_ewarm_dbg.a</state>
<state>$PROJ_DIR$\..\libarduino_sam3s_ek_ewarm_dbg.a</state>
</option>
</data>
</settings>
@ -2692,9 +2692,6 @@
<file>
<name>$PROJ_DIR$\..\binary.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\HardwareSerial.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\HardwareSerial.h</name>
</file>
@ -2713,6 +2710,12 @@
<file>
<name>$PROJ_DIR$\..\Print.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\RingBuffer.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\RingBuffer.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\Stream.h</name>
</file>
@ -2735,22 +2738,7 @@
</excluded>
</file>
<file>
<name>$PROJ_DIR$\..\UART.cpp</name>
<excluded>
<configuration>Debug</configuration>
</excluded>
</file>
<file>
<name>$PROJ_DIR$\..\UART.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\USART.cpp</name>
<excluded>
<configuration>Debug</configuration>
</excluded>
</file>
<file>
<name>$PROJ_DIR$\..\USART.h</name>
<name>$PROJ_DIR$\..\Tone.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\WCharacter.h</name>
@ -2776,6 +2764,9 @@
<file>
<name>$PROJ_DIR$\..\wiring_analog.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\wiring_constants.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\wiring_digital.c</name>
</file>

View File

@ -11,9 +11,9 @@ int main( void )
setup() ;
for ( ; ; )
{
{
loop() ;
}
}
// return 0 ;
}

View File

@ -39,7 +39,7 @@
*----------------------------------------------------------------------------*/
#include "variant.h"
#include "syscalls.h"
#include <stdio.h>
#include <stdarg.h>

View File

@ -1,7 +1,7 @@
# Makefile for compiling libArduino
.SUFFIXES: .o .a .c .s
CHIP=sam3s4
CHIP=__SAM3S4C__
VARIANT=sam3s_ek
TOOLCHAIN=gcc
@ -9,14 +9,11 @@ TOOLCHAIN=gcc
# Path
#-------------------------------------------------------------------------------
# Output directories
OUTPUT_PATH = .
# Libraries
PROJECT_BASE_PATH = .
SYSTEM_PATH = ../../../system
PROJECT_BASE_PATH = ./..
SYSTEM_PATH = ../../../../system
CMSIS_BASE_PATH = $(SYSTEM_PATH)/CMSIS/Include
VARIANT_PATH = ../../../variants/sam3s-ek
VARIANT_PATH = ../../../../variants/$(VARIANT)
ifeq ($(CHIP), __SAM3S4C__)
CHIP_NAME=sam3s4c
@ -33,7 +30,10 @@ CHIP_SERIE=sam3xa
else
endif
CMSIS_CHIP_PATH=$(PROJECT_BASE_PATH)/../cmsis/$(CHIP_SERIE)
CMSIS_CHIP_PATH=$(SYSTEM_PATH)/libsam/cmsis/$(CHIP_SERIE)
# Output directories
OUTPUT_PATH = debug_$(VARIANT)
#-------------------------------------------------------------------------------
# Files
@ -46,6 +46,7 @@ VPATH+=$(PROJECT_BASE_PATH)
INCLUDES = -I$(PROJECT_BASE_PATH)/..
INCLUDES += -I$(VARIANT_PATH)
INCLUDES += -I$(VARIANT_PATH)/..
INCLUDES += -I$(SYSTEM_PATH)
INCLUDES += -I$(SYSTEM_PATH)/libsam
INCLUDES += -I$(CMSIS_BASE_PATH)
@ -66,16 +67,16 @@ include $(TOOLCHAIN).mk
#-------------------------------------------------------------------------------
ifdef DEBUG
OUTPUT_OBJ=debug
OUTPUT_BIN=test_$(TOOLCHAIN)_dbg
LIBS=-Wl,--start-group -lgcc -lc -lchip_$(CHIP)_$(TOOLCHAIN)_dbg -larduino_$(VARIANT)_$(TOOLCHAIN)_dbg -Wl,--end-group
LIBS_POSTFIX=dbg
else
OUTPUT_OBJ=release
OUTPUT_BIN=test_$(TOOLCHAIN)_rel
#LIBS=-L../libchip_$(CHIP)_$(TOOLCHAIN)_rel.a -L../arduino_$(VARIANT)_$(TOOLCHAIN)_rel.a
LIBS=-Wl,--start-group -lgcc -lc -lchip_$(CHIP)_$(TOOLCHAIN)_rel -larduino_$(VARIANT)_$(TOOLCHAIN)_rel -lstdc++ -Wl,--end-group
LIBS_POSTFIX=rel
endif
//OUTPUT_PATH=$(OUTPUT_OBJ)_test.elf
OUTPUT_BIN=test_$(TOOLCHAIN)_$(LIBS_POSTFIX)
#LIBS=-L../libsam_$(CHIP_NAME)_$(TOOLCHAIN)_rel.a -L../arduino_$(VARIANT)_$(TOOLCHAIN)_rel.a
#-lstdc++
LIBS=-Wl,--start-group -lgcc -lc -lsam_$(CHIP_NAME)_$(TOOLCHAIN)_$(LIBS_POSTFIX) -larduino_$(VARIANT)_$(TOOLCHAIN)_$(LIBS_POSTFIX) -lvariant_$(VARIANT)_$(TOOLCHAIN)_$(LIBS_POSTFIX) -Wl,--end-group
LIB_PATH =-L$(PROJECT_BASE_PATH)/..
LIB_PATH+=-L=/lib/thumb2
@ -100,11 +101,35 @@ CPP_OBJ=$(filter-out $(CPP_OBJ_FILTER), $(CPP_OBJ_TEMP))
#-------------------------------------------------------------------------------
all: test
test: $(OUTPUT_BIN)
test: create_output $(OUTPUT_BIN)
.PHONY: create_output
create_output:
@echo --- Preparing $(VARIANT) files in $(OUTPUT_PATH) $(OUTPUT_BIN)
@echo -------------------------
@echo *$(INCLUDES)
@echo -------------------------
@echo *$(C_SRC)
@echo -------------------------
@echo *$(C_OBJ)
@echo -------------------------
@echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
@echo -------------------------
@echo *$(CPP_SRC)
@echo -------------------------
@echo *$(CPP_OBJ)
@echo -------------------------
@echo *$(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ))
@echo -------------------------
@echo *$(A_SRC)
@echo -------------------------
-@mkdir $(OUTPUT_PATH) 1>NUL 2>&1
$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp
# @$(CC) -c $(CPPFLAGS) $< -o $@
@$(CXX) -c $(CPPFLAGS) $< -o $@
# @$(CXX) -c $(CPPFLAGS) $< -o $@
$(CXX) -v -c $(CPPFLAGS) $< -o $@
$(OUTPUT_BIN): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
$(CC) $(LIB_PATH) $(LDFLAGS) -T"$(VARIANT_PATH)/linker_scripts/gcc/flash.ld" -Wl,-Map,$(OUTPUT_PATH)/$@.map -o $(OUTPUT_PATH)/$@.elf $^ $(LIBS)
@ -112,7 +137,6 @@ $(OUTPUT_BIN): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)
$(OBJCOPY) -O binary $(OUTPUT_PATH)/$@.elf $(OUTPUT_PATH)/$@.bin
$(SIZE) $^ $(OUTPUT_PATH)/$@.elf
.PHONY: clean
clean:
@echo --- Cleaning test files
@ -123,4 +147,4 @@ clean:
-@$(RM) $(OUTPUT_PATH)/$(OUTPUT_BIN).map 1>NUL 2>&1
debug: test
$(GDB) -x "$(VARIANT_PATH)/debug_scripts/gcc/flash.gdb" -ex "reset" -readnow -se $(OUTPUT_PATH)/$(OUTPUT_BIN).elf
$(GDB) -x "$(VARIANT_PATH)/debug_scripts/gcc/$(VARIANT)_flash.gdb" -ex "reset" -readnow -se $(OUTPUT_PATH)/$(OUTPUT_BIN).elf

View File

@ -294,6 +294,7 @@
<option>
<name>CCIncludePath2</name>
<state>$PROJ_DIR$\..\..</state>
<state>$PROJ_DIR$\..\..\..\..\variants</state>
<state>$PROJ_DIR$\..\..\..\..\variants\sam3s_ek</state>
<state>$PROJ_DIR$\..\..\..\..\system</state>
</option>
@ -1816,26 +1817,14 @@
<name>sam3u_ek</name>
</group>
</group>
<group>
<name>variants</name>
<group>
<name>sam3s_ek</name>
<file>
<name>$PROJ_DIR$\..\..\..\..\variants\sam3s_ek\pins_arduino.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\variants\sam3s_ek\variant.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\variants\sam3s_ek\variant.h</name>
</file>
</group>
</group>
<file>
<name>$PROJ_DIR$\..\..\build_iar\Debug\Exe\libarduino_sam3s_ek_ewarm_dbg.a</name>
<name>$PROJ_DIR$\..\..\libarduino_sam3s_ek_ewarm_dbg.a</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\system\libsam\build_iar\Debug\Exe\libsam_sam3s4c_ewarm_dbg.a</name>
<name>$PROJ_DIR$\..\..\libsam_sam3s4c_ewarm_dbg.a</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\libvariant_sam3s_ek_ewarm_dbg.a</name>
</file>
<file>
<name>$PROJ_DIR$\..\test.cpp</name>

View File

@ -1,4 +1,8 @@
#include "../Arduino.h"
/*
%atmel_license%
*/
#include "variant.h"
void setup( void )
{
@ -11,7 +15,7 @@ void setup( void )
pinMode( PIN_LED_GREEN, OUTPUT ) ;
digitalWrite( PIN_LED_GREEN, HIGH ) ;
// Serial1.begin( 19200 ) ;
Serial.begin( 19200 ) ;
}
void loop( void )
@ -23,7 +27,8 @@ void loop( void )
digitalWrite( PIN_LED_GREEN, HIGH ) ; // set the red LED on
delay( 1000 ) ; // wait for a second
//Serial1.println( "test1" ) ; // send an initial string
//delay( 1000 ) ; // wait for a second
//Serial1.println( "test2" ) ; // send an initial string
// Serial.write( '*' ) ; // send an initial char
// Serial.println( "test1" ) ; // send an initial string
// delay( 1000 ) ; // wait for a second
// Serial.println( "test2" ) ; // send an initial string
}

View File

@ -1,31 +1,11 @@
/*
wiring.c - Partial implementation of the Wiring API for the ATmega8.
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2005-2006 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
$Id$
%atmel_license%
*/
#include "wiring_private.h"
#include "Arduino.h"
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
uint32_t millis( void )
@ -42,23 +22,14 @@ uint32_t micros( void )
dwTicks=SysTick->VAL ;
__enable_irq() ;
return (GetTickCount()*1000) + ((SysTick->LOAD + 1 - dwTicks)/(VARIANT_MCK/1000000)) ;
return (GetTickCount()*1000) + ((SysTick->LOAD + 1 - dwTicks)/(SystemCoreClock/1000000)) ;
}
/// \brief Pauses the program for the amount of time (in miliseconds) specified as parameter.
/// (There are 1000 milliseconds in a second.)
///
/// \param dwMs the number of milliseconds to pause (uint32_t)
///
void delay( uint32_t dwMs )
{
Wait( dwMs ) ;
}
/// \brief Pauses the program for the amount of time (in microseconds) specified as parameter.
///
/// \param dwUs the number of microseconds to pause (uint32_t)
///
void delayMicroseconds( uint32_t dwUs )
{
uint32_t dwStartMicros=micros() ;
@ -78,30 +49,8 @@ extern void SysTick_Handler( void )
TimeTick_Increment() ;
}
extern void init( void )
{
SystemInit() ;
/* Set Systick to 1ms interval, common to all SAM3 variants */
if ( SysTick_Config( SystemCoreClock / 1000 ) )
{
/* Capture error */
while ( 1 ) ;
}
/* Disable watchdog, common to all SAM variants */
WDT_Disable( WDT ) ;
// Initialize Serial port UART0, common to all SAM3 variants
PIO_Configure( APinDescription[PINS_UART].pPort, APinDescription[PINS_UART].dwPinType,
APinDescription[PINS_UART].dwPin, APinDescription[PINS_UART].dwPinAttribute ) ;
// Switch off Power LED
PIO_Configure( APinDescription[PIN_LED_RED].pPort, APinDescription[PIN_LED_RED].dwPinType,
APinDescription[PIN_LED_RED].dwPin, APinDescription[PIN_LED_RED].dwPinAttribute ) ;
PIO_Clear( APinDescription[PIN_LED_RED].pPort, APinDescription[PIN_LED_RED].dwPin ) ;
}
#if defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
extern signed int putchar( signed int c ) ;
/**
* \brief
*
@ -113,6 +62,7 @@ extern WEAK signed int putchar( signed int c )
{
return c ;
}
#endif /* __ICCARM__ */
#ifdef __cplusplus
}

View File

@ -1,19 +1,53 @@
/*
%atmel_license%
*/
#ifndef _WIRING_
#define _WIRING_
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
/**
*
*/
extern void init( void ) ;
/**
* \brief Returns the number of milliseconds since the Arduino board began running the current program.
*
* This number will overflow (go back to zero), after approximately 50 days.
*
* \return Number of milliseconds since the program started (uint32_t)
*/
extern uint32_t millis( void ) ;
/**
* \brief Returns the number of microseconds since the Arduino board began running the current program.
*
* This number will overflow (go back to zero), after approximately 70 minutes. On 16 MHz Arduino boards
* (e.g. Duemilanove and Nano), this function has a resolution of four microseconds (i.e. the value returned is
* always a multiple of four). On 8 MHz Arduino boards (e.g. the LilyPad), this function has a resolution
* of eight microseconds.
*
* \note There are 1,000 microseconds in a millisecond and 1,000,000 microseconds in a second.
*/
extern uint32_t micros( void ) ;
/**
* \brief Pauses the program for the amount of time (in miliseconds) specified as parameter.
* (There are 1000 milliseconds in a second.)
*
* \param dwMs the number of milliseconds to pause (uint32_t)
*/
extern void delay( uint32_t dwMs ) ;
/**
* \brief Pauses the program for the amount of time (in microseconds) specified as parameter.
*
* \param dwUs the number of microseconds to pause (uint32_t)
*/
extern void delayMicroseconds( uint32_t dwUs ) ;

View File

@ -1,3 +1,7 @@
/*
%atmel_license%
*/
#ifndef _WIRING_ANALOG_
#define _WIRING_ANALOG_

View File

@ -0,0 +1,78 @@
/*
%atmel_license%
*/
#ifndef _WIRING_CONSTANTS_
#define _WIRING_CONSTANTS_
#ifdef __cplusplus
extern "C"{
#endif // __cplusplus
#define HIGH 0x1
#define LOW 0x0
#define INPUT 0x0
#define OUTPUT 0x1
#define true 0x1
#define false 0x0
#define PI 3.1415926535897932384626433832795
#define HALF_PI 1.5707963267948966192313216916398
#define TWO_PI 6.283185307179586476925286766559
#define DEG_TO_RAD 0.017453292519943295769236907684886
#define RAD_TO_DEG 57.295779513082320876798154814105
#define SERIAL 0x0
#define DISPLAY 0x1
#define LSBFIRST 0
#define MSBFIRST 1
#define CHANGE 1
#define FALLING 2
#define RISING 3
#define DEFAULT 1
#define EXTERNAL 0
// undefine stdlib's abs if encountered
#ifdef abs
#undef abs
#endif // abs
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(x) ((x)>0?(x):-(x))
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define radians(deg) ((deg)*DEG_TO_RAD)
#define degrees(rad) ((rad)*RAD_TO_DEG)
#define sq(x) ((x)*(x))
#define interrupts() __enable_irq()
#define noInterrupts() __disable_irq()
#define lowByte(w) ((uint8_t) ((w) & 0xff))
#define highByte(w) ((uint8_t) ((w) >> 8))
#define bitRead(value, bit) (((value) >> (bit)) & 0x01)
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
typedef unsigned int word;
#define bit(b) (1UL << (b))
// TODO: to be checked
typedef uint8_t boolean ;
typedef uint8_t byte ;
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif /* _WIRING_CONSTANTS_ */

View File

@ -1,57 +1,35 @@
/*
wiring_digital.c - digital input and output functions
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2005-2006 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
Modified 28 September 2010 by Mark Sproul
$Id: wiring.c 248 2007-02-03 15:36:30Z mellis $
%atmel_license%
*/
#include "wiring_private.h"
#include "Arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void pinMode( uint32_t dwPin, uint32_t dwMode )
extern void pinMode( uint32_t ulPin, uint32_t ulMode )
{
if ( APinDescription[dwPin].dwPinType == PIO_NOT_A_PIN )
if ( g_APinDescription[ulPin].ulPinType == PIO_NOT_A_PIN )
{
return ;
}
switch ( dwMode )
switch ( ulMode )
{
case INPUT:
/* Enable peripheral for clocking input */
PMC_EnablePeripheral( APinDescription[dwPin].dwPeripheralId ) ;
PIO_Configure( APinDescription[dwPin].pPort, PIO_INPUT, APinDescription[dwPin].dwPin, 0 ) ;
PMC_EnablePeripheral( g_APinDescription[ulPin].ulPeripheralId ) ;
PIO_Configure( g_APinDescription[ulPin].pPort, PIO_INPUT, g_APinDescription[ulPin].ulPin, 0 ) ;
break ;
case OUTPUT:
/* if all pins are output, disable PIO Controller clocking, reduce power consomption */
if ( APinDescription[dwPin].pPort->PIO_OSR == 0xffffffff )
if ( g_APinDescription[ulPin].pPort->PIO_OSR == 0xffffffff )
{
PMC_DisablePeripheral( APinDescription[dwPin].dwPeripheralId ) ;
PMC_DisablePeripheral( g_APinDescription[ulPin].ulPeripheralId ) ;
}
PIO_Configure( APinDescription[dwPin].pPort, PIO_OUTPUT_1, APinDescription[dwPin].dwPin, APinDescription[dwPin].dwPinAttribute ) ;
PIO_Configure( g_APinDescription[ulPin].pPort, PIO_OUTPUT_1, g_APinDescription[ulPin].ulPin, g_APinDescription[ulPin].ulPinAttribute ) ;
break ;
default:
@ -59,24 +37,32 @@ extern void pinMode( uint32_t dwPin, uint32_t dwMode )
}
}
extern void digitalWrite( uint32_t dwPin, uint32_t dwVal )
extern void digitalWrite( uint32_t ulPin, uint32_t ulVal )
{
if ( APinDescription[dwPin].dwPinType == PIO_NOT_A_PIN )
{
return ;
}
/* Handle */
if ( g_APinDescription[ulPin].ulPinType == PIO_NOT_A_PIN )
{
return ;
}
PIO_SetOutput( APinDescription[dwPin].pPort, APinDescription[dwPin].dwPin, dwVal, 0, PIO_PULLUP ) ;
if ( PIO_GetOutputDataStatus( g_APinDescription[ulPin].pPort, g_APinDescription[ulPin].ulPin ) == 0 )
{
PIO_PullUp( g_APinDescription[ulPin].pPort, g_APinDescription[ulPin].ulPin, 1 ) ;
}
else
{
PIO_SetOutput( g_APinDescription[ulPin].pPort, g_APinDescription[ulPin].ulPin, ulVal, 0, PIO_PULLUP ) ;
}
}
extern int digitalRead( uint32_t dwPin )
extern int digitalRead( uint32_t ulPin )
{
if ( APinDescription[dwPin].dwPinType == PIO_NOT_A_PIN )
if ( g_APinDescription[ulPin].ulPinType == PIO_NOT_A_PIN )
{
return LOW ;
}
if ( PIO_Get( APinDescription[dwPin].pPort, PIO_INPUT, APinDescription[dwPin].dwPin ) == 1 )
if ( PIO_Get( g_APinDescription[ulPin].pPort, PIO_INPUT, g_APinDescription[ulPin].ulPin ) == 1 )
{
return HIGH ;
}

View File

@ -1,3 +1,7 @@
/*
%atmel_license%
*/
#ifndef _WIRING_DIGITAL_
#define _WIRING_DIGITAL_
@ -5,18 +9,18 @@
extern "C" {
#endif
/*
/**
* \brief Configures the specified pin to behave either as an input or an output. See the description of digital pins for details.
*
* \param dwPin the number of the pin whose mode you wish to set
* \param dwMode either INPUT or OUTPUT
* \param ulPin The number of the pin whose mode you wish to set
* \param ulMode Either INPUT or OUTPUT
*/
extern void pinMode( uint32_t dwPin, uint32_t dwMode ) ;
/*
/**
* \brief Write a HIGH or a LOW value to a digital pin.
*
* \desc If the pin has been configured as an OUTPUT with pinMode(), its voltage will be set to the
* If the pin has been configured as an OUTPUT with pinMode(), its voltage will be set to the
* corresponding value: 5V (or 3.3V on 3.3V boards) for HIGH, 0V (ground) for LOW.
*
* If the pin is configured as an INPUT, writing a HIGH value with digitalWrite() will enable an internal
@ -35,12 +39,14 @@ extern void pinMode( uint32_t dwPin, uint32_t dwMode ) ;
*/
extern void digitalWrite( uint32_t dwPin, uint32_t dwVal ) ;
/*
/**
* \brief Reads the value from a specified digital pin, either HIGH or LOW.
*
* \param dwPin the number of the digital pin you want to read (int)
* \param ulPin The number of the digital pin you want to read (int)
*
* \return HIGH or LOW
*/
extern int digitalRead( uint32_t dwPin ) ;
extern int digitalRead( uint32_t ulPin ) ;
#ifdef __cplusplus
}

View File

@ -1,25 +1,5 @@
/*
wiring_private.h - Internal header file.
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2005-2006 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
$Id: wiring.h 239 2007-01-12 17:58:39Z mellis $
%atmel_license%
*/
#ifndef WiringPrivate_h
@ -29,26 +9,18 @@
#include <stdio.h>
#include <stdarg.h>
#include "Arduino.h"
#ifdef __cplusplus
extern "C"{
#endif
typedef void (*voidFuncPtr)( void ) ;
/* Define attribute */
#if defined ( __CC_ARM ) /* Keil µVision 4 */
#define WEAK __attribute__ ((weak))
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#define WEAK __weak
#elif defined ( __GNUC__ ) /* GCC CS */
#define WEAK __attribute__ ((weak))
#endif
#include "libsam/chip.h"
#include "wiring_constants.h"
#ifdef __cplusplus
} // extern "C"
#include "HardwareSerial.h"
#endif
#endif

View File

@ -1,3 +1,7 @@
/*
%atmel_license%
*/
#ifndef _WIRING_PULSE_
#define _WIRING_PULSE_

View File

@ -1,28 +1,8 @@
/*
wiring_shift.c
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2005-2006 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
$Id: wiring.c 248 2007-02-03 15:36:30Z mellis $
%atmel_license%
*/
#include "wiring_private.h"
#include "Arduino.h"
#ifdef __cplusplus
extern "C"{

View File

@ -1,3 +1,7 @@
/*
%atmel_license%
*/
#ifndef _WIRING_SHIFT_
#define _WIRING_SHIFT_

View File

@ -2,7 +2,7 @@
.SUFFIXES: .o .a .c .s
SUB_MAKEFILES=debug.mk gcc.mk release.mk win.mk sam3s.mk
LIBNAME=libchip
LIBNAME=libsam
TOOLCHAIN=gcc
ifeq ($(CHIP),)
@ -39,7 +39,7 @@ CHIP_SERIE=sam3xa
else
endif
CMSIS_CHIP_PATH=$(PROJECT_BASE_PATH)/../cmsis/$(CHIP_SERIE)
CMSIS_CHIP_PATH=$(PROJECT_BASE_PATH)/cmsis/$(CHIP_SERIE)
#-------------------------------------------------------------------------------
# Files
@ -88,8 +88,8 @@ OUTPUT_PATH=$(OUTPUT_OBJ)_$(CHIP_NAME)
# C source files and objects
#-------------------------------------------------------------------------------
C_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.c)
C_SRC+=$(wildcard $(CMSIS_CHIP_PATH)/*.c)
C_SRC+=$(wildcard $(CMSIS_CHIP_PATH)/gcc*.c)
C_SRC+=$(wildcard $(CMSIS_CHIP_PATH)/source/templates/*.c)
C_SRC+=$(wildcard $(CMSIS_CHIP_PATH)/source/templates/gcc/*.c)
C_OBJ_TEMP=$(patsubst %.c, %.o, $(notdir $(C_SRC)))
@ -102,7 +102,6 @@ C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
# Assembler source files and objects
#-------------------------------------------------------------------------------
A_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.s)
A_SRC+=$(wildcard $(CMSIS_BASE_PATH)/*.s)
A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
@ -121,7 +120,7 @@ $(CHIP): create_output $(OUTPUT_LIB)
.PHONY: create_output
create_output:
@echo --- Preparing $(CHIP) files $(OUTPUT_PATH) $(OUTPUT_BIN)
# @echo -------------------------
@echo -------------------------
# @echo *$(C_SRC)
# @echo -------------------------
# @echo *$(C_OBJ)

View File

@ -888,7 +888,7 @@
</option>
<option>
<name>IarchiveOutput</name>
<state>S:\projets\Arduino_project\github\arduino_arm_git\hardware\sam\system\libsam\build_iar\Debug\Exe\libsam_sam3s4c_ewarm_dbg.a</state>
<state>$PROJ_DIR$\..\..\..\cores\sam\libsam_sam3s4c_ewarm_dbg.a</state>
</option>
</data>
</settings>

View File

@ -7,6 +7,9 @@
<project>
<path>$WS_DIR$\libsam.ewp</path>
</project>
<project>
<path>$WS_DIR$\..\..\..\variants\sam3s_ek\build_iar\libvariant_sam3s_ek.ewp</path>
</project>
<project>
<path>$WS_DIR$\..\..\..\cores\sam\validation\build_iar\test.ewp</path>
</project>
@ -21,6 +24,10 @@
<project>libarduino</project>
<configuration>Debug</configuration>
</member>
<member>
<project>libsam3s_ek</project>
<configuration>Debug</configuration>
</member>
<member>
<project>test</project>
<configuration>Debug</configuration>

View File

@ -1,95 +0,0 @@
/*
%atmel_license%
*/
/** \file cmsis example */
#include <stdlib.h>
#include <compiler.h>
#include <board.h>
#include "conf_board.h"
//! counts 1ms timeTicks
volatile uint32_t dw_ms_ticks = 0;
/**
* \brief SysTick_Handler.
*/
void SysTick_Handler(void)
{
// increment counter necessary in delay()
dw_ms_ticks++;
}
/**
* \brief delays number of tick Systicks (happens every 1 ms)
*/
__INLINE static void delay_ms(uint32_t dw_dly_ticks)
{
uint32_t dw_cur_ticks;
dw_cur_ticks = dw_ms_ticks;
while ((dw_ms_ticks - dw_cur_ticks) < dw_dly_ticks);
}
/**
* \brief configer LED pins
*/
__INLINE static void led_config(void)
{
// Setup LED Pin
LED0_PIO->PIO_PER = LED0_MASK;
LED0_PIO->PIO_OER = LED0_MASK;
LED0_PIO->PIO_PUDR = LED0_MASK;
}
/**
* \brief Switch on LED
*/
__INLINE static void led_on(uint32_t dw_led)
{
// Turn On LED
LED0_PIO->PIO_CODR = dw_led;
}
/**
* \brief Switch off LED
*/
__INLINE static void led_off(uint32_t dw_led)
{
// Turn Off LED
LED0_PIO->PIO_SODR = dw_led;
}
/**
* \brief Application entry point.
*
* \return Unused (ANSI-C compatibility).
*/
int main(void)
{
SystemInit();
WDT->WDT_MR = WDT_MR_WDDIS;
// Setup SysTick Timer for 1 msec interrupts
if (SysTick_Config(SystemCoreClock / 1000)) {
// Capture error
while (1);
}
led_config();
// Flash the LED
while(1) {
// Turn on the LED.
led_on (LED0_MASK);
// delay 1000 Msec.
delay_ms (1000);
// Turn off the LED.
led_off(LED0_MASK);
// delay 1000 Msec.
delay_ms (1000);
}
}

View File

@ -1,44 +0,0 @@
/**
* \file
*
* \brief Board configuration for clock example 1
*
* Copyright (C) 2010 Atmel Corporation. All rights reserved.
*
* \page License
*
* 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. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel AVR product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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 CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define LED0_PIO PIOA
#define LED0_MASK (0x01 << 23)
#endif /* CONF_BOARD_H_INCLUDED */

View File

@ -1,44 +0,0 @@
/**
* \file
*
* \brief Board configuration for clock example 1
*
* Copyright (C) 2010 Atmel Corporation. All rights reserved.
*
* \page License
*
* 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. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel AVR product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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 CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define LED0_PIO PIOA
#define LED0_MASK (0x01 << 19)
#endif /* CONF_BOARD_H_INCLUDED */

View File

@ -1,44 +0,0 @@
/**
* \file
*
* \brief Board configuration for clock example 1
*
* Copyright (C) 2010 Atmel Corporation. All rights reserved.
*
* \page License
*
* 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. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel AVR product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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 CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define LED0_PIO PIOA
#define LED0_MASK (0x01 << 19)
#endif /* CONF_BOARD_H_INCLUDED */

View File

@ -1,44 +0,0 @@
/**
* \file
*
* \brief Board configuration for clock example 1
*
* Copyright (C) 2010 Atmel Corporation. All rights reserved.
*
* \page License
*
* 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. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel AVR product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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 CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define LED0_PIO PIOB
#define LED0_MASK (0x01 << 0)
#endif /* CONF_BOARD_H_INCLUDED */

View File

@ -1,44 +0,0 @@
/**
* \file
*
* \brief Board configuration for clock example 1
*
* Copyright (C) 2010 Atmel Corporation. All rights reserved.
*
* \page License
*
* 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. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel AVR product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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 CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define LED0_PIO PIOB
#define LED0_MASK (0x01 << 12)
#endif /* CONF_BOARD_H_INCLUDED */

View File

@ -4,7 +4,7 @@
*
* \par Purpose
*
* This file provides basic support for Cortex-M processor based
* This file provides basic support for Cortex-M processor based
* microcontrollers.
*
* \note
@ -81,7 +81,7 @@ extern void WDT_IrqHandler( void ) __attribute__ ((weak, alias ("Dummy_Handler")
/* Cortex-M3 core handlers */
#pragma weak Reset_Handler=Dummy_Handler
#pragma weak NMI_Handler=Dummy_Handler
#pragma weak HardFault_Handler=Dummy_Handler
//#pragma weak HardFault_Handler=Dummy_Handler
#pragma weak MemManage_Handler=Dummy_Handler
#pragma weak BusFault_Handler=Dummy_Handler
#pragma weak UsageFault_Handler=Dummy_Handler

View File

@ -4,7 +4,7 @@
*
* \par Purpose
*
* This file provides basic support for Cortex-M processor based
* This file provides basic support for Cortex-M processor based
* microcontrollers.
*
* \author Atmel Corporation: http://www.atmel.com \n

View File

@ -73,7 +73,7 @@ const intvec_elem __vector_table[] =
WDT_IrqHandler, /* 4 Watchdog Timer */
PMC_IrqHandler, /* 5 PMC */
EEFC_IrqHandler, /* 6 EEFC */
Dummy_Handler, /* 7 Reserved */
Dummy_Handler, /* 7 Reserved */
UART0_IrqHandler, /* 8 UART0 */
UART1_IrqHandler, /* 9 UART1 */
SMC_IrqHandler, /* 10 SMC */
@ -82,8 +82,8 @@ const intvec_elem __vector_table[] =
PIOC_IrqHandler, /* 13 Parallel IO Controller C */
USART0_IrqHandler, /* 14 USART 0 */
USART1_IrqHandler, /* 15 USART 1 */
Dummy_Handler, /* 16 Reserved */
Dummy_Handler, /* 17 Reserved */
Dummy_Handler, /* 16 Reserved */
Dummy_Handler, /* 17 Reserved */
MCI_IrqHandler, /* 18 MCI */
TWI0_IrqHandler, /* 19 TWI 0 */
TWI1_IrqHandler, /* 20 TWI 1 */
@ -101,7 +101,7 @@ const intvec_elem __vector_table[] =
CRCCU_IrqHandler, /* 32 CRC Calculation Unit */
ACC_IrqHandler, /* 33 Analog Comparator */
USBD_IrqHandler, /* 34 USB Device Port */
Dummy_Handler /* 35 not used */
Dummy_Handler /* 35 not used */
};
/* TEMPORARY PATCH FOR SCB */

View File

@ -31,9 +31,6 @@ extern void PIO_DisableInterrupt( Pio *pPio, const uint32_t dwMask )
*/
extern void PIO_PullUp( Pio *pPio, const uint32_t dwMask, const uint32_t dwPullUpEnable )
{
/* Disable interrupts on the pin(s) */
pPio->PIO_IDR = dwMask ;
/* Enable the pull-up(s) if necessary */
if ( dwPullUpEnable )
{
@ -271,7 +268,11 @@ extern uint32_t PIO_Configure( Pio* pPio, const EPioType dwType, const uint32_t
case PIO_PERIPH_B :
case PIO_PERIPH_C :
case PIO_PERIPH_D :
/* Put the pin under control of peripheral */
PIO_SetPeripheral( pPio, dwType, dwMask ) ;
/* Disable interrupts on the pin(s) */
PIO_DisableInterrupt( pPio, dwMask ) ;
/* Enable Pullup */
PIO_PullUp( pPio, dwMask, (dwAttribute & PIO_PULLUP) ) ;
break;
@ -305,13 +306,16 @@ extern uint32_t PIO_Configure( Pio* pPio, const EPioType dwType, const uint32_t
*/
extern uint32_t PIO_GetOutputDataStatus( const Pio* pPio, const uint32_t dwMask )
{
if ( (pPio->PIO_ODSR & dwMask) == 0 )
/* Test if pin is under control of PIO */
if ( (pPio->PIO_PSR & dwMask) != 0 )
{
/* Test if pin is configured as output */
if ( (pPio->PIO_OSR & dwMask) != 0 )
{
return 0 ;
}
else
{
return 1 ;
return 1 ;
}
}
return 0 ;
}

View File

@ -1,3 +1,7 @@
/*
%atmel_license%
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -5,7 +9,7 @@
// Constructors ////////////////////////////////////////////////////////////////
UARTClass::UARTClass( Uart* pUart, IRQn_Type dwIrq, uint32_t dwId, ring_buffer* pRx_buffer, ring_buffer *pTx_buffer )
UARTClass::UARTClass( Uart* pUart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer )
{
_rx_buffer = pRx_buffer ;
_tx_buffer = pTx_buffer ;
@ -30,7 +34,7 @@ void UARTClass::begin( const uint32_t dwBaudRate )
/* Configure baudrate */
/* Asynchronous, no oversampling */
_pUart->UART_BRGR = (VARIANT_MCK / dwBaudRate) / 16 ;
_pUart->UART_BRGR = (SystemCoreClock / dwBaudRate) / 16 ;
/* Disable PDC channel */
_pUart->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS ;
@ -42,45 +46,45 @@ void UARTClass::begin( const uint32_t dwBaudRate )
void UARTClass::end( void )
{
// wait for transmission of outgoing data
while ( _tx_buffer->head != _tx_buffer->tail )
while ( _tx_buffer->_iHead != _tx_buffer->_iTail )
{
}
// clear any received data
_rx_buffer->head = _rx_buffer->tail ;
_rx_buffer->_iHead = _rx_buffer->_iTail ;
PMC_DisablePeripheral( _dwId ) ;
}
int UARTClass::available( void )
{
return (unsigned int)(SERIAL_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % SERIAL_BUFFER_SIZE ;
return (uint32_t)(SERIAL_BUFFER_SIZE + _rx_buffer->_iHead - _rx_buffer->_iTail) % SERIAL_BUFFER_SIZE ;
}
int UARTClass::peek( void )
{
if ( _rx_buffer->head == _rx_buffer->tail )
if ( _rx_buffer->_iHead == _rx_buffer->_iTail )
{
return -1 ;
}
else
{
return _rx_buffer->buffer[_rx_buffer->tail] ;
return _rx_buffer->_aucBuffer[_rx_buffer->_iTail] ;
}
}
int UARTClass::read( void )
{
// if the head isn't ahead of the tail, we don't have any characters
if ( _rx_buffer->head == _rx_buffer->tail )
// if the head isn't ahead of the _iTail, we don't have any characters
if ( _rx_buffer->_iHead == _rx_buffer->_iTail )
{
return -1 ;
}
else
{
unsigned char c = _rx_buffer->buffer[_rx_buffer->tail] ;
unsigned char c = _rx_buffer->_aucBuffer[_rx_buffer->_iTail] ;
_rx_buffer->tail = (unsigned int)(_rx_buffer->tail + 1) % SERIAL_BUFFER_SIZE ;
_rx_buffer->_iTail = (unsigned int)(_rx_buffer->_iTail + 1) % SERIAL_BUFFER_SIZE ;
return c ;
}
@ -88,49 +92,49 @@ int UARTClass::read( void )
void UARTClass::flush( void )
{
while ( _tx_buffer->head != _tx_buffer->tail )
while ( _tx_buffer->_iHead != _tx_buffer->_iTail )
{
}
}
void UARTClass::write( const uint8_t c )
void UARTClass::write( const uint8_t uc )
{
int i = (_tx_buffer->head + 1) % SERIAL_BUFFER_SIZE ;
int i = (_tx_buffer->_iHead + 1) % SERIAL_BUFFER_SIZE ;
// If the output buffer is full, there's nothing for it other than to
// wait for the interrupt handler to empty it a bit
while ( i == _tx_buffer->tail )
while ( i == _tx_buffer->_iTail )
{
}
_tx_buffer->buffer[_tx_buffer->head] = c ;
_tx_buffer->head = i ;
_tx_buffer->_aucBuffer[_tx_buffer->_iHead] = uc ;
_tx_buffer->_iHead = i ;
/* Wait for the transmitter to be ready */
while ( (_pUart->UART_SR & UART_SR_TXEMPTY) == 0 ) ;
/* Send character */
_pUart->UART_THR=c ;
_pUart->UART_THR=uc ;
}
void UARTClass::IrqHandler( void )
{
// RX char IT
unsigned char c = _pUart->UART_RHR ;
store_char( c, _rx_buffer ) ;
uint8_t uc = _pUart->UART_RHR ;
_rx_buffer->store_char( uc ) ;
// TX FIFO empty IT
if ( _tx_buffer->head == _tx_buffer->tail )
if ( _tx_buffer->_iHead == _tx_buffer->_iTail )
{
// Buffer empty, so disable interrupts
}
else
{
// There is more data in the output buffer. Send the next byte
c = _tx_buffer->buffer[_tx_buffer->tail] ;
_tx_buffer->tail = (_tx_buffer->tail + 1) % SERIAL_BUFFER_SIZE ;
_pUart->UART_THR = c ;
uc = _tx_buffer->_aucBuffer[_tx_buffer->_iTail] ;
_tx_buffer->_iTail = (_tx_buffer->_iTail + 1) % SERIAL_BUFFER_SIZE ;
_pUart->UART_THR = uc ;
}
}

View File

@ -1,10 +1,10 @@
#ifndef _UART_
#define _UART_
#ifndef _UART_CLASS_
#define _UART_CLASS_
// UART.cpp need this class to be predefined
class UARTClass ;
//class UARTClass ;
#include "wiring_private.h"
#include "Arduino.h"
class UARTClass : public HardwareSerial
{
@ -14,7 +14,7 @@ class UARTClass : public HardwareSerial
uint32_t _dwId ;
public:
UARTClass( Uart* pUart, IRQn_Type dwIrq, uint32_t dwId, ring_buffer* pRx_buffer, ring_buffer *pTx_buffer ) ;
UARTClass( Uart* pUart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer ) ;
void begin( const uint32_t dwBaudRate ) ;
void end( void ) ;
@ -31,4 +31,4 @@ class UARTClass : public HardwareSerial
// using Print::write ; // pull in write(str) and write(buf, size) from Print
};
#endif // _UART_
#endif // _UART_CLASS_

View File

@ -5,7 +5,7 @@
// Constructors ////////////////////////////////////////////////////////////////
USARTClass::USARTClass( Usart* pUsart, IRQn_Type dwIrq, uint32_t dwId, ring_buffer* pRx_buffer, ring_buffer *pTx_buffer )
USARTClass::USARTClass( Usart* pUsart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer )
{
_rx_buffer = pRx_buffer ;
_tx_buffer = pTx_buffer ;
@ -26,12 +26,12 @@ void USARTClass::begin( const uint32_t dwBaudRate )
_pUsart->US_CR = US_CR_RSTRX | US_CR_RSTTX | US_CR_RXDIS | US_CR_TXDIS ;
/* Configure mode */
_pUsart->US_MR = US_MR_USART_MODE_NORMAL | US_MR_USCLKS_MCK | US_MR_CHRL_8_BIT | US_MR_PAR_NO |
_pUsart->US_MR = US_MR_USART_MODE_NORMAL | US_MR_USCLKS_MCK | US_MR_CHRL_8_BIT | US_MR_PAR_NO |
US_MR_NBSTOP_1_BIT | US_MR_CHMODE_NORMAL;
/* Configure baudrate */
/* Asynchronous, no oversampling */
_pUsart->US_BRGR = (VARIANT_MCK / dwBaudRate) / 16 ;
_pUsart->US_BRGR = (SystemCoreClock / dwBaudRate) / 16 ;
/* Disable PDC channel */
_pUsart->US_PTCR = US_PTCR_RXTDIS | US_PTCR_TXTDIS ;
@ -43,45 +43,45 @@ void USARTClass::begin( const uint32_t dwBaudRate )
void USARTClass::end()
{
// wait for transmission of outgoing data
while ( _tx_buffer->head != _tx_buffer->tail )
while ( _tx_buffer->_iHead != _tx_buffer->_iTail )
{
}
// clear any received data
_rx_buffer->head = _rx_buffer->tail ;
_rx_buffer->_iHead = _rx_buffer->_iTail ;
PMC_DisablePeripheral( _dwId ) ;
}
int USARTClass::available( void )
{
return (unsigned int)(SERIAL_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % SERIAL_BUFFER_SIZE ;
return (unsigned int)(SERIAL_BUFFER_SIZE + _rx_buffer->_iHead - _rx_buffer->_iTail) % SERIAL_BUFFER_SIZE ;
}
int USARTClass::peek( void )
{
if ( _rx_buffer->head == _rx_buffer->tail )
if ( _rx_buffer->_iHead == _rx_buffer->_iTail )
{
return -1 ;
}
else
{
return _rx_buffer->buffer[_rx_buffer->tail] ;
return _rx_buffer->_aucBuffer[_rx_buffer->_iTail] ;
}
}
int USARTClass::read( void )
{
// if the head isn't ahead of the tail, we don't have any characters
if ( _rx_buffer->head == _rx_buffer->tail )
// if the _iHead isn't ahead of the _iTail, we don't have any characters
if ( _rx_buffer->_iHead == _rx_buffer->_iTail )
{
return -1 ;
}
else
{
unsigned char c = _rx_buffer->buffer[_rx_buffer->tail] ;
unsigned char c = _rx_buffer->_aucBuffer[_rx_buffer->_iTail] ;
_rx_buffer->tail = (unsigned int)(_rx_buffer->tail + 1) % SERIAL_BUFFER_SIZE ;
_rx_buffer->_iTail = (unsigned int)(_rx_buffer->_iTail + 1) % SERIAL_BUFFER_SIZE ;
return c ;
}
@ -89,49 +89,50 @@ int USARTClass::read( void )
void USARTClass::flush( void )
{
while ( _tx_buffer->head != _tx_buffer->tail )
while ( _tx_buffer->_iHead != _tx_buffer->_iTail )
{
}
}
void USARTClass::write( uint8_t c )
void USARTClass::write( uint8_t uc )
{
int i = (_tx_buffer->head + 1) % SERIAL_BUFFER_SIZE ;
int i = (_tx_buffer->_iHead + 1) % SERIAL_BUFFER_SIZE ;
// If the output buffer is full, there's nothing for it other than to
// wait for the interrupt handler to empty it a bit
while ( i == _tx_buffer->tail )
while ( i == _tx_buffer->_iTail )
{
}
_tx_buffer->buffer[_tx_buffer->head] = c ;
_tx_buffer->head = i ;
_tx_buffer->_aucBuffer[_tx_buffer->_iHead] = uc ;
_tx_buffer->_iHead = i ;
/* Wait for the transmitter to be ready */
while ( (_pUsart->US_CSR & US_CSR_TXEMPTY) == 0 ) ;
/* Send character */
_pUsart->US_THR=c ;
_pUsart->US_THR=uc ;
}
void USARTClass::IrqHandler( void )
{
// RX char IT
unsigned char c = _pUsart->US_RHR ;
store_char( c, _rx_buffer ) ;
uint8_t uc = _pUsart->US_RHR ;
_rx_buffer->store_char( uc ) ;
// TX FIFO empty IT
if ( _tx_buffer->head == _tx_buffer->tail )
if ( _tx_buffer->_iHead == _tx_buffer->_iTail )
{
// Buffer empty, so disable interrupts
}
else
{
// There is more data in the output buffer. Send the next byte
c = _tx_buffer->buffer[_tx_buffer->tail] ;
_tx_buffer->tail = (_tx_buffer->tail + 1) % SERIAL_BUFFER_SIZE ;
uc = _tx_buffer->_aucBuffer[_tx_buffer->_iTail] ;
_tx_buffer->_iTail = (_tx_buffer->_iTail + 1) % SERIAL_BUFFER_SIZE ;
_pUsart->US_THR = c ;
_pUsart->US_THR = uc ;
}
}

View File

@ -1,10 +1,10 @@
#ifndef _USART_
#define _USART_
#ifndef _USART_CLASS_
#define _USART_CLASS_
// USART.cpp need this class to be predefined
class USARTClass ;
//class USARTClass ;
#include "wiring_private.h"
#include "Arduino.h"
class USARTClass : public HardwareSerial
{
@ -14,7 +14,7 @@ class USARTClass : public HardwareSerial
uint32_t _dwId ;
public:
USARTClass( Usart* pUsart, IRQn_Type dwIrq, uint32_t dwId, ring_buffer* pRx_buffer, ring_buffer *pTx_buffer ) ;
USARTClass( Usart* pUsart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer ) ;
void begin( const uint32_t dwBaudRate ) ;
void end( void ) ;
@ -26,9 +26,9 @@ class USARTClass : public HardwareSerial
void IrqHandler( void ) ;
void write( const char *str ) ;
void write( const uint8_t *buffer, size_t size ) ;
virtual void write( const char *str ) ;
virtual void write( const uint8_t *buffer, size_t size ) ;
// using Print::write ; // pull in write(str) and write(buf, size) from Print
};
#endif // _USART_
#endif // _USART_CLASS_

View File

@ -0,0 +1,50 @@
#include "Arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void NMI_Handler( void )
{
for ( ;; ) ;
}
extern void HardFault_Handler( void )
{
for ( ;; ) ;
}
extern void MemManage_Handler( void )
{
for ( ;; ) ;
}
extern void BusFault_Handler( void )
{
for ( ;; ) ;
}
extern void UsageFault_Handler( void )
{
for ( ;; ) ;
}
extern void SVC_Handler( void )
{
for ( ;; ) ;
}
extern void DebugMon_Handler( void )
{
for ( ;; ) ;
}
extern void PendSV_Handler( void )
{
for ( ;; ) ;
}
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,24 @@
# Makefile for compiling libboard
BOARD =
SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
#-------------------------------------------------------------------------------
# Rules
#-------------------------------------------------------------------------------
all: sam3s_ek
.PHONY: sam3s_ek
sam3s_ek:
@echo --- Making sam3s_ek
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_sam3s_ek.mk
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_sam3s_ek.mk
.PHONY: clean
clean:
@echo --- Cleaning sam3s_ek
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_sam3s_ek.mk $@
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_sam3s_ek.mk $@

View File

@ -0,0 +1,7 @@
# Optimization level
# -O1 Optimize
# -O2 Optimize even more
# -O3 Optimize yet more
# -O0 Reduce compilation time and make debugging produce the expected results
# -Os Optimize for size
OPTIMIZATION = -g -O0 -DDEBUG

View File

@ -0,0 +1,64 @@
# Tool suffix when cross-compiling
#CROSS_COMPILE = ../../../../tools/CodeSourcery_arm/bin/arm-none-eabi-
CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-
# Compilation tools
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
RM=cs-rm -Rf
SEP=\\
# ---------------------------------------------------------------------------------------
# C Flags
CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
CFLAGS += -Wmissing-prototypes -Wmissing-declarations
CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
CFLAGS += -Wunreachable-code
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 += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT)
# To reduce application size use only integer printf function.
CFLAGS += -Dprintf=iprintf
# ---------------------------------------------------------------------------------------
# CPP Flags
CPPFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2
CPPFLAGS += -Wmain -Wparentheses -Wcast-align -Wunreachable-code
CPPFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
CPPFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
CPPFLAGS += -Wshadow -Wpointer-arith -Wwrite-strings
CPPFLAGS += -Wsign-compare -Waggregate-return -Wmissing-declarations
CPPFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
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 += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP)
# To reduce application size use only integer printf function.
CPPFLAGS += -Dprintf=iprintf
# ---------------------------------------------------------------------------------------
# ASM Flags
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES)

View File

@ -0,0 +1,156 @@
# Makefile for compiling libArduino
.SUFFIXES: .o .a .c .s
CHIP=__SAM3S4C__
VARIANT=sam3s_ek
LIBNAME=libvariant_$(VARIANT)
TOOLCHAIN=gcc
#-------------------------------------------------------------------------------
# Path
#-------------------------------------------------------------------------------
# Output directories
OUTPUT_BIN = ../../../cores/sam
# Libraries
PROJECT_BASE_PATH = ..
SYSTEM_PATH = ../../../system
CMSIS_PATH = $(SYSTEM_PATH)/CMSIS/Include
ARDUINO_PATH = ../../../cores/sam
VARIANT_BASE_PATH = ../../../variants
VARIANT_PATH = ../../../variants/$(VARIANT)
VARIANT_COMMON_PATH = ../../common
#-------------------------------------------------------------------------------
# Files
#-------------------------------------------------------------------------------
vpath %.h $(PROJECT_BASE_PATH) $(SYSTEM_PATH) $(VARIANT_PATH) $(VARIANT_COMMON_PATH)
#vpath %.c $(PROJECT_BASE_PATH) $(VARIANT_PATH)
vpath %.cpp $(PROJECT_BASE_PATH) $(PROJECT_BASE_PATH) $(VARIANT_COMMON_PATH)
VPATH+=$(PROJECT_BASE_PATH)
INCLUDES =
#INCLUDES += -I$(PROJECT_BASE_PATH)
INCLUDES += -I$(ARDUINO_PATH)
INCLUDES += -I$(SYSTEM_PATH)
INCLUDES += -I$(SYSTEM_PATH)/libsam
INCLUDES += -I$(VARIANT_BASE_PATH)
INCLUDES += -I$(VARIANT_PATH)
INCLUDES += -I$(CMSIS_PATH)
#-------------------------------------------------------------------------------
ifdef DEBUG
include debug.mk
else
include release.mk
endif
#-------------------------------------------------------------------------------
# Tools
#-------------------------------------------------------------------------------
include $(TOOLCHAIN).mk
#-------------------------------------------------------------------------------
ifdef DEBUG
OUTPUT_OBJ=debug
OUTPUT_LIB_POSTFIX=dbg
else
OUTPUT_OBJ=release
OUTPUT_LIB_POSTFIX=rel
endif
OUTPUT_LIB=$(LIBNAME)_$(TOOLCHAIN)_$(OUTPUT_LIB_POSTFIX).a
OUTPUT_PATH=$(OUTPUT_OBJ)_$(VARIANT)
#-------------------------------------------------------------------------------
# C source files and objects
#-------------------------------------------------------------------------------
C_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.c)
C_OBJ_TEMP = $(patsubst %.c, %.o, $(notdir $(C_SRC)))
# during development, remove some files
C_OBJ_FILTER=wiring_analog.o wiring_pulse.o
C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
#-------------------------------------------------------------------------------
# CPP source files and objects
#-------------------------------------------------------------------------------
CPP_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.cpp)
CPP_SRC+=$(wildcard $(VARIANT_COMMON_PATH)/*.cpp)
CPP_OBJ_TEMP = $(patsubst %.cpp, %.o, $(notdir $(CPP_SRC)))
# during development, remove some files
CPP_OBJ_FILTER=Tone.o
CPP_OBJ=$(filter-out $(CPP_OBJ_FILTER), $(CPP_OBJ_TEMP))
#-------------------------------------------------------------------------------
# Assembler source files and objects
#-------------------------------------------------------------------------------
A_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.s)
A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
# during development, remove some files
A_OBJ_FILTER=
A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
#-------------------------------------------------------------------------------
# Rules
#-------------------------------------------------------------------------------
all: $(VARIANT)
$(VARIANT): create_output $(OUTPUT_LIB)
.PHONY: create_output
create_output:
@echo --- Preparing $(VARIANT) files in $(OUTPUT_PATH) $(OUTPUT_BIN)
@echo -------------------------
@echo *$(INCLUDES)
@echo -------------------------
@echo *$(C_SRC)
@echo -------------------------
@echo *$(C_OBJ)
@echo -------------------------
@echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
@echo -------------------------
@echo *$(CPP_SRC)
@echo -------------------------
@echo *$(CPP_OBJ)
@echo -------------------------
@echo *$(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ))
@echo -------------------------
@echo *$(A_SRC)
@echo -------------------------
-@mkdir $(OUTPUT_PATH) 1>NUL 2>&1
$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
# @$(CC) -v -c $(CFLAGS) $< -o $@
@$(CC) -c $(CFLAGS) $< -o $@
$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp
# @$(CC) -c $(CPPFLAGS) $< -o $@
$(CC) -xc++ -c $(CPPFLAGS) $< -o $@
$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
@$(AS) -c $(ASFLAGS) $< -o $@
$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
@$(AR) -v -r "$(OUTPUT_BIN)/$@" $^
@$(NM) "$(OUTPUT_BIN)/$@" > "$(OUTPUT_BIN)/$@.txt"
.PHONY: clean
clean:
@echo --- Cleaning $(VARIANT) files [$(OUTPUT_PATH)$(SEP)*.o]
-@$(RM) $(OUTPUT_PATH) 1>NUL 2>&1
-@$(RM) $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1

View File

@ -0,0 +1,8 @@
# Optimization level
# -O1 Optimize
# -O2 Optimize even more
# -O3 Optimize yet more
# -O0 Reduce compilation time and make debugging produce the expected results
# -Os Optimize for size
OPTIMIZATION = -Os

View File

@ -0,0 +1,1769 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>2</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
<name>ARM</name>
</toolchain>
<debug>1</debug>
<settings>
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>22</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CInput</name>
<state>1</state>
</option>
<option>
<name>CEndian</name>
<state>1</state>
</option>
<option>
<name>CProcessor</name>
<state>1</state>
</option>
<option>
<name>OCVariant</name>
<state>0</state>
</option>
<option>
<name>MacOverride</name>
<state>0</state>
</option>
<option>
<name>MacFile</name>
<state></state>
</option>
<option>
<name>MemOverride</name>
<state>0</state>
</option>
<option>
<name>MemFile</name>
<state>$TOOLKIT_DIR$\CONFIG\debugger\Atmel\iosam3s.ddf</state>
</option>
<option>
<name>RunToEnable</name>
<state>1</state>
</option>
<option>
<name>RunToName</name>
<state>main</state>
</option>
<option>
<name>CExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>CExtraOptions</name>
<state></state>
</option>
<option>
<name>CFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>OCDDFArgumentProducer</name>
<state></state>
</option>
<option>
<name>OCDownloadSuppressDownload</name>
<state>0</state>
</option>
<option>
<name>OCDownloadVerifyAll</name>
<state>0</state>
</option>
<option>
<name>OCProductVersion</name>
<state>6.21.3.52923</state>
</option>
<option>
<name>OCDynDriverList</name>
<state>ARMSIM_ID</state>
</option>
<option>
<name>OCLastSavedByProductVersion</name>
<state>6.21.3.52923</state>
</option>
<option>
<name>OCDownloadAttachToProgram</name>
<state>0</state>
</option>
<option>
<name>UseFlashLoader</name>
<state>0</state>
</option>
<option>
<name>CLowLevel</name>
<state>1</state>
</option>
<option>
<name>OCBE8Slave</name>
<state>1</state>
</option>
<option>
<name>MacFile2</name>
<state></state>
</option>
<option>
<name>CDevice</name>
<state>1</state>
</option>
<option>
<name>FlashLoadersV3</name>
<state>$TOOLKIT_DIR$\config\flashloader\Atmel\SAM3S4\sam3s4-flash.board</state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath1</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck2</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath2</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck3</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath3</name>
<state></state>
</option>
<option>
<name>OverrideDefFlashBoard</name>
<state>0</state>
</option>
<option>
<name>OCImagesOffset1</name>
<state></state>
</option>
<option>
<name>OCImagesOffset2</name>
<state></state>
</option>
<option>
<name>OCImagesOffset3</name>
<state></state>
</option>
<option>
<name>OCImagesUse1</name>
<state>0</state>
</option>
<option>
<name>OCImagesUse2</name>
<state>0</state>
</option>
<option>
<name>OCImagesUse3</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>ARMSIM_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCSimDriverInfo</name>
<state>1</state>
</option>
<option>
<name>OCSimEnablePSP</name>
<state>0</state>
</option>
<option>
<name>OCSimPspOverrideConfig</name>
<state>0</state>
</option>
<option>
<name>OCSimPspConfigFile</name>
<state></state>
</option>
</data>
</settings>
<settings>
<name>ANGEL_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CCAngelHeartbeat</name>
<state>1</state>
</option>
<option>
<name>CAngelCommunication</name>
<state>1</state>
</option>
<option>
<name>CAngelCommBaud</name>
<version>0</version>
<state>3</state>
</option>
<option>
<name>CAngelCommPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>ANGELTCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>DoAngelLogfile</name>
<state>0</state>
</option>
<option>
<name>AngelLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>GDBSERVER_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>TCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>DoLogfile</name>
<state>0</state>
</option>
<option>
<name>LogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCJTagBreakpointRadio</name>
<state>0</state>
</option>
<option>
<name>CCJTagDoUpdateBreakpoints</name>
<state>0</state>
</option>
<option>
<name>CCJTagUpdateBreakpoints</name>
<state>_call_main</state>
</option>
</data>
</settings>
<settings>
<name>IARROM_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CRomLogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CRomLogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CRomCommPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CRomCommBaud</name>
<version>0</version>
<state>7</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>JLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>13</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>JLinkSpeed</name>
<state>32</state>
</option>
<option>
<name>CCJLinkDoLogfile</name>
<state>0</state>
</option>
<option>
<name>CCJLinkLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCJLinkHWResetDelay</name>
<state>0</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>JLinkInitialSpeed</name>
<state>32</state>
</option>
<option>
<name>CCDoJlinkMultiTarget</name>
<state>0</state>
</option>
<option>
<name>CCScanChainNonARMDevices</name>
<state>0</state>
</option>
<option>
<name>CCJLinkMultiTarget</name>
<state>0</state>
</option>
<option>
<name>CCJLinkIRLength</name>
<state>0</state>
</option>
<option>
<name>CCJLinkCommRadio</name>
<state>0</state>
</option>
<option>
<name>CCJLinkTCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>CCJLinkSpeedRadioV2</name>
<state>0</state>
</option>
<option>
<name>CCUSBDevice</name>
<version>1</version>
<state>1</state>
</option>
<option>
<name>CCRDICatchReset</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchUndef</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchSWI</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchData</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchPrefetch</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchIRQ</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchFIQ</name>
<state>0</state>
</option>
<option>
<name>CCJLinkBreakpointRadio</name>
<state>0</state>
</option>
<option>
<name>CCJLinkDoUpdateBreakpoints</name>
<state>0</state>
</option>
<option>
<name>CCJLinkUpdateBreakpoints</name>
<state>_call_main</state>
</option>
<option>
<name>CCJLinkInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>OCJLinkAttachSlave</name>
<state>1</state>
</option>
<option>
<name>CCJLinkResetList</name>
<version>6</version>
<state>5</state>
</option>
<option>
<name>CCJLinkInterfaceCmdLine</name>
<state>0</state>
</option>
<option>
<name>CCCatchCORERESET</name>
<state>0</state>
</option>
<option>
<name>CCCatchMMERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchNOCPERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchCHRERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchSTATERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchBUSERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchINTERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchHARDERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchDummy</name>
<state>0</state>
</option>
<option>
<name>OCJLinkScriptFile</name>
<state>1</state>
</option>
<option>
<name>CCJLinkUsbSerialNo</name>
<state></state>
</option>
<option>
<name>CCTcpIpAlt</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCJLinkTcpIpSerialNo</name>
<state></state>
</option>
<option>
<name>CCCpuClockEdit</name>
<state>72.0</state>
</option>
<option>
<name>CCSwoClockAuto</name>
<state>0</state>
</option>
<option>
<name>CCSwoClockEdit</name>
<state>2000</state>
</option>
</data>
</settings>
<settings>
<name>LMIFTDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>LmiftdiSpeed</name>
<state>500</state>
</option>
<option>
<name>CCLmiftdiDoLogfile</name>
<state>0</state>
</option>
<option>
<name>CCLmiftdiLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCLmiFtdiInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCLmiFtdiInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MACRAIGOR_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>3</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>jtag</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>EmuSpeed</name>
<state>1</state>
</option>
<option>
<name>TCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>DoLogfile</name>
<state>0</state>
</option>
<option>
<name>LogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>DoEmuMultiTarget</name>
<state>0</state>
</option>
<option>
<name>EmuMultiTarget</name>
<state>0@ARM7TDMI</state>
</option>
<option>
<name>EmuHWReset</name>
<state>0</state>
</option>
<option>
<name>CEmuCommBaud</name>
<version>0</version>
<state>4</state>
</option>
<option>
<name>CEmuCommPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>jtago</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>UnusedAddr</name>
<state>0x00800000</state>
</option>
<option>
<name>CCMacraigorHWResetDelay</name>
<state></state>
</option>
<option>
<name>CCJTagBreakpointRadio</name>
<state>0</state>
</option>
<option>
<name>CCJTagDoUpdateBreakpoints</name>
<state>0</state>
</option>
<option>
<name>CCJTagUpdateBreakpoints</name>
<state>_call_main</state>
</option>
<option>
<name>CCMacraigorInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCMacraigorInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>PEMICRO_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>OCPEMicroAttachSlave</name>
<state>1</state>
</option>
<option>
<name>CCPEMicroInterfaceList</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCPEMicroResetDelay</name>
<state></state>
</option>
<option>
<name>CCPEMicroJtagSpeed</name>
<state>#UNINITIALIZED#</state>
</option>
<option>
<name>CCJPEMicroShowSettings</name>
<state>0</state>
</option>
<option>
<name>DoLogfile</name>
<state>0</state>
</option>
<option>
<name>LogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCPEMicroUSBDevice</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCPEMicroSerialPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCJPEMicroTCPIPAutoScanNetwork</name>
<state>1</state>
</option>
<option>
<name>CCPEMicroTCPIP</name>
<state>10.0.0.1</state>
</option>
<option>
<name>CCPEMicroCommCmdLineProducer</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>RDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CRDIDriverDll</name>
<state>###Uninitialized###</state>
</option>
<option>
<name>CRDILogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CRDILogFileEdit</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCRDIHWReset</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchReset</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchUndef</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchSWI</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchData</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchPrefetch</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchIRQ</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchFIQ</name>
<state>0</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>CCSTLinkInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCSTLinkInterfaceCmdLine</name>
<state>0</state>
</option>
<option>
<name>CCSTLinkResetList</name>
<version>1</version>
<state>0</state>
</option>
<option>
<name>CCCpuClockEdit</name>
<state>72.0</state>
</option>
<option>
<name>CCSwoClockAuto</name>
<state>0</state>
</option>
<option>
<name>CCSwoClockEdit</name>
<state>2000</state>
</option>
</data>
</settings>
<settings>
<name>THIRDPARTY_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CThirdPartyDriverDll</name>
<state>###Uninitialized###</state>
</option>
<option>
<name>CThirdPartyLogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CThirdPartyLogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>XDS100_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>OCXDS100AttachSlave</name>
<state>1</state>
</option>
</data>
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
<configuration>
<name>Release</name>
<toolchain>
<name>ARM</name>
</toolchain>
<debug>0</debug>
<settings>
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>22</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>CInput</name>
<state>1</state>
</option>
<option>
<name>CEndian</name>
<state>1</state>
</option>
<option>
<name>CProcessor</name>
<state>1</state>
</option>
<option>
<name>OCVariant</name>
<state>0</state>
</option>
<option>
<name>MacOverride</name>
<state>0</state>
</option>
<option>
<name>MacFile</name>
<state></state>
</option>
<option>
<name>MemOverride</name>
<state>0</state>
</option>
<option>
<name>MemFile</name>
<state></state>
</option>
<option>
<name>RunToEnable</name>
<state>1</state>
</option>
<option>
<name>RunToName</name>
<state>main</state>
</option>
<option>
<name>CExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>CExtraOptions</name>
<state></state>
</option>
<option>
<name>CFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>OCDDFArgumentProducer</name>
<state></state>
</option>
<option>
<name>OCDownloadSuppressDownload</name>
<state>0</state>
</option>
<option>
<name>OCDownloadVerifyAll</name>
<state>0</state>
</option>
<option>
<name>OCProductVersion</name>
<state>6.21.3.52923</state>
</option>
<option>
<name>OCDynDriverList</name>
<state>ARMSIM_ID</state>
</option>
<option>
<name>OCLastSavedByProductVersion</name>
<state></state>
</option>
<option>
<name>OCDownloadAttachToProgram</name>
<state>0</state>
</option>
<option>
<name>UseFlashLoader</name>
<state>0</state>
</option>
<option>
<name>CLowLevel</name>
<state>1</state>
</option>
<option>
<name>OCBE8Slave</name>
<state>1</state>
</option>
<option>
<name>MacFile2</name>
<state></state>
</option>
<option>
<name>CDevice</name>
<state>1</state>
</option>
<option>
<name>FlashLoadersV3</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath1</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck2</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath2</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck3</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath3</name>
<state></state>
</option>
<option>
<name>OverrideDefFlashBoard</name>
<state>0</state>
</option>
<option>
<name>OCImagesOffset1</name>
<state></state>
</option>
<option>
<name>OCImagesOffset2</name>
<state></state>
</option>
<option>
<name>OCImagesOffset3</name>
<state></state>
</option>
<option>
<name>OCImagesUse1</name>
<state>0</state>
</option>
<option>
<name>OCImagesUse2</name>
<state>0</state>
</option>
<option>
<name>OCImagesUse3</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>ARMSIM_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OCSimDriverInfo</name>
<state>1</state>
</option>
<option>
<name>OCSimEnablePSP</name>
<state>0</state>
</option>
<option>
<name>OCSimPspOverrideConfig</name>
<state>0</state>
</option>
<option>
<name>OCSimPspConfigFile</name>
<state></state>
</option>
</data>
</settings>
<settings>
<name>ANGEL_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>CCAngelHeartbeat</name>
<state>1</state>
</option>
<option>
<name>CAngelCommunication</name>
<state>1</state>
</option>
<option>
<name>CAngelCommBaud</name>
<version>0</version>
<state>3</state>
</option>
<option>
<name>CAngelCommPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>ANGELTCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>DoAngelLogfile</name>
<state>0</state>
</option>
<option>
<name>AngelLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>GDBSERVER_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>TCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>DoLogfile</name>
<state>0</state>
</option>
<option>
<name>LogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCJTagBreakpointRadio</name>
<state>0</state>
</option>
<option>
<name>CCJTagDoUpdateBreakpoints</name>
<state>0</state>
</option>
<option>
<name>CCJTagUpdateBreakpoints</name>
<state>_call_main</state>
</option>
</data>
</settings>
<settings>
<name>IARROM_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>CRomLogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CRomLogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CRomCommPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CRomCommBaud</name>
<version>0</version>
<state>7</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>JLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>13</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>JLinkSpeed</name>
<state>32</state>
</option>
<option>
<name>CCJLinkDoLogfile</name>
<state>0</state>
</option>
<option>
<name>CCJLinkLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCJLinkHWResetDelay</name>
<state>0</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>JLinkInitialSpeed</name>
<state>32</state>
</option>
<option>
<name>CCDoJlinkMultiTarget</name>
<state>0</state>
</option>
<option>
<name>CCScanChainNonARMDevices</name>
<state>0</state>
</option>
<option>
<name>CCJLinkMultiTarget</name>
<state>0</state>
</option>
<option>
<name>CCJLinkIRLength</name>
<state>0</state>
</option>
<option>
<name>CCJLinkCommRadio</name>
<state>0</state>
</option>
<option>
<name>CCJLinkTCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>CCJLinkSpeedRadioV2</name>
<state>0</state>
</option>
<option>
<name>CCUSBDevice</name>
<version>1</version>
<state>1</state>
</option>
<option>
<name>CCRDICatchReset</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchUndef</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchSWI</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchData</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchPrefetch</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchIRQ</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchFIQ</name>
<state>0</state>
</option>
<option>
<name>CCJLinkBreakpointRadio</name>
<state>0</state>
</option>
<option>
<name>CCJLinkDoUpdateBreakpoints</name>
<state>0</state>
</option>
<option>
<name>CCJLinkUpdateBreakpoints</name>
<state>_call_main</state>
</option>
<option>
<name>CCJLinkInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>OCJLinkAttachSlave</name>
<state>1</state>
</option>
<option>
<name>CCJLinkResetList</name>
<version>6</version>
<state>5</state>
</option>
<option>
<name>CCJLinkInterfaceCmdLine</name>
<state>0</state>
</option>
<option>
<name>CCCatchCORERESET</name>
<state>0</state>
</option>
<option>
<name>CCCatchMMERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchNOCPERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchCHRERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchSTATERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchBUSERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchINTERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchHARDERR</name>
<state>0</state>
</option>
<option>
<name>CCCatchDummy</name>
<state>0</state>
</option>
<option>
<name>OCJLinkScriptFile</name>
<state>1</state>
</option>
<option>
<name>CCJLinkUsbSerialNo</name>
<state></state>
</option>
<option>
<name>CCTcpIpAlt</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCJLinkTcpIpSerialNo</name>
<state></state>
</option>
<option>
<name>CCCpuClockEdit</name>
<state>72.0</state>
</option>
<option>
<name>CCSwoClockAuto</name>
<state>0</state>
</option>
<option>
<name>CCSwoClockEdit</name>
<state>2000</state>
</option>
</data>
</settings>
<settings>
<name>LMIFTDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>LmiftdiSpeed</name>
<state>500</state>
</option>
<option>
<name>CCLmiftdiDoLogfile</name>
<state>0</state>
</option>
<option>
<name>CCLmiftdiLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCLmiFtdiInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCLmiFtdiInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MACRAIGOR_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>3</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>jtag</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>EmuSpeed</name>
<state>1</state>
</option>
<option>
<name>TCPIP</name>
<state>aaa.bbb.ccc.ddd</state>
</option>
<option>
<name>DoLogfile</name>
<state>0</state>
</option>
<option>
<name>LogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>DoEmuMultiTarget</name>
<state>0</state>
</option>
<option>
<name>EmuMultiTarget</name>
<state>0@ARM7TDMI</state>
</option>
<option>
<name>EmuHWReset</name>
<state>0</state>
</option>
<option>
<name>CEmuCommBaud</name>
<version>0</version>
<state>4</state>
</option>
<option>
<name>CEmuCommPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>jtago</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>UnusedAddr</name>
<state>0x00800000</state>
</option>
<option>
<name>CCMacraigorHWResetDelay</name>
<state></state>
</option>
<option>
<name>CCJTagBreakpointRadio</name>
<state>0</state>
</option>
<option>
<name>CCJTagDoUpdateBreakpoints</name>
<state>0</state>
</option>
<option>
<name>CCJTagUpdateBreakpoints</name>
<state>_call_main</state>
</option>
<option>
<name>CCMacraigorInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCMacraigorInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>PEMICRO_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>OCPEMicroAttachSlave</name>
<state>1</state>
</option>
<option>
<name>CCPEMicroInterfaceList</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCPEMicroResetDelay</name>
<state></state>
</option>
<option>
<name>CCPEMicroJtagSpeed</name>
<state>#UNINITIALIZED#</state>
</option>
<option>
<name>CCJPEMicroShowSettings</name>
<state>0</state>
</option>
<option>
<name>DoLogfile</name>
<state>0</state>
</option>
<option>
<name>LogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCPEMicroUSBDevice</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCPEMicroSerialPort</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCJPEMicroTCPIPAutoScanNetwork</name>
<state>1</state>
</option>
<option>
<name>CCPEMicroTCPIP</name>
<state>10.0.0.1</state>
</option>
<option>
<name>CCPEMicroCommCmdLineProducer</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>RDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>CRDIDriverDll</name>
<state>###Uninitialized###</state>
</option>
<option>
<name>CRDILogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CRDILogFileEdit</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCRDIHWReset</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchReset</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchUndef</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchSWI</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchData</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchPrefetch</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchIRQ</name>
<state>0</state>
</option>
<option>
<name>CCRDICatchFIQ</name>
<state>0</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>CCSTLinkInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCSTLinkInterfaceCmdLine</name>
<state>0</state>
</option>
<option>
<name>CCSTLinkResetList</name>
<version>1</version>
<state>0</state>
</option>
<option>
<name>CCCpuClockEdit</name>
<state>72.0</state>
</option>
<option>
<name>CCSwoClockAuto</name>
<state>0</state>
</option>
<option>
<name>CCSwoClockEdit</name>
<state>2000</state>
</option>
</data>
</settings>
<settings>
<name>THIRDPARTY_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>CThirdPartyDriverDll</name>
<state>###Uninitialized###</state>
</option>
<option>
<name>CThirdPartyLogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CThirdPartyLogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>XDS100_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
<option>
<name>OCXDS100AttachSlave</name>
<state>1</state>
</option>
</data>
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
</project>

View File

@ -0,0 +1,1824 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>2</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
<name>ARM</name>
</toolchain>
<debug>1</debug>
<settings>
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>ExePath</name>
<state>Debug\Exe</state>
</option>
<option>
<name>ObjPath</name>
<state>Debug\Obj</state>
</option>
<option>
<name>ListPath</name>
<state>Debug\List</state>
</option>
<option>
<name>Variant</name>
<version>19</version>
<state>37</state>
</option>
<option>
<name>GEndianMode</name>
<state>0</state>
</option>
<option>
<name>Input variant</name>
<version>3</version>
<state>0</state>
</option>
<option>
<name>Input description</name>
<state>Automatic choice of formatter.</state>
</option>
<option>
<name>Output variant</name>
<version>2</version>
<state>0</state>
</option>
<option>
<name>Output description</name>
<state>Automatic choice of formatter.</state>
</option>
<option>
<name>GOutputBinary</name>
<state>1</state>
</option>
<option>
<name>FPU</name>
<version>2</version>
<state>0</state>
</option>
<option>
<name>OGCoreOrChip</name>
<state>1</state>
</option>
<option>
<name>GRuntimeLibSelect</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>GRuntimeLibSelectSlave</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>RTDescription</name>
<state>To be used with the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
</option>
<option>
<name>OGProductVersion</name>
<state>6.21.3.52923</state>
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>6.21.3.52923</state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraVerbose</name>
<state>0</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
<state>SAM3S4 Atmel SAM3S4</state>
</option>
<option>
<name>GenLowLevelInterface</name>
<state>0</state>
</option>
<option>
<name>GEndianModeBE</name>
<state>1</state>
</option>
<option>
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>RTConfigPath2</name>
<state>$TOOLKIT_DIR$\INC\c\DLib_Config_Normal.h</state>
</option>
<option>
<name>GFPUCoreSlave</name>
<version>19</version>
<state>37</state>
</option>
<option>
<name>GBECoreSlave</name>
<version>19</version>
<state>37</state>
</option>
<option>
<name>OGUseCmsis</name>
<state>1</state>
</option>
<option>
<name>OGUseCmsisDspLib</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>28</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CCDefines</name>
<state>__SAM3S4C__</state>
</option>
<option>
<name>CCPreprocFile</name>
<state>0</state>
</option>
<option>
<name>CCPreprocComments</name>
<state>0</state>
</option>
<option>
<name>CCPreprocLine</name>
<state>0</state>
</option>
<option>
<name>CCListCFile</name>
<state>0</state>
</option>
<option>
<name>CCListCMnemonics</name>
<state>0</state>
</option>
<option>
<name>CCListCMessages</name>
<state>0</state>
</option>
<option>
<name>CCListAssFile</name>
<state>0</state>
</option>
<option>
<name>CCListAssSource</name>
<state>0</state>
</option>
<option>
<name>CCEnableRemarks</name>
<state>1</state>
</option>
<option>
<name>CCDiagSuppress</name>
<state></state>
</option>
<option>
<name>CCDiagRemark</name>
<state></state>
</option>
<option>
<name>CCDiagWarning</name>
<state></state>
</option>
<option>
<name>CCDiagError</name>
<state></state>
</option>
<option>
<name>CCObjPrefix</name>
<state>1</state>
</option>
<option>
<name>CCAllowList</name>
<version>1</version>
<state>0000000</state>
</option>
<option>
<name>CCDebugInfo</name>
<state>1</state>
</option>
<option>
<name>IEndianMode</name>
<state>1</state>
</option>
<option>
<name>IProcessor</name>
<state>1</state>
</option>
<option>
<name>IExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>IExtraOptions</name>
<state></state>
</option>
<option>
<name>CCLangConformance</name>
<state>0</state>
</option>
<option>
<name>CCSignedPlainChar</name>
<state>1</state>
</option>
<option>
<name>CCRequirePrototypes</name>
<state>1</state>
</option>
<option>
<name>CCMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>CCDiagWarnAreErr</name>
<state>0</state>
</option>
<option>
<name>CCCompilerRuntimeInfo</name>
<state>0</state>
</option>
<option>
<name>IFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>OutputFile</name>
<state>$FILE_BNAME$.o</state>
</option>
<option>
<name>CCLibConfigHeader</name>
<state>1</state>
</option>
<option>
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
</option>
<option>
<name>CCIncludePath2</name>
<state>$PROJ_DIR$\..\..\..\cores\sam</state>
<state>$PROJ_DIR$\..\..\..\system</state>
<state>$PROJ_DIR$\..\..</state>
</option>
<option>
<name>CCStdIncCheck</name>
<state>0</state>
</option>
<option>
<name>CCCodeSection</name>
<state>.text</state>
</option>
<option>
<name>IInterwork2</name>
<state>0</state>
</option>
<option>
<name>IProcessorMode2</name>
<state>1</state>
</option>
<option>
<name>CCOptLevel</name>
<state>1</state>
</option>
<option>
<name>CCOptStrategy</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCOptLevelSlave</name>
<state>1</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>CCPosIndRopi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndRwpi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndNoDynInit</name>
<state>0</state>
</option>
<option>
<name>IccLang</name>
<state>1</state>
</option>
<option>
<name>IccCDialect</name>
<state>1</state>
</option>
<option>
<name>IccAllowVLA</name>
<state>0</state>
</option>
<option>
<name>IccCppDialect</name>
<state>2</state>
</option>
<option>
<name>IccExceptions</name>
<state>1</state>
</option>
<option>
<name>IccRTTI</name>
<state>1</state>
</option>
<option>
<name>IccStaticDestr</name>
<state>1</state>
</option>
<option>
<name>IccCppInlineSemantics</name>
<state>0</state>
</option>
<option>
<name>IccCmsis</name>
<state>1</state>
</option>
<option>
<name>IccFloatSemantics</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>AObjPrefix</name>
<state>1</state>
</option>
<option>
<name>AEndian</name>
<state>1</state>
</option>
<option>
<name>ACaseSensitivity</name>
<state>1</state>
</option>
<option>
<name>MacroChars</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>AWarnEnable</name>
<state>0</state>
</option>
<option>
<name>AWarnWhat</name>
<state>0</state>
</option>
<option>
<name>AWarnOne</name>
<state></state>
</option>
<option>
<name>AWarnRange1</name>
<state></state>
</option>
<option>
<name>AWarnRange2</name>
<state></state>
</option>
<option>
<name>ADebug</name>
<state>1</state>
</option>
<option>
<name>AltRegisterNames</name>
<state>0</state>
</option>
<option>
<name>ADefines</name>
<state></state>
</option>
<option>
<name>AList</name>
<state>0</state>
</option>
<option>
<name>AListHeader</name>
<state>1</state>
</option>
<option>
<name>AListing</name>
<state>1</state>
</option>
<option>
<name>Includes</name>
<state>0</state>
</option>
<option>
<name>MacDefs</name>
<state>0</state>
</option>
<option>
<name>MacExps</name>
<state>1</state>
</option>
<option>
<name>MacExec</name>
<state>0</state>
</option>
<option>
<name>OnlyAssed</name>
<state>0</state>
</option>
<option>
<name>MultiLine</name>
<state>0</state>
</option>
<option>
<name>PageLengthCheck</name>
<state>0</state>
</option>
<option>
<name>PageLength</name>
<state>80</state>
</option>
<option>
<name>TabSpacing</name>
<state>8</state>
</option>
<option>
<name>AXRef</name>
<state>0</state>
</option>
<option>
<name>AXRefDefines</name>
<state>0</state>
</option>
<option>
<name>AXRefInternal</name>
<state>0</state>
</option>
<option>
<name>AXRefDual</name>
<state>0</state>
</option>
<option>
<name>AProcessor</name>
<state>1</state>
</option>
<option>
<name>AFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>AOutputFile</name>
<state>$FILE_BNAME$.o</state>
</option>
<option>
<name>AMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsCheck</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsEdit</name>
<state>100</state>
</option>
<option>
<name>AIgnoreStdInclude</name>
<state>0</state>
</option>
<option>
<name>AUserIncludes</name>
<state></state>
</option>
<option>
<name>AExtraOptionsCheckV2</name>
<state>0</state>
</option>
<option>
<name>AExtraOptionsV2</name>
<state></state>
</option>
</data>
</settings>
<settings>
<name>OBJCOPY</name>
<archiveVersion>0</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OOCOutputFormat</name>
<version>2</version>
<state>0</state>
</option>
<option>
<name>OCOutputOverride</name>
<state>0</state>
</option>
<option>
<name>OOCOutputFile</name>
<state></state>
</option>
<option>
<name>OOCCommandLineProducer</name>
<state>1</state>
</option>
<option>
<name>OOCObjCopyEnable</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>CUSTOM</name>
<archiveVersion>3</archiveVersion>
<data>
<extensions></extensions>
<cmdline></cmdline>
</data>
</settings>
<settings>
<name>BICOMP</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>13</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>IlinkLibIOConfig</name>
<state>1</state>
</option>
<option>
<name>XLinkMisraHandler</name>
<state>0</state>
</option>
<option>
<name>IlinkInputFileSlave</name>
<state>0</state>
</option>
<option>
<name>IlinkOutputFile</name>
<state>libsam3s_ek.out</state>
</option>
<option>
<name>IlinkDebugInfoEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkKeepSymbols</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryFile</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySymbol</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySegment</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryAlign</name>
<state></state>
</option>
<option>
<name>IlinkDefines</name>
<state></state>
</option>
<option>
<name>IlinkConfigDefines</name>
<state></state>
</option>
<option>
<name>IlinkMapFile</name>
<state>0</state>
</option>
<option>
<name>IlinkLogFile</name>
<state>0</state>
</option>
<option>
<name>IlinkLogInitialization</name>
<state>0</state>
</option>
<option>
<name>IlinkLogModule</name>
<state>0</state>
</option>
<option>
<name>IlinkLogSection</name>
<state>0</state>
</option>
<option>
<name>IlinkLogVeneer</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfOverride</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfFile</name>
<state>lnk0t.icf</state>
</option>
<option>
<name>IlinkIcfFileSlave</name>
<state></state>
</option>
<option>
<name>IlinkEnableRemarks</name>
<state>0</state>
</option>
<option>
<name>IlinkSuppressDiags</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsRem</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsWarn</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsErr</name>
<state></state>
</option>
<option>
<name>IlinkWarningsAreErrors</name>
<state>0</state>
</option>
<option>
<name>IlinkUseExtraOptions</name>
<state>0</state>
</option>
<option>
<name>IlinkExtraOptions</name>
<state></state>
</option>
<option>
<name>IlinkLowLevelInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>IlinkAutoLibEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkAdditionalLibs</name>
<state></state>
</option>
<option>
<name>IlinkOverrideProgramEntryLabel</name>
<state>0</state>
</option>
<option>
<name>IlinkProgramEntryLabelSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkProgramEntryLabel</name>
<state></state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
</option>
<option>
<name>FillerByte</name>
<state>0xFF</state>
</option>
<option>
<name>FillerStart</name>
<state>0x0</state>
</option>
<option>
<name>FillerEnd</name>
<state>0x0</state>
</option>
<option>
<name>CrcSize</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CrcAlign</name>
<state>1</state>
</option>
<option>
<name>CrcAlgo</name>
<state>1</state>
</option>
<option>
<name>CrcPoly</name>
<state>0x11021</state>
</option>
<option>
<name>CrcCompl</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcBitOrder</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcInitialValue</name>
<state>0x0</state>
</option>
<option>
<name>DoCrc</name>
<state>0</state>
</option>
<option>
<name>IlinkBE8Slave</name>
<state>1</state>
</option>
<option>
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
<option>
<name>IlinkLogAutoLibSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkLogRedirSymbols</name>
<state>0</state>
</option>
<option>
<name>IlinkLogUnusedFragments</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcReverseByteOrder</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcUseAsInput</name>
<state>1</state>
</option>
<option>
<name>IlinkOptInline</name>
<state>0</state>
</option>
<option>
<name>IlinkOptExceptionsAllow</name>
<state>1</state>
</option>
<option>
<name>IlinkOptExceptionsForce</name>
<state>0</state>
</option>
<option>
<name>IlinkCmsis</name>
<state>1</state>
</option>
<option>
<name>IlinkOptMergeDuplSections</name>
<state>0</state>
</option>
<option>
<name>IlinkOptUseVfe</name>
<state>1</state>
</option>
<option>
<name>IlinkOptForceVfe</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>IARCHIVE</name>
<archiveVersion>0</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>IarchiveInputs</name>
<state></state>
</option>
<option>
<name>IarchiveOverride</name>
<state>1</state>
</option>
<option>
<name>IarchiveOutput</name>
<state>$PROJ_DIR$\..\..\..\cores\sam\libvariant_sam3s_ek_ewarm_dbg.a</state>
</option>
</data>
</settings>
<settings>
<name>BILINK</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
</configuration>
<configuration>
<name>Release</name>
<toolchain>
<name>ARM</name>
</toolchain>
<debug>0</debug>
<settings>
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>ExePath</name>
<state>Release\Exe</state>
</option>
<option>
<name>ObjPath</name>
<state>Release\Obj</state>
</option>
<option>
<name>ListPath</name>
<state>Release\List</state>
</option>
<option>
<name>Variant</name>
<version>19</version>
<state>0</state>
</option>
<option>
<name>GEndianMode</name>
<state>0</state>
</option>
<option>
<name>Input variant</name>
<version>3</version>
<state>0</state>
</option>
<option>
<name>Input description</name>
<state></state>
</option>
<option>
<name>Output variant</name>
<version>2</version>
<state>0</state>
</option>
<option>
<name>Output description</name>
<state></state>
</option>
<option>
<name>GOutputBinary</name>
<state>0</state>
</option>
<option>
<name>FPU</name>
<version>2</version>
<state>0</state>
</option>
<option>
<name>OGCoreOrChip</name>
<state>0</state>
</option>
<option>
<name>GRuntimeLibSelect</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>GRuntimeLibSelectSlave</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>RTDescription</name>
<state></state>
</option>
<option>
<name>OGProductVersion</name>
<state>6.21.3.52923</state>
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state></state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraVerbose</name>
<state>0</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
<state></state>
</option>
<option>
<name>GenLowLevelInterface</name>
<state>0</state>
</option>
<option>
<name>GEndianModeBE</name>
<state>0</state>
</option>
<option>
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>RTConfigPath2</name>
<state></state>
</option>
<option>
<name>GFPUCoreSlave</name>
<version>19</version>
<state>1</state>
</option>
<option>
<name>GBECoreSlave</name>
<version>19</version>
<state>1</state>
</option>
<option>
<name>OGUseCmsis</name>
<state>0</state>
</option>
<option>
<name>OGUseCmsisDspLib</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>28</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>CCDefines</name>
<state>NDEBUG</state>
</option>
<option>
<name>CCPreprocFile</name>
<state>0</state>
</option>
<option>
<name>CCPreprocComments</name>
<state>0</state>
</option>
<option>
<name>CCPreprocLine</name>
<state>0</state>
</option>
<option>
<name>CCListCFile</name>
<state>0</state>
</option>
<option>
<name>CCListCMnemonics</name>
<state>0</state>
</option>
<option>
<name>CCListCMessages</name>
<state>0</state>
</option>
<option>
<name>CCListAssFile</name>
<state>0</state>
</option>
<option>
<name>CCListAssSource</name>
<state>0</state>
</option>
<option>
<name>CCEnableRemarks</name>
<state>0</state>
</option>
<option>
<name>CCDiagSuppress</name>
<state></state>
</option>
<option>
<name>CCDiagRemark</name>
<state></state>
</option>
<option>
<name>CCDiagWarning</name>
<state></state>
</option>
<option>
<name>CCDiagError</name>
<state></state>
</option>
<option>
<name>CCObjPrefix</name>
<state>1</state>
</option>
<option>
<name>CCAllowList</name>
<version>1</version>
<state>1111111</state>
</option>
<option>
<name>CCDebugInfo</name>
<state>0</state>
</option>
<option>
<name>IEndianMode</name>
<state>1</state>
</option>
<option>
<name>IProcessor</name>
<state>1</state>
</option>
<option>
<name>IExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>IExtraOptions</name>
<state></state>
</option>
<option>
<name>CCLangConformance</name>
<state>0</state>
</option>
<option>
<name>CCSignedPlainChar</name>
<state>1</state>
</option>
<option>
<name>CCRequirePrototypes</name>
<state>0</state>
</option>
<option>
<name>CCMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>CCDiagWarnAreErr</name>
<state>0</state>
</option>
<option>
<name>CCCompilerRuntimeInfo</name>
<state>0</state>
</option>
<option>
<name>IFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>OutputFile</name>
<state></state>
</option>
<option>
<name>CCLibConfigHeader</name>
<state>1</state>
</option>
<option>
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
</option>
<option>
<name>CCIncludePath2</name>
<state></state>
</option>
<option>
<name>CCStdIncCheck</name>
<state>0</state>
</option>
<option>
<name>CCCodeSection</name>
<state>.text</state>
</option>
<option>
<name>IInterwork2</name>
<state>0</state>
</option>
<option>
<name>IProcessorMode2</name>
<state>1</state>
</option>
<option>
<name>CCOptLevel</name>
<state>3</state>
</option>
<option>
<name>CCOptStrategy</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCOptLevelSlave</name>
<state>1</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>CCPosIndRopi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndRwpi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndNoDynInit</name>
<state>0</state>
</option>
<option>
<name>IccLang</name>
<state>0</state>
</option>
<option>
<name>IccCDialect</name>
<state>1</state>
</option>
<option>
<name>IccAllowVLA</name>
<state>0</state>
</option>
<option>
<name>IccCppDialect</name>
<state>1</state>
</option>
<option>
<name>IccExceptions</name>
<state>1</state>
</option>
<option>
<name>IccRTTI</name>
<state>1</state>
</option>
<option>
<name>IccStaticDestr</name>
<state>1</state>
</option>
<option>
<name>IccCppInlineSemantics</name>
<state>0</state>
</option>
<option>
<name>IccCmsis</name>
<state>1</state>
</option>
<option>
<name>IccFloatSemantics</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>AObjPrefix</name>
<state>1</state>
</option>
<option>
<name>AEndian</name>
<state>1</state>
</option>
<option>
<name>ACaseSensitivity</name>
<state>1</state>
</option>
<option>
<name>MacroChars</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>AWarnEnable</name>
<state>0</state>
</option>
<option>
<name>AWarnWhat</name>
<state>0</state>
</option>
<option>
<name>AWarnOne</name>
<state></state>
</option>
<option>
<name>AWarnRange1</name>
<state></state>
</option>
<option>
<name>AWarnRange2</name>
<state></state>
</option>
<option>
<name>ADebug</name>
<state>0</state>
</option>
<option>
<name>AltRegisterNames</name>
<state>0</state>
</option>
<option>
<name>ADefines</name>
<state></state>
</option>
<option>
<name>AList</name>
<state>0</state>
</option>
<option>
<name>AListHeader</name>
<state>1</state>
</option>
<option>
<name>AListing</name>
<state>1</state>
</option>
<option>
<name>Includes</name>
<state>0</state>
</option>
<option>
<name>MacDefs</name>
<state>0</state>
</option>
<option>
<name>MacExps</name>
<state>1</state>
</option>
<option>
<name>MacExec</name>
<state>0</state>
</option>
<option>
<name>OnlyAssed</name>
<state>0</state>
</option>
<option>
<name>MultiLine</name>
<state>0</state>
</option>
<option>
<name>PageLengthCheck</name>
<state>0</state>
</option>
<option>
<name>PageLength</name>
<state>80</state>
</option>
<option>
<name>TabSpacing</name>
<state>8</state>
</option>
<option>
<name>AXRef</name>
<state>0</state>
</option>
<option>
<name>AXRefDefines</name>
<state>0</state>
</option>
<option>
<name>AXRefInternal</name>
<state>0</state>
</option>
<option>
<name>AXRefDual</name>
<state>0</state>
</option>
<option>
<name>AProcessor</name>
<state>1</state>
</option>
<option>
<name>AFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>AOutputFile</name>
<state></state>
</option>
<option>
<name>AMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsCheck</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsEdit</name>
<state>100</state>
</option>
<option>
<name>AIgnoreStdInclude</name>
<state>0</state>
</option>
<option>
<name>AUserIncludes</name>
<state></state>
</option>
<option>
<name>AExtraOptionsCheckV2</name>
<state>0</state>
</option>
<option>
<name>AExtraOptionsV2</name>
<state></state>
</option>
</data>
</settings>
<settings>
<name>OBJCOPY</name>
<archiveVersion>0</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OOCOutputFormat</name>
<version>2</version>
<state>0</state>
</option>
<option>
<name>OCOutputOverride</name>
<state>0</state>
</option>
<option>
<name>OOCOutputFile</name>
<state></state>
</option>
<option>
<name>OOCCommandLineProducer</name>
<state>1</state>
</option>
<option>
<name>OOCObjCopyEnable</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>CUSTOM</name>
<archiveVersion>3</archiveVersion>
<data>
<extensions></extensions>
<cmdline></cmdline>
</data>
</settings>
<settings>
<name>BICOMP</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>13</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>IlinkLibIOConfig</name>
<state>1</state>
</option>
<option>
<name>XLinkMisraHandler</name>
<state>0</state>
</option>
<option>
<name>IlinkInputFileSlave</name>
<state>0</state>
</option>
<option>
<name>IlinkOutputFile</name>
<state>###Unitialized###</state>
</option>
<option>
<name>IlinkDebugInfoEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkKeepSymbols</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryFile</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySymbol</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySegment</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryAlign</name>
<state></state>
</option>
<option>
<name>IlinkDefines</name>
<state></state>
</option>
<option>
<name>IlinkConfigDefines</name>
<state></state>
</option>
<option>
<name>IlinkMapFile</name>
<state>0</state>
</option>
<option>
<name>IlinkLogFile</name>
<state>0</state>
</option>
<option>
<name>IlinkLogInitialization</name>
<state>0</state>
</option>
<option>
<name>IlinkLogModule</name>
<state>0</state>
</option>
<option>
<name>IlinkLogSection</name>
<state>0</state>
</option>
<option>
<name>IlinkLogVeneer</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfOverride</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfFile</name>
<state>lnk0t.icf</state>
</option>
<option>
<name>IlinkIcfFileSlave</name>
<state></state>
</option>
<option>
<name>IlinkEnableRemarks</name>
<state>0</state>
</option>
<option>
<name>IlinkSuppressDiags</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsRem</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsWarn</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsErr</name>
<state></state>
</option>
<option>
<name>IlinkWarningsAreErrors</name>
<state>0</state>
</option>
<option>
<name>IlinkUseExtraOptions</name>
<state>0</state>
</option>
<option>
<name>IlinkExtraOptions</name>
<state></state>
</option>
<option>
<name>IlinkLowLevelInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>IlinkAutoLibEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkAdditionalLibs</name>
<state></state>
</option>
<option>
<name>IlinkOverrideProgramEntryLabel</name>
<state>0</state>
</option>
<option>
<name>IlinkProgramEntryLabelSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkProgramEntryLabel</name>
<state></state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
</option>
<option>
<name>FillerByte</name>
<state>0xFF</state>
</option>
<option>
<name>FillerStart</name>
<state>0x0</state>
</option>
<option>
<name>FillerEnd</name>
<state>0x0</state>
</option>
<option>
<name>CrcSize</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CrcAlign</name>
<state>1</state>
</option>
<option>
<name>CrcAlgo</name>
<state>1</state>
</option>
<option>
<name>CrcPoly</name>
<state>0x11021</state>
</option>
<option>
<name>CrcCompl</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcBitOrder</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcInitialValue</name>
<state>0x0</state>
</option>
<option>
<name>DoCrc</name>
<state>0</state>
</option>
<option>
<name>IlinkBE8Slave</name>
<state>1</state>
</option>
<option>
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
<option>
<name>IlinkLogAutoLibSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkLogRedirSymbols</name>
<state>0</state>
</option>
<option>
<name>IlinkLogUnusedFragments</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcReverseByteOrder</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcUseAsInput</name>
<state>1</state>
</option>
<option>
<name>IlinkOptInline</name>
<state>1</state>
</option>
<option>
<name>IlinkOptExceptionsAllow</name>
<state>1</state>
</option>
<option>
<name>IlinkOptExceptionsForce</name>
<state>0</state>
</option>
<option>
<name>IlinkCmsis</name>
<state>1</state>
</option>
<option>
<name>IlinkOptMergeDuplSections</name>
<state>0</state>
</option>
<option>
<name>IlinkOptUseVfe</name>
<state>1</state>
</option>
<option>
<name>IlinkOptForceVfe</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>IARCHIVE</name>
<archiveVersion>0</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>IarchiveInputs</name>
<state></state>
</option>
<option>
<name>IarchiveOverride</name>
<state>0</state>
</option>
<option>
<name>IarchiveOutput</name>
<state>###Unitialized###</state>
</option>
</data>
</settings>
<settings>
<name>BILINK</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
</configuration>
<group>
<name>common</name>
<file>
<name>$PROJ_DIR$\..\..\common\cortex_handlers.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\common\UART.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\common\UART.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\common\USART.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\common\USART.h</name>
</file>
</group>
<file>
<name>$PROJ_DIR$\..\pins_arduino.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\variant.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\variant.h</name>
</file>
</project>

View File

@ -1,33 +1,12 @@
/*
%atmel_license%
*/
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
//#ifdef ARDUINO_MAIN
#define PIN_LED_BLUE (0u)
#define PIN_LED_GREEN (1u)
#define PIN_LED_RED (2u)
#define PIN_LED PIN_LED_BLUE
#define PIN_DAC0 (u)
static const uint8_t SS = 34 ;
static const uint8_t MOSI = 32 ;
static const uint8_t MISO = 31 ;
static const uint8_t SCK = 33 ;
#define PINS_UART (16u)
#if defined VARIANT_REV_A
# define PIN_TSC_IRQ_WUP_ID (1UL << 3)
#elif defined VARIANT_REV_B
# define PIN_TSC_IRQ_WUP_ID (1UL << 15)
#else
#error "No board revision defined"
#endif
#define BOARD_LCD_PINS PIN_EBI_DATA_BUS, PIN_EBI_NRD, PIN_EBI_NWE, PIN_EBI_NCS1, PIN_EBI_LCD_RS
#define BOARD_LCD_BASE 0x61000000 /** Define ILI9325 base address. */
#define BOARD_LCD_RS (1 << 1) /** Define ILI9325 register select signal. */
//#endif // ARDUINO_MAIN

View File

@ -1,9 +1,13 @@
#include "Arduino.h"
/*
%atmel_license%
*/
#include "variant.h"
/*
* Pins descriptions
*/
extern const PinDescription APinDescription[]=
extern const PinDescription g_APinDescription[]=
{
// LEDS, 0..2
#if defined VARIANT_REV_A
@ -112,16 +116,15 @@ extern const PinDescription APinDescription[]=
{ NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT } // END
} ;
#if 0
/*
* UART objects
*/
ring_buffer rx_buffer1 = { { 0 }, 0, 0 } ;
ring_buffer tx_buffer1 = { { 0 }, 0, 0 } ;
ring_buffer rx_buffer2 = { { 0 }, 0, 0 } ;
ring_buffer tx_buffer2 = { { 0 }, 0, 0 } ;
RingBuffer rx_buffer1 ;
RingBuffer tx_buffer1 ;
RingBuffer rx_buffer2 ;
RingBuffer tx_buffer2 ;
UARTClass Serial1( UART0, UART0_IRQn, ID_UART0, &rx_buffer1, &tx_buffer1 ) ;
UARTClass Serial( UART0, UART0_IRQn, ID_UART0, &rx_buffer1, &tx_buffer1 ) ;
UARTClass Serial2( UART1, UART1_IRQn, ID_UART1, &rx_buffer2, &tx_buffer2 ) ;
#ifdef __cplusplus
@ -131,7 +134,7 @@ extern "C" {
// IT handlers
extern void UART0_IrqHandler( void )
{
Serial1.IrqHandler() ;
Serial.IrqHandler() ;
}
extern void UART1_IrqHandler( void )
@ -142,18 +145,15 @@ extern void UART1_IrqHandler( void )
#ifdef __cplusplus
}
#endif
#endif // 0
// ----------------------------------------------------------------------------
#if 0
/*
* USART objects
*/
ring_buffer rx_buffer3 = { { 0 }, 0, 0 } ;
ring_buffer tx_buffer3 = { { 0 }, 0, 0 } ;
ring_buffer rx_buffer4 = { { 0 }, 0, 0 } ;
ring_buffer tx_buffer4 = { { 0 }, 0, 0 } ;
RingBuffer rx_buffer3 ;
RingBuffer tx_buffer3 ;
RingBuffer rx_buffer4 ;
RingBuffer tx_buffer4 ;
USARTClass Serial3( USART0, USART0_IRQn, ID_USART0, &rx_buffer3, &tx_buffer3 ) ;
USARTClass Serial4( USART1, USART1_IRQn, ID_USART1, &rx_buffer4, &tx_buffer4 ) ;
@ -177,6 +177,39 @@ extern void USART1_IrqHandler( void )
}
#endif
#endif // 0
// ----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
/**
*
*/
extern void init( void )
{
SystemInit() ;
/* Set Systick to 1ms interval, common to all SAM3 variants */
if ( SysTick_Config( SystemCoreClock / 1000 ) )
{
/* Capture error */
while ( 1 ) ;
}
/* Disable watchdog, common to all SAM variants */
WDT_Disable( WDT ) ;
// Initialize Serial port UART0, common to all SAM3 variants
PIO_Configure( g_APinDescription[PINS_UART].pPort, g_APinDescription[PINS_UART].ulPinType,
g_APinDescription[PINS_UART].ulPin, g_APinDescription[PINS_UART].ulPinAttribute ) ;
// Switch off Power LED
PIO_Configure( g_APinDescription[PIN_LED_RED].pPort, g_APinDescription[PIN_LED_RED].ulPinType,
g_APinDescription[PIN_LED_RED].ulPin, g_APinDescription[PIN_LED_RED].ulPinAttribute ) ;
PIO_Clear( g_APinDescription[PIN_LED_RED].pPort, g_APinDescription[PIN_LED_RED].ulPin ) ;
}
#ifdef __cplusplus
}
#endif

View File

@ -1,3 +1,7 @@
/*
%atmel_license%
*/
#ifndef _VARIANT_
#define _VARIANT_
@ -5,7 +9,9 @@
* Headers
*----------------------------------------------------------------------------*/
#include "libsam/chip.h"
#include "Arduino.h"
#include "common/UART.h"
#include "common/USART.h"
/**
* Libc porting layers
@ -27,10 +33,10 @@
/** Name of the board */
#define VARIANT_NAME "SAM3S-EK"
#define VARIANT_REV_A
/*
#define VARIANT_REV_B
#define VARIANT_REV_A
*/
#define VARIANT_REV_B
/** Frequency of the board main oscillator */
#define VARIANT_MAINOSC 12000000
@ -38,23 +44,49 @@
/** Master clock frequency */
#define VARIANT_MCK 64000000
/*----------------------------------------------------------------------------
* Pins
*----------------------------------------------------------------------------*/
#define PIN_LED_BLUE (0u)
#define PIN_LED_GREEN (1u)
#define PIN_LED_RED (2u)
#define PIN_LED PIN_LED_BLUE
#define PIN_DAC0 (u)
static const uint8_t SS = 34 ;
static const uint8_t MOSI = 32 ;
static const uint8_t MISO = 31 ;
static const uint8_t SCK = 33 ;
#define PINS_UART (16u)
#if defined VARIANT_REV_A
# define PIN_TSC_IRQ_WUP_ID (1UL << 3)
#elif defined VARIANT_REV_B
# define PIN_TSC_IRQ_WUP_ID (1UL << 15)
#else
#error "No board revision defined"
#endif
#define BOARD_LCD_PINS PIN_EBI_DATA_BUS, PIN_EBI_NRD, PIN_EBI_NWE, PIN_EBI_NCS1, PIN_EBI_LCD_RS
#define BOARD_LCD_BASE 0x61000000 /** Define ILI9325 base address. */
#define BOARD_LCD_RS (1 << 1) /** Define ILI9325 register select signal. */
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
# ifdef __cplusplus
#if 0
# include "UART.h"
# include "USART.h"
#ifdef __cplusplus
extern UARTClass Serial1 ;
extern UARTClass Serial ;
extern UARTClass Serial2 ;
#endif // 0
//extern USARTClass Serial3 ;
//extern USARTClass Serial4 ;
extern USARTClass Serial3 ;
extern USARTClass Serial4 ;
# endif
#endif
#endif /* #ifndef _VARIANT_ */
#endif /* _VARIANT_ */