mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
[sam] fixing last stupid commit
This commit is contained in:
@ -79,32 +79,12 @@ typedef unsigned int word;
|
||||
typedef uint8_t boolean ;
|
||||
typedef uint8_t byte ;
|
||||
|
||||
#include "wiring.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "wiring_analog.h"
|
||||
#include "wiring_shift.h"
|
||||
|
||||
// wiring_digital.c
|
||||
extern void pinMode( uint32_t dwPin, uint32_t dwMode ) ;
|
||||
extern void digitalWrite( uint32_t dwPin, uint32_t dwVal ) ;
|
||||
extern int digitalRead( uint32_t dwPin ) ;
|
||||
|
||||
// wiring_analog.c
|
||||
extern int analogRead( uint8_t ) ;
|
||||
extern void analogReference( uint8_t mode ) ;
|
||||
extern void analogWrite( uint8_t, int ) ;
|
||||
|
||||
// wiring.c
|
||||
extern void init( void ) ;
|
||||
extern uint32_t millis( void ) ;
|
||||
extern uint32_t micros( void ) ;
|
||||
extern void delay( uint32_t dwMs ) ;
|
||||
extern void delayMicroseconds( uint32_t dwUs ) ;
|
||||
|
||||
// wiring_shift.c
|
||||
extern void shiftOut( uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val ) ;
|
||||
extern uint8_t shiftIn( uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder ) ;
|
||||
|
||||
extern void attachInterrupt( uint8_t, void (*)(void), int mode ) ;
|
||||
extern void detachInterrupt( uint8_t ) ;
|
||||
|
||||
// sketch
|
||||
/* sketch */
|
||||
extern void setup( void ) ;
|
||||
extern void loop( void ) ;
|
||||
|
||||
@ -127,31 +107,24 @@ extern void loop( void ) ;
|
||||
#define NOT_ON_TIMER 0
|
||||
#define TIMER0 1
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include "WCharacter.h"
|
||||
# include "WString.h"
|
||||
# include "HardwareSerial.h"
|
||||
#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__)
|
||||
|
||||
extern uint32_t pulseIn( uint32_t pin, uint32_t state, uint32_t timeout = 1000000L ) ;
|
||||
|
||||
extern void tone( uint32_t dwPin, uint32_t dwFrequency, uint32_t dwDuration = 0 ) ;
|
||||
extern void noTone( uint32_t dwPin ) ;
|
||||
|
||||
// WMath prototypes
|
||||
extern long random( long ) ;
|
||||
extern long random( long, long ) ;
|
||||
extern void randomSeed( uint32_t dwSeed ) ;
|
||||
extern long map( long, long, long, long, long ) ;
|
||||
#include "Tone.h"
|
||||
#include "WMath.h"
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
|
@ -32,7 +32,9 @@ class HardwareSerial : public Stream
|
||||
virtual void flush( void ) =0 ;
|
||||
virtual void write( const uint8_t c ) =0 ;
|
||||
|
||||
using Print::write ; // pull in write(str) and write(buf, size) from Print
|
||||
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
|
||||
} ;
|
||||
|
||||
// Complementary API
|
||||
|
@ -26,7 +26,9 @@ class UARTClass : public HardwareSerial
|
||||
|
||||
void IrqHandler( void ) ;
|
||||
|
||||
using Print::write ; // pull in write(str) and write(buf, size) from Print
|
||||
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 // _UART_
|
||||
|
@ -26,7 +26,9 @@ class USARTClass : public HardwareSerial
|
||||
|
||||
void IrqHandler( void ) ;
|
||||
|
||||
using Print::write ; // pull in write(str) and write(buf, size) from Print
|
||||
void write( const char *str ) ;
|
||||
void write( const uint8_t *buffer, size_t size ) ;
|
||||
// using Print::write ; // pull in write(str) and write(buf, size) from Print
|
||||
};
|
||||
|
||||
#endif // _USART_
|
||||
|
@ -22,7 +22,12 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// WCharacter.h prototypes
|
||||
#if defined ( __GNUC__ )
|
||||
inline boolean isAlphaNumeric(int c) __attribute__((always_inline));
|
||||
inline boolean isAlpha(int c) __attribute__((always_inline));
|
||||
inline boolean isAscii(int c) __attribute__((always_inline));
|
||||
@ -39,7 +44,8 @@ inline boolean isHexadecimalDigit(int c) __attribute__((always_inline));
|
||||
inline int toAscii(int c) __attribute__((always_inline));
|
||||
inline int toLowerCase(int c) __attribute__((always_inline));
|
||||
inline int toUpperCase(int c)__attribute__((always_inline));
|
||||
|
||||
#elif defined ( __ICCARM__ )
|
||||
#endif
|
||||
|
||||
// Checks for an alphanumeric character.
|
||||
// It is equivalent to (isalpha(c) || isdigit(c)).
|
||||
@ -61,7 +67,8 @@ inline boolean isAlpha(int c)
|
||||
// that fits into the ASCII character set.
|
||||
inline boolean isAscii(int c)
|
||||
{
|
||||
return ( isascii (c) == 0 ? false : true);
|
||||
/* return ( isascii(c) == 0 ? false : true); */
|
||||
return ( (c & ~0x7f) != 0 ? false : true);
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +150,8 @@ inline boolean isHexadecimalDigit(int c)
|
||||
// ASCII character set, by clearing the high-order bits.
|
||||
inline int toAscii(int c)
|
||||
{
|
||||
return toascii (c);
|
||||
/* return toascii (c); */
|
||||
return (c & 0x7f);
|
||||
}
|
||||
|
||||
|
||||
@ -165,4 +173,8 @@ inline int toUpperCase(int c)
|
||||
return toupper (c);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -3,19 +3,4 @@
|
||||
|
||||
#include "wiring_private.h"
|
||||
|
||||
volatile static voidFuncPtr intFunc[EXTERNAL_NUM_INTERRUPTS];
|
||||
|
||||
void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) {
|
||||
if(interruptNum < EXTERNAL_NUM_INTERRUPTS)
|
||||
{
|
||||
intFunc[interruptNum] = userFunc;
|
||||
}
|
||||
}
|
||||
|
||||
void detachInterrupt( uint8_t interruptNum )
|
||||
{
|
||||
if(interruptNum < EXTERNAL_NUM_INTERRUPTS)
|
||||
{
|
||||
intFunc[interruptNum] = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1,171 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* ATMEL Microcontroller Software Support
|
||||
* ----------------------------------------------------------------------------
|
||||
* Copyright (c) 2010, Atmel Corporation
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the disclaimer below.
|
||||
*
|
||||
* Atmel's name may not be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* DISCLAIMER: 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
|
||||
* 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.
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Exported variables
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/* Stack Configuration */
|
||||
#define STACK_SIZE 0x900 /** Stack size (in DWords) */
|
||||
__attribute__ ((aligned(8),section(".stack")))
|
||||
uint32_t pdwStack[STACK_SIZE] ;
|
||||
|
||||
/* Initialize segments */
|
||||
extern uint32_t _sfixed;
|
||||
extern uint32_t _efixed;
|
||||
extern uint32_t _etext;
|
||||
extern uint32_t _srelocate;
|
||||
extern uint32_t _erelocate;
|
||||
extern uint32_t _szero;
|
||||
extern uint32_t _ezero;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Prototypes
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/** \cond DOXYGEN_SHOULD_SKIP_THIS */
|
||||
extern int main( void ) ;
|
||||
/** \endcond */
|
||||
void Reset_Handler( void ) ;
|
||||
extern void __libc_init_array( void ) ;
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Exception Table
|
||||
*------------------------------------------------------------------------------*/
|
||||
|
||||
void* vector_table[] __attribute__ ((section(".vectors"))) = {
|
||||
/* Configure Initial Stack Pointer, using linker-generated symbols */
|
||||
(IntFunc)(&pdwStack[STACK_SIZE-1]),
|
||||
Reset_Handler,
|
||||
|
||||
NMI_Handler,
|
||||
HardFault_Handler,
|
||||
MemManage_Handler,
|
||||
BusFault_Handler,
|
||||
UsageFault_Handler,
|
||||
0, 0, 0, 0, /* Reserved */
|
||||
SVC_Handler,
|
||||
DebugMon_Handler,
|
||||
0, /* Reserved */
|
||||
PendSV_Handler,
|
||||
SysTick_Handler,
|
||||
|
||||
/* Configurable interrupts */
|
||||
SUPC_IrqHandler, /* 0 Supply Controller */
|
||||
RSTC_IrqHandler, /* 1 Reset Controller */
|
||||
RTC_IrqHandler, /* 2 Real Time Clock */
|
||||
RTT_IrqHandler, /* 3 Real Time Timer */
|
||||
WDT_IrqHandler, /* 4 Watchdog Timer */
|
||||
PMC_IrqHandler, /* 5 PMC */
|
||||
EEFC_IrqHandler, /* 6 EEFC */
|
||||
Dummy_Handler, /* 7 Reserved */
|
||||
UART0_IrqHandler, /* 8 UART0 */
|
||||
UART1_IrqHandler, /* 9 UART1 */
|
||||
SMC_IrqHandler, /* 10 SMC */
|
||||
PIOA_IrqHandler, /* 11 Parallel IO Controller A */
|
||||
PIOB_IrqHandler, /* 12 Parallel IO Controller B */
|
||||
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 */
|
||||
MCI_IrqHandler, /* 18 MCI */
|
||||
TWI0_IrqHandler, /* 19 TWI 0 */
|
||||
TWI1_IrqHandler, /* 20 TWI 1 */
|
||||
SPI_IrqHandler, /* 21 SPI */
|
||||
SSC_IrqHandler, /* 22 SSC */
|
||||
TC0_IrqHandler, /* 23 Timer Counter 0 */
|
||||
TC1_IrqHandler, /* 24 Timer Counter 1 */
|
||||
TC2_IrqHandler, /* 25 Timer Counter 2 */
|
||||
TC3_IrqHandler, /* 26 Timer Counter 3 */
|
||||
TC4_IrqHandler, /* 27 Timer Counter 4 */
|
||||
TC5_IrqHandler, /* 28 Timer Counter 5 */
|
||||
ADC_IrqHandler, /* 29 ADC controller */
|
||||
DAC_IrqHandler, /* 30 DAC controller */
|
||||
PWM_IrqHandler, /* 31 PWM */
|
||||
CRCCU_IrqHandler, /* 32 CRC Calculation Unit */
|
||||
ACC_IrqHandler, /* 33 Analog Comparator */
|
||||
USBD_IrqHandler, /* 34 USB Device Port */
|
||||
Dummy_Handler /* 35 not used */
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief This is the code that gets called on processor reset.
|
||||
* To initialize the device, and call the main() routine.
|
||||
*/
|
||||
void Reset_Handler( void )
|
||||
{
|
||||
uint32_t *pSrc, *pDest ;
|
||||
|
||||
/* Arduino board Low level Initialization */
|
||||
init() ;
|
||||
|
||||
/* Initialize the relocate segment */
|
||||
pSrc = &_etext ;
|
||||
pDest = &_srelocate ;
|
||||
|
||||
if ( pSrc != pDest )
|
||||
{
|
||||
for ( ; pDest < &_erelocate ; )
|
||||
{
|
||||
*pDest++ = *pSrc++ ;
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear the zero segment */
|
||||
for ( pDest = &_szero ; pDest < &_ezero ; )
|
||||
{
|
||||
*pDest++ = 0;
|
||||
}
|
||||
|
||||
/* Set the vector table base address */
|
||||
pSrc = (uint32_t *)&_sfixed;
|
||||
SCB->VTOR = ( (uint32_t)pSrc & SCB_VTOR_TBLOFF_Msk ) ;
|
||||
|
||||
if ( ((uint32_t)pSrc >= IRAM_ADDR) && ((uint32_t)pSrc < IRAM_ADDR+IRAM_SIZE) )
|
||||
{
|
||||
SCB->VTOR |= 1 << SCB_VTOR_TBLBASE_Pos ;
|
||||
}
|
||||
|
||||
/* Initialize the C library */
|
||||
__libc_init_array() ;
|
||||
|
||||
/* Branch to main function */
|
||||
main() ;
|
||||
|
||||
/* Infinite loop */
|
||||
while ( 1 ) ;
|
||||
}
|
@ -1,148 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* ATMEL Microcontroller Software Support
|
||||
* ----------------------------------------------------------------------------
|
||||
* Copyright (c) 2010, Atmel Corporation
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the disclaimer below.
|
||||
*
|
||||
* Atmel's name may not be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* DISCLAIMER: 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
|
||||
* 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.
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Exported variables
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Definitions
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Types
|
||||
*------------------------------------------------------------------------------*/
|
||||
typedef union { IntFunc __fun; void * __ptr; } IntVector;
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* ProtoTypes
|
||||
*------------------------------------------------------------------------------*/
|
||||
extern void __iar_program_start( void ) ;
|
||||
|
||||
extern int __low_level_init( void ) ;
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Exception Table
|
||||
*------------------------------------------------------------------------------*/
|
||||
#pragma language=extended
|
||||
#pragma segment="CSTACK"
|
||||
|
||||
/* The name "__vector_table" has special meaning for C-SPY: */
|
||||
/* it is where the SP start value is found, and the NVIC vector */
|
||||
/* table register (VTOR) is initialized to this address if != 0. */
|
||||
|
||||
#pragma section = ".vectors"
|
||||
#pragma location = ".vectors"
|
||||
const IntVector __vector_table[] =
|
||||
{
|
||||
{ .__ptr = __sfe( "CSTACK" ) },
|
||||
__iar_program_start,
|
||||
|
||||
NMI_Handler,
|
||||
HardFault_Handler,
|
||||
MemManage_Handler,
|
||||
BusFault_Handler,
|
||||
UsageFault_Handler,
|
||||
0, 0, 0, 0, /* Reserved */
|
||||
SVC_Handler,
|
||||
DebugMon_Handler,
|
||||
0, /* Reserved */
|
||||
PendSV_Handler,
|
||||
SysTick_Handler,
|
||||
|
||||
#if defined sam3s4c
|
||||
/* Configurable interrupts */
|
||||
SUPC_IrqHandler, /* 0 Supply Controller */
|
||||
RSTC_IrqHandler, /* 1 Reset Controller */
|
||||
RTC_IrqHandler, /* 2 Real Time Clock */
|
||||
RTT_IrqHandler, /* 3 Real Time Timer */
|
||||
WDT_IrqHandler, /* 4 Watchdog Timer */
|
||||
PMC_IrqHandler, /* 5 PMC */
|
||||
EEFC_IrqHandler, /* 6 EEFC */
|
||||
Dummy_Handler, /* 7 Reserved */
|
||||
UART0_IrqHandler, /* 8 UART0 */
|
||||
UART1_IrqHandler, /* 9 UART1 */
|
||||
SMC_IrqHandler, /* 10 SMC */
|
||||
PIOA_IrqHandler, /* 11 Parallel IO Controller A */
|
||||
PIOB_IrqHandler, /* 12 Parallel IO Controller B */
|
||||
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 */
|
||||
MCI_IrqHandler, /* 18 MCI */
|
||||
TWI0_IrqHandler, /* 19 TWI 0 */
|
||||
TWI1_IrqHandler, /* 20 TWI 1 */
|
||||
SPI_IrqHandler, /* 21 SPI */
|
||||
SSC_IrqHandler, /* 22 SSC */
|
||||
TC0_IrqHandler, /* 23 Timer Counter 0 */
|
||||
TC1_IrqHandler, /* 24 Timer Counter 1 */
|
||||
TC2_IrqHandler, /* 25 Timer Counter 2 */
|
||||
TC3_IrqHandler, /* 26 Timer Counter 3 */
|
||||
TC4_IrqHandler, /* 27 Timer Counter 4 */
|
||||
TC5_IrqHandler, /* 28 Timer Counter 5 */
|
||||
ADC_IrqHandler, /* 29 ADC controller */
|
||||
DAC_IrqHandler, /* 30 DAC controller */
|
||||
PWM_IrqHandler, /* 31 PWM */
|
||||
CRCCU_IrqHandler, /* 32 CRC Calculation Unit */
|
||||
ACC_IrqHandler, /* 33 Analog Comparator */
|
||||
USBD_IrqHandler, /* 34 USB Device Port */
|
||||
Dummy_Handler /* 35 not used */
|
||||
#endif /* defined sam3s4c */
|
||||
|
||||
#if defined sam3u4e
|
||||
#endif /* defined sam3u4e */
|
||||
};
|
||||
|
||||
/**------------------------------------------------------------------------------
|
||||
* This is the code that gets called on processor reset. To initialize the
|
||||
* device.
|
||||
*------------------------------------------------------------------------------*/
|
||||
extern int __low_level_init( void )
|
||||
{
|
||||
uint32_t* pSrc = (uint32_t*)__section_begin( ".vectors" ) ;
|
||||
|
||||
/* Low level Initialize */
|
||||
LowLevelInit() ;
|
||||
|
||||
SCB->VTOR = ( (uint32_t)pSrc & SCB_VTOR_TBLOFF_Msk ) ;
|
||||
|
||||
if ( ((uint32_t)pSrc >= IRAM0_ADDR) && ((uint32_t)pSrc < NFC_RAM_ADDR) )
|
||||
{
|
||||
SCB->VTOR |= 1 << SCB_VTOR_TBLBASE_Pos ;
|
||||
}
|
||||
|
||||
return 1 ; /* if return 0, the data sections will not be initialized. */
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# Makefile for compiling libArduino
|
||||
.SUFFIXES: .o .a .c .s
|
||||
|
||||
CHIP=sam3s4
|
||||
CHIP=__SAM3S4C__
|
||||
VARIANT=sam3s_ek
|
||||
LIBNAME=libarduino_$(VARIANT)
|
||||
TOOLCHAIN=gcc
|
||||
@ -16,7 +16,7 @@ OUTPUT_BIN = ../lib
|
||||
# Libraries
|
||||
PROJECT_BASE_PATH = ..
|
||||
SYSTEM_PATH = ../../../system
|
||||
CMSIS_PATH = $(SYSTEM_PATH)/CMSIS/CM3/CoreSupport
|
||||
CMSIS_PATH = $(SYSTEM_PATH)/CMSIS/Include
|
||||
VARIANT_PATH = ../../../variants/sam3s-ek
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -103,7 +103,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>GenLowLevelInterface</name>
|
||||
<state>1</state>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GEndianModeBE</name>
|
||||
@ -164,7 +164,7 @@
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCDefines</name>
|
||||
<state>__sam3s4c__</state>
|
||||
<state>__SAM3S4C__</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPreprocFile</name>
|
||||
@ -2718,6 +2718,9 @@
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\syscalls.h</name>
|
||||
<excluded>
|
||||
<configuration>Debug</configuration>
|
||||
</excluded>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\syscalls_sam3.c</name>
|
||||
@ -2733,12 +2736,18 @@
|
||||
</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>
|
||||
@ -2748,19 +2757,31 @@
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\WInterrupts.c</name>
|
||||
<excluded>
|
||||
<configuration>Debug</configuration>
|
||||
</excluded>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_analog.c</name>
|
||||
<excluded>
|
||||
<configuration>Debug</configuration>
|
||||
</excluded>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_analog.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_digital.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_digital.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_private.h</name>
|
||||
</file>
|
||||
@ -2770,12 +2791,21 @@
|
||||
<configuration>Debug</configuration>
|
||||
</excluded>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_pulse.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_shift.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\wiring_shift.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\WMath.cpp</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\WMath.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\WString.cpp</name>
|
||||
</file>
|
||||
|
Binary file not shown.
@ -1,385 +0,0 @@
|
||||
|
||||
WInterrupts.o:
|
||||
00000004 r APinDescription
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
00000000 T attachInterrupt
|
||||
00000000 T detachInterrupt
|
||||
00000000 b intFunc
|
||||
|
||||
board_cstartup_gnu_sam3.o:
|
||||
U ACC_IrqHandler
|
||||
U ADC_IrqHandler
|
||||
00000004 r APinDescription
|
||||
U BusFault_Handler
|
||||
U CRCCU_IrqHandler
|
||||
U DAC_IrqHandler
|
||||
U DebugMon_Handler
|
||||
U Dummy_Handler
|
||||
U EEFC_IrqHandler
|
||||
U HardFault_Handler
|
||||
U MCI_IrqHandler
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
U MemManage_Handler
|
||||
U NMI_Handler
|
||||
U PIOA_IrqHandler
|
||||
U PIOB_IrqHandler
|
||||
U PIOC_IrqHandler
|
||||
U PMC_IrqHandler
|
||||
U PWM_IrqHandler
|
||||
U PendSV_Handler
|
||||
U RSTC_IrqHandler
|
||||
U RTC_IrqHandler
|
||||
U RTT_IrqHandler
|
||||
00000000 T Reset_Handler
|
||||
00000003 r SCK
|
||||
U SMC_IrqHandler
|
||||
U SPI_IrqHandler
|
||||
00000000 r SS
|
||||
U SSC_IrqHandler
|
||||
U SUPC_IrqHandler
|
||||
U SVC_Handler
|
||||
U SysTick_Handler
|
||||
U TC0_IrqHandler
|
||||
U TC1_IrqHandler
|
||||
U TC2_IrqHandler
|
||||
U TC3_IrqHandler
|
||||
U TC4_IrqHandler
|
||||
U TC5_IrqHandler
|
||||
U TWI0_IrqHandler
|
||||
U TWI1_IrqHandler
|
||||
U UART0_IrqHandler
|
||||
U UART1_IrqHandler
|
||||
U USART0_IrqHandler
|
||||
U USART1_IrqHandler
|
||||
U USBD_IrqHandler
|
||||
U UsageFault_Handler
|
||||
U WDT_IrqHandler
|
||||
U __libc_init_array
|
||||
U _erelocate
|
||||
U _etext
|
||||
U _ezero
|
||||
U _sfixed
|
||||
U _srelocate
|
||||
U _szero
|
||||
U init
|
||||
U main
|
||||
00000000 D pdwStack
|
||||
00000000 D vector_table
|
||||
|
||||
itoa.o:
|
||||
00000000 T itoa
|
||||
00000000 t reverse
|
||||
U strlen
|
||||
|
||||
syscalls_sam3.o:
|
||||
00000000 T _close
|
||||
U _end
|
||||
00000000 T _exit
|
||||
00000000 T _fstat
|
||||
00000000 T _getpid
|
||||
00000000 T _isatty
|
||||
00000000 T _kill
|
||||
00000000 T _lseek
|
||||
00000000 T _read
|
||||
00000000 T _sbrk
|
||||
00000000 T _write
|
||||
00000000 b heap.6819
|
||||
U iprintf
|
||||
00000000 T link
|
||||
|
||||
wiring.o:
|
||||
00000004 r APinDescription
|
||||
U GetTickCount
|
||||
00000000 t LowLevelInit_sam3s_ek
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
00000000 t NVIC_SetPriority
|
||||
U PIO_Configure
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
00000000 t SysTick_Config
|
||||
00000000 T SysTick_Handler
|
||||
U TimeTick_Increment
|
||||
U WDT_Disable
|
||||
00000000 T Wait
|
||||
00000000 T delayMicroseconds
|
||||
00000000 T init
|
||||
00000000 T micros
|
||||
00000000 T millis
|
||||
00000008 b timer0_fract
|
||||
00000004 B timer0_millis
|
||||
00000000 B timer0_overflow_count
|
||||
|
||||
wiring_digital.o:
|
||||
00000004 r APinDescription
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
U PIO_Configure
|
||||
U PIO_Get
|
||||
U PIO_SetOutput
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
00000000 T digitalRead
|
||||
00000000 T digitalWrite
|
||||
00000000 T pinMode
|
||||
|
||||
wiring_shift.o:
|
||||
00000004 r APinDescription
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
U digitalRead
|
||||
U digitalWrite
|
||||
00000000 T shiftIn
|
||||
00000000 T shiftOut
|
||||
|
||||
HardwareSerial.o:
|
||||
00000000 T _Z10store_charhP12_ring_buffer
|
||||
|
||||
Print.o:
|
||||
00000030 r _ZL15APinDescription
|
||||
0000002b r _ZL2SS
|
||||
0000002e r _ZL3SCK
|
||||
0000002d r _ZL4MISO
|
||||
0000002c r _ZL4MOSI
|
||||
00000000 T _ZN5Print10printFloatEdh
|
||||
00000000 T _ZN5Print11printNumberEmh
|
||||
00000000 T _ZN5Print5printEPKc
|
||||
00000000 T _ZN5Print5printERK6String
|
||||
00000000 T _ZN5Print5printEc
|
||||
00000000 T _ZN5Print5printEdi
|
||||
00000000 T _ZN5Print5printEhi
|
||||
00000000 T _ZN5Print5printEii
|
||||
00000000 T _ZN5Print5printEji
|
||||
00000000 T _ZN5Print5printEli
|
||||
00000000 T _ZN5Print5printEmi
|
||||
00000000 T _ZN5Print5writeEPKc
|
||||
00000000 T _ZN5Print5writeEPKhj
|
||||
00000000 T _ZN5Print7printlnEPKc
|
||||
00000000 T _ZN5Print7printlnERK6String
|
||||
00000000 T _ZN5Print7printlnEc
|
||||
00000000 T _ZN5Print7printlnEdi
|
||||
00000000 T _ZN5Print7printlnEhi
|
||||
00000000 T _ZN5Print7printlnEii
|
||||
00000000 T _ZN5Print7printlnEji
|
||||
00000000 T _ZN5Print7printlnEli
|
||||
00000000 T _ZN5Print7printlnEmi
|
||||
00000000 T _ZN5Print7printlnEv
|
||||
00000000 W _ZNK6String6lengthEv
|
||||
U _ZNK6StringixEj
|
||||
0000001c R _ZTI5Print
|
||||
00000024 R _ZTS5Print
|
||||
00000008 R _ZTV5Print
|
||||
U _ZTVN10__cxxabiv117__class_type_infoE
|
||||
U __aeabi_d2iz
|
||||
U __aeabi_d2uiz
|
||||
U __aeabi_dadd
|
||||
U __aeabi_dcmplt
|
||||
U __aeabi_ddiv
|
||||
U __aeabi_dmul
|
||||
U __aeabi_dsub
|
||||
U __aeabi_i2d
|
||||
U __aeabi_ui2d
|
||||
U __aeabi_unwind_cpp_pr1
|
||||
U __cxa_pure_virtual
|
||||
|
||||
UART.o:
|
||||
U PMC_DisablePeripheral
|
||||
U PMC_EnablePeripheral
|
||||
U _Z10store_charhP12_ring_buffer
|
||||
00000048 r _ZL15APinDescription
|
||||
00000043 r _ZL2SS
|
||||
00000046 r _ZL3SCK
|
||||
00000045 r _ZL4MISO
|
||||
00000044 r _ZL4MOSI
|
||||
00000000 W _ZN14HardwareSerialC1Ev
|
||||
00000000 W _ZN14HardwareSerialC2Ev
|
||||
00000000 n _ZN14HardwareSerialC5Ev
|
||||
U _ZN5Print5writeEPKc
|
||||
U _ZN5Print5writeEPKhj
|
||||
00000000 W _ZN5PrintC1Ev
|
||||
00000000 W _ZN5PrintC2Ev
|
||||
00000000 n _ZN5PrintC5Ev
|
||||
00000000 W _ZN6StreamC1Ev
|
||||
00000000 W _ZN6StreamC2Ev
|
||||
00000000 n _ZN6StreamC5Ev
|
||||
00000000 T _ZN9UARTClass10IrqHandlerEv
|
||||
00000000 T _ZN9UARTClass3endEv
|
||||
00000000 T _ZN9UARTClass4peekEv
|
||||
00000000 T _ZN9UARTClass4readEv
|
||||
00000000 T _ZN9UARTClass5beginEm
|
||||
00000000 T _ZN9UARTClass5flushEv
|
||||
00000000 T _ZN9UARTClass5writeEh
|
||||
00000000 T _ZN9UARTClass9availableEv
|
||||
00000000 T _ZN9UARTClassC1EP4Uart4IRQnmP12_ring_bufferS4_
|
||||
00000000 T _ZN9UARTClassC2EP4Uart4IRQnmP12_ring_bufferS4_
|
||||
00000000 V _ZTI14HardwareSerial
|
||||
U _ZTI5Print
|
||||
00000000 V _ZTI6Stream
|
||||
0000002c R _ZTI9UARTClass
|
||||
00000000 V _ZTS14HardwareSerial
|
||||
00000000 V _ZTS6Stream
|
||||
00000038 R _ZTS9UARTClass
|
||||
00000000 V _ZTV14HardwareSerial
|
||||
U _ZTV5Print
|
||||
00000000 V _ZTV6Stream
|
||||
00000000 R _ZTV9UARTClass
|
||||
U _ZTVN10__cxxabiv120__si_class_type_infoE
|
||||
U __aeabi_unwind_cpp_pr1
|
||||
U __cxa_pure_virtual
|
||||
|
||||
USART.o:
|
||||
U PMC_DisablePeripheral
|
||||
U PMC_EnablePeripheral
|
||||
U _Z10store_charhP12_ring_buffer
|
||||
0000004c r _ZL15APinDescription
|
||||
00000045 r _ZL2SS
|
||||
00000048 r _ZL3SCK
|
||||
00000047 r _ZL4MISO
|
||||
00000046 r _ZL4MOSI
|
||||
00000000 T _ZN10USARTClass10IrqHandlerEv
|
||||
00000000 T _ZN10USARTClass3endEv
|
||||
00000000 T _ZN10USARTClass4peekEv
|
||||
00000000 T _ZN10USARTClass4readEv
|
||||
00000000 T _ZN10USARTClass5beginEm
|
||||
00000000 T _ZN10USARTClass5flushEv
|
||||
00000000 T _ZN10USARTClass5writeEh
|
||||
00000000 T _ZN10USARTClass9availableEv
|
||||
00000000 T _ZN10USARTClassC1EP5Usart4IRQnmP12_ring_bufferS4_
|
||||
00000000 T _ZN10USARTClassC2EP5Usart4IRQnmP12_ring_bufferS4_
|
||||
00000000 W _ZN14HardwareSerialC1Ev
|
||||
00000000 W _ZN14HardwareSerialC2Ev
|
||||
00000000 n _ZN14HardwareSerialC5Ev
|
||||
U _ZN5Print5writeEPKc
|
||||
U _ZN5Print5writeEPKhj
|
||||
00000000 W _ZN5PrintC1Ev
|
||||
00000000 W _ZN5PrintC2Ev
|
||||
00000000 n _ZN5PrintC5Ev
|
||||
00000000 W _ZN6StreamC1Ev
|
||||
00000000 W _ZN6StreamC2Ev
|
||||
00000000 n _ZN6StreamC5Ev
|
||||
0000002c R _ZTI10USARTClass
|
||||
00000000 V _ZTI14HardwareSerial
|
||||
U _ZTI5Print
|
||||
00000000 V _ZTI6Stream
|
||||
00000038 R _ZTS10USARTClass
|
||||
00000000 V _ZTS14HardwareSerial
|
||||
00000000 V _ZTS6Stream
|
||||
00000000 R _ZTV10USARTClass
|
||||
00000000 V _ZTV14HardwareSerial
|
||||
U _ZTV5Print
|
||||
00000000 V _ZTV6Stream
|
||||
U _ZTVN10__cxxabiv120__si_class_type_infoE
|
||||
U __aeabi_unwind_cpp_pr1
|
||||
U __cxa_pure_virtual
|
||||
|
||||
WString.o:
|
||||
00000000 T _ZN6String10invalidateEv
|
||||
00000000 T _ZN6String11toLowerCaseEv
|
||||
00000000 T _ZN6String11toUpperCaseEv
|
||||
00000000 T _ZN6String12changeBufferEj
|
||||
00000000 T _ZN6String4copyEPKcj
|
||||
00000000 W _ZN6String4initEv
|
||||
00000000 T _ZN6String4trimEv
|
||||
00000000 T _ZN6String6concatEPKc
|
||||
00000000 T _ZN6String6concatEPKcj
|
||||
00000000 T _ZN6String6concatERKS_
|
||||
00000000 T _ZN6String6concatEc
|
||||
00000000 T _ZN6String6concatEh
|
||||
00000000 T _ZN6String6concatEi
|
||||
00000000 T _ZN6String6concatEj
|
||||
00000000 T _ZN6String6concatEl
|
||||
00000000 T _ZN6String6concatEm
|
||||
00000000 T _ZN6String7replaceERKS_S1_
|
||||
00000000 T _ZN6String7replaceEcc
|
||||
00000000 T _ZN6String7reserveEj
|
||||
00000000 T _ZN6String9setCharAtEjc
|
||||
00000000 T _ZN6StringC1EPKc
|
||||
00000000 T _ZN6StringC1ERKS_
|
||||
00000000 T _ZN6StringC1Ec
|
||||
00000000 T _ZN6StringC1Ehh
|
||||
00000000 T _ZN6StringC1Eih
|
||||
00000000 T _ZN6StringC1Ejh
|
||||
00000000 T _ZN6StringC1Elh
|
||||
00000000 T _ZN6StringC1Emh
|
||||
00000000 T _ZN6StringC2EPKc
|
||||
00000000 T _ZN6StringC2ERKS_
|
||||
00000000 T _ZN6StringC2Ec
|
||||
00000000 T _ZN6StringC2Ehh
|
||||
00000000 T _ZN6StringC2Eih
|
||||
00000000 T _ZN6StringC2Ejh
|
||||
00000000 T _ZN6StringC2Elh
|
||||
00000000 T _ZN6StringC2Emh
|
||||
00000000 T _ZN6StringD1Ev
|
||||
00000000 T _ZN6StringD2Ev
|
||||
00000000 T _ZN6StringaSEPKc
|
||||
00000000 T _ZN6StringaSERKS_
|
||||
00000000 T _ZN6StringixEj
|
||||
00000000 T _ZNK6String10startsWithERKS_
|
||||
00000000 T _ZNK6String10startsWithERKS_j
|
||||
00000000 T _ZNK6String11lastIndexOfERKS_
|
||||
00000000 T _ZNK6String11lastIndexOfERKS_i
|
||||
00000000 T _ZNK6String11lastIndexOfEc
|
||||
00000000 T _ZNK6String11lastIndexOfEci
|
||||
00000000 T _ZNK6String16equalsIgnoreCaseERKS_
|
||||
00000000 T _ZNK6String5toIntEv
|
||||
00000000 T _ZNK6String6charAtEj
|
||||
00000000 T _ZNK6String6equalsEPKc
|
||||
00000000 T _ZNK6String6equalsERKS_
|
||||
00000000 T _ZNK6String7indexOfERKS_
|
||||
00000000 T _ZNK6String7indexOfERKS_j
|
||||
00000000 T _ZNK6String7indexOfEc
|
||||
00000000 T _ZNK6String7indexOfEcj
|
||||
00000000 T _ZNK6String8endsWithERKS_
|
||||
00000000 T _ZNK6String8getBytesEPhjj
|
||||
00000000 T _ZNK6String9compareToERKS_
|
||||
00000000 T _ZNK6String9substringEj
|
||||
00000000 T _ZNK6String9substringEjj
|
||||
00000000 T _ZNK6StringgeERKS_
|
||||
00000000 T _ZNK6StringgtERKS_
|
||||
00000000 T _ZNK6StringixEj
|
||||
00000000 T _ZNK6StringleERKS_
|
||||
00000000 T _ZNK6StringltERKS_
|
||||
00000000 b _ZZN6StringixEjE19dummy_writable_char
|
||||
00000000 T _ZplRK15StringSumHelperPKc
|
||||
00000000 T _ZplRK15StringSumHelperRK6String
|
||||
00000000 T _ZplRK15StringSumHelperc
|
||||
00000000 T _ZplRK15StringSumHelperh
|
||||
00000000 T _ZplRK15StringSumHelperi
|
||||
00000000 T _ZplRK15StringSumHelperj
|
||||
00000000 T _ZplRK15StringSumHelperl
|
||||
00000000 T _ZplRK15StringSumHelperm
|
||||
U __aeabi_unwind_cpp_pr1
|
||||
U atol
|
||||
U free
|
||||
U isspace
|
||||
U memcpy
|
||||
U memmove
|
||||
U realloc
|
||||
U strchr
|
||||
U strcmp
|
||||
U strcpy
|
||||
U strlen
|
||||
U strncmp
|
||||
U strncpy
|
||||
U strrchr
|
||||
U strstr
|
||||
U tolower
|
||||
U toupper
|
||||
|
||||
main.o:
|
||||
00000004 r _ZL15APinDescription
|
||||
00000000 r _ZL2SS
|
||||
00000003 r _ZL3SCK
|
||||
00000002 r _ZL4MISO
|
||||
00000001 r _ZL4MOSI
|
||||
U __aeabi_unwind_cpp_pr0
|
||||
U init
|
||||
U loop
|
||||
00000000 T main
|
||||
U setup
|
Binary file not shown.
@ -1,391 +0,0 @@
|
||||
|
||||
WInterrupts.o:
|
||||
00000004 r APinDescription
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
00000000 T attachInterrupt
|
||||
00000000 T detachInterrupt
|
||||
00000000 b intFunc
|
||||
|
||||
board_cstartup_gnu_sam3.o:
|
||||
U ACC_IrqHandler
|
||||
U ADC_IrqHandler
|
||||
00000004 r APinDescription
|
||||
U BusFault_Handler
|
||||
U CRCCU_IrqHandler
|
||||
U DAC_IrqHandler
|
||||
U DebugMon_Handler
|
||||
U Dummy_Handler
|
||||
U EEFC_IrqHandler
|
||||
U HardFault_Handler
|
||||
U MCI_IrqHandler
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
U MemManage_Handler
|
||||
U NMI_Handler
|
||||
U PIOA_IrqHandler
|
||||
U PIOB_IrqHandler
|
||||
U PIOC_IrqHandler
|
||||
U PMC_IrqHandler
|
||||
U PWM_IrqHandler
|
||||
U PendSV_Handler
|
||||
U RSTC_IrqHandler
|
||||
U RTC_IrqHandler
|
||||
U RTT_IrqHandler
|
||||
00000000 T Reset_Handler
|
||||
00000003 r SCK
|
||||
U SMC_IrqHandler
|
||||
U SPI_IrqHandler
|
||||
00000000 r SS
|
||||
U SSC_IrqHandler
|
||||
U SUPC_IrqHandler
|
||||
U SVC_Handler
|
||||
U SysTick_Handler
|
||||
U TC0_IrqHandler
|
||||
U TC1_IrqHandler
|
||||
U TC2_IrqHandler
|
||||
U TC3_IrqHandler
|
||||
U TC4_IrqHandler
|
||||
U TC5_IrqHandler
|
||||
U TWI0_IrqHandler
|
||||
U TWI1_IrqHandler
|
||||
U UART0_IrqHandler
|
||||
U UART1_IrqHandler
|
||||
U USART0_IrqHandler
|
||||
U USART1_IrqHandler
|
||||
U USBD_IrqHandler
|
||||
U UsageFault_Handler
|
||||
U WDT_IrqHandler
|
||||
U __libc_init_array
|
||||
U _erelocate
|
||||
U _etext
|
||||
U _ezero
|
||||
U _sfixed
|
||||
U _srelocate
|
||||
U _szero
|
||||
U init
|
||||
U main
|
||||
00000000 D pdwStack
|
||||
00000000 D vector_table
|
||||
|
||||
itoa.o:
|
||||
00000000 T itoa
|
||||
00000000 t reverse
|
||||
U strlen
|
||||
|
||||
syscalls_sam3.o:
|
||||
00000000 T _close
|
||||
U _end
|
||||
00000000 T _exit
|
||||
00000000 T _fstat
|
||||
00000000 T _getpid
|
||||
00000000 T _isatty
|
||||
00000000 T _kill
|
||||
00000000 T _lseek
|
||||
00000000 T _read
|
||||
00000000 T _sbrk
|
||||
00000000 T _write
|
||||
00000000 b heap.6819
|
||||
U iprintf
|
||||
00000000 T link
|
||||
|
||||
wiring.o:
|
||||
00000004 r APinDescription
|
||||
U GetTickCount
|
||||
00000000 t LowLevelInit_sam3s_ek
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
00000000 t NVIC_SetPriority
|
||||
U PIO_Configure
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
00000000 t SysTick_Config
|
||||
00000000 T SysTick_Handler
|
||||
U TimeTick_Increment
|
||||
U WDT_Disable
|
||||
U Wait
|
||||
00000000 T delay
|
||||
00000000 T delayMicroseconds
|
||||
00000000 T init
|
||||
00000000 T micros
|
||||
00000000 T millis
|
||||
|
||||
wiring_digital.o:
|
||||
00000004 r APinDescription
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
U PIO_Configure
|
||||
U PIO_Get
|
||||
U PIO_SetOutput
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
00000000 T digitalRead
|
||||
00000000 T digitalWrite
|
||||
00000000 T pinMode
|
||||
|
||||
wiring_shift.o:
|
||||
00000004 r APinDescription
|
||||
00000002 r MISO
|
||||
00000001 r MOSI
|
||||
00000003 r SCK
|
||||
00000000 r SS
|
||||
U digitalRead
|
||||
U digitalWrite
|
||||
00000000 T shiftIn
|
||||
00000000 T shiftOut
|
||||
|
||||
HardwareSerial.o:
|
||||
00000000 T _Z10store_charhP12_ring_buffer
|
||||
|
||||
Print.o:
|
||||
00000020 r _ZL15APinDescription
|
||||
0000001c r _ZL2SS
|
||||
0000001f r _ZL3SCK
|
||||
0000001e r _ZL4MISO
|
||||
0000001d r _ZL4MOSI
|
||||
00000000 T _ZN5Print10printFloatEdh
|
||||
00000000 T _ZN5Print11printNumberEmh
|
||||
00000000 T _ZN5Print5printEPKc
|
||||
00000000 T _ZN5Print5printERK6String
|
||||
00000000 T _ZN5Print5printEc
|
||||
00000000 T _ZN5Print5printEdi
|
||||
00000000 T _ZN5Print5printEhi
|
||||
00000000 T _ZN5Print5printEii
|
||||
00000000 T _ZN5Print5printEji
|
||||
00000000 T _ZN5Print5printEli
|
||||
00000000 T _ZN5Print5printEmi
|
||||
00000000 T _ZN5Print5writeEPKc
|
||||
00000000 T _ZN5Print5writeEPKhj
|
||||
00000000 T _ZN5Print7printlnEPKc
|
||||
00000000 T _ZN5Print7printlnERK6String
|
||||
00000000 T _ZN5Print7printlnEc
|
||||
00000000 T _ZN5Print7printlnEdi
|
||||
00000000 T _ZN5Print7printlnEhi
|
||||
00000000 T _ZN5Print7printlnEii
|
||||
00000000 T _ZN5Print7printlnEji
|
||||
00000000 T _ZN5Print7printlnEli
|
||||
00000000 T _ZN5Print7printlnEmi
|
||||
00000000 T _ZN5Print7printlnEv
|
||||
00000000 W _ZNK6String6lengthEv
|
||||
U _ZNK6StringixEj
|
||||
00000008 R _ZTV5Print
|
||||
U __aeabi_d2iz
|
||||
U __aeabi_d2uiz
|
||||
U __aeabi_dadd
|
||||
U __aeabi_dcmplt
|
||||
U __aeabi_ddiv
|
||||
U __aeabi_dmul
|
||||
U __aeabi_dsub
|
||||
U __aeabi_i2d
|
||||
U __aeabi_ui2d
|
||||
U __cxa_pure_virtual
|
||||
|
||||
UART.o:
|
||||
U PMC_DisablePeripheral
|
||||
U PMC_EnablePeripheral
|
||||
U _Z10store_charhP12_ring_buffer
|
||||
00000030 r _ZL15APinDescription
|
||||
0000002c r _ZL2SS
|
||||
0000002f r _ZL3SCK
|
||||
0000002e r _ZL4MISO
|
||||
0000002d r _ZL4MOSI
|
||||
00000000 W _ZN14HardwareSerialC1Ev
|
||||
00000000 W _ZN14HardwareSerialC2Ev
|
||||
00000000 n _ZN14HardwareSerialC5Ev
|
||||
U _ZN5Print5writeEPKc
|
||||
U _ZN5Print5writeEPKhj
|
||||
00000000 W _ZN5PrintC1Ev
|
||||
00000000 W _ZN5PrintC2Ev
|
||||
00000000 n _ZN5PrintC5Ev
|
||||
00000000 W _ZN6StreamC1Ev
|
||||
00000000 W _ZN6StreamC2Ev
|
||||
00000000 n _ZN6StreamC5Ev
|
||||
00000000 T _ZN9UARTClass10IrqHandlerEv
|
||||
00000000 T _ZN9UARTClass3endEv
|
||||
00000000 T _ZN9UARTClass4peekEv
|
||||
00000000 T _ZN9UARTClass4readEv
|
||||
00000000 T _ZN9UARTClass5beginEm
|
||||
00000000 T _ZN9UARTClass5flushEv
|
||||
00000000 T _ZN9UARTClass5writeEh
|
||||
00000000 T _ZN9UARTClass9availableEv
|
||||
00000000 T _ZN9UARTClassC1EP4Uart4IRQnmP12_ring_bufferS4_
|
||||
00000000 T _ZN9UARTClassC2EP4Uart4IRQnmP12_ring_bufferS4_
|
||||
00000000 V _ZTV14HardwareSerial
|
||||
U _ZTV5Print
|
||||
00000000 V _ZTV6Stream
|
||||
00000000 R _ZTV9UARTClass
|
||||
U __cxa_pure_virtual
|
||||
|
||||
USART.o:
|
||||
U PMC_DisablePeripheral
|
||||
U PMC_EnablePeripheral
|
||||
U _Z10store_charhP12_ring_buffer
|
||||
00000030 r _ZL15APinDescription
|
||||
0000002c r _ZL2SS
|
||||
0000002f r _ZL3SCK
|
||||
0000002e r _ZL4MISO
|
||||
0000002d r _ZL4MOSI
|
||||
00000000 T _ZN10USARTClass10IrqHandlerEv
|
||||
00000000 T _ZN10USARTClass3endEv
|
||||
00000000 T _ZN10USARTClass4peekEv
|
||||
00000000 T _ZN10USARTClass4readEv
|
||||
00000000 T _ZN10USARTClass5beginEm
|
||||
00000000 T _ZN10USARTClass5flushEv
|
||||
00000000 T _ZN10USARTClass5writeEh
|
||||
00000000 T _ZN10USARTClass9availableEv
|
||||
00000000 T _ZN10USARTClassC1EP5Usart4IRQnmP12_ring_bufferS4_
|
||||
00000000 T _ZN10USARTClassC2EP5Usart4IRQnmP12_ring_bufferS4_
|
||||
00000000 W _ZN14HardwareSerialC1Ev
|
||||
00000000 W _ZN14HardwareSerialC2Ev
|
||||
00000000 n _ZN14HardwareSerialC5Ev
|
||||
U _ZN5Print5writeEPKc
|
||||
U _ZN5Print5writeEPKhj
|
||||
00000000 W _ZN5PrintC1Ev
|
||||
00000000 W _ZN5PrintC2Ev
|
||||
00000000 n _ZN5PrintC5Ev
|
||||
00000000 W _ZN6StreamC1Ev
|
||||
00000000 W _ZN6StreamC2Ev
|
||||
00000000 n _ZN6StreamC5Ev
|
||||
00000000 R _ZTV10USARTClass
|
||||
00000000 V _ZTV14HardwareSerial
|
||||
U _ZTV5Print
|
||||
00000000 V _ZTV6Stream
|
||||
U __cxa_pure_virtual
|
||||
|
||||
WMath.o:
|
||||
00000000 T _Z10randomSeedm
|
||||
00000000 T _Z3maplllll
|
||||
00000000 T _Z6randoml
|
||||
00000000 T _Z6randomll
|
||||
00000000 T _Z8makeWordhh
|
||||
00000000 T _Z8makeWordm
|
||||
U rand
|
||||
U srand
|
||||
|
||||
WString.o:
|
||||
00000000 T _ZN6String10invalidateEv
|
||||
00000000 T _ZN6String11toLowerCaseEv
|
||||
00000000 T _ZN6String11toUpperCaseEv
|
||||
00000000 T _ZN6String12changeBufferEj
|
||||
00000000 T _ZN6String4copyEPKcj
|
||||
00000000 W _ZN6String4initEv
|
||||
00000000 T _ZN6String4trimEv
|
||||
00000000 T _ZN6String6concatEPKc
|
||||
00000000 T _ZN6String6concatEPKcj
|
||||
00000000 T _ZN6String6concatERKS_
|
||||
00000000 T _ZN6String6concatEc
|
||||
00000000 T _ZN6String6concatEh
|
||||
00000000 T _ZN6String6concatEi
|
||||
00000000 T _ZN6String6concatEj
|
||||
00000000 T _ZN6String6concatEl
|
||||
00000000 T _ZN6String6concatEm
|
||||
00000000 T _ZN6String7replaceERKS_S1_
|
||||
00000000 T _ZN6String7replaceEcc
|
||||
00000000 T _ZN6String7reserveEj
|
||||
00000000 T _ZN6String9setCharAtEjc
|
||||
00000000 T _ZN6StringC1EPKc
|
||||
00000000 T _ZN6StringC1ERKS_
|
||||
00000000 T _ZN6StringC1Ec
|
||||
00000000 T _ZN6StringC1Ehh
|
||||
00000000 T _ZN6StringC1Eih
|
||||
00000000 T _ZN6StringC1Ejh
|
||||
00000000 T _ZN6StringC1Elh
|
||||
00000000 T _ZN6StringC1Emh
|
||||
00000000 T _ZN6StringC2EPKc
|
||||
00000000 T _ZN6StringC2ERKS_
|
||||
00000000 T _ZN6StringC2Ec
|
||||
00000000 T _ZN6StringC2Ehh
|
||||
00000000 T _ZN6StringC2Eih
|
||||
00000000 T _ZN6StringC2Ejh
|
||||
00000000 T _ZN6StringC2Elh
|
||||
00000000 T _ZN6StringC2Emh
|
||||
00000000 T _ZN6StringD1Ev
|
||||
00000000 T _ZN6StringD2Ev
|
||||
00000000 T _ZN6StringaSEPKc
|
||||
00000000 T _ZN6StringaSERKS_
|
||||
00000000 T _ZN6StringixEj
|
||||
00000000 T _ZNK6String10startsWithERKS_
|
||||
00000000 T _ZNK6String10startsWithERKS_j
|
||||
00000000 T _ZNK6String11lastIndexOfERKS_
|
||||
00000000 T _ZNK6String11lastIndexOfERKS_i
|
||||
00000000 T _ZNK6String11lastIndexOfEc
|
||||
00000000 T _ZNK6String11lastIndexOfEci
|
||||
00000000 T _ZNK6String16equalsIgnoreCaseERKS_
|
||||
00000000 T _ZNK6String5toIntEv
|
||||
00000000 T _ZNK6String6charAtEj
|
||||
00000000 T _ZNK6String6equalsEPKc
|
||||
00000000 T _ZNK6String6equalsERKS_
|
||||
00000000 T _ZNK6String7indexOfERKS_
|
||||
00000000 T _ZNK6String7indexOfERKS_j
|
||||
00000000 T _ZNK6String7indexOfEc
|
||||
00000000 T _ZNK6String7indexOfEcj
|
||||
00000000 T _ZNK6String8endsWithERKS_
|
||||
00000000 T _ZNK6String8getBytesEPhjj
|
||||
00000000 T _ZNK6String9compareToERKS_
|
||||
00000000 T _ZNK6String9substringEj
|
||||
00000000 T _ZNK6String9substringEjj
|
||||
00000000 T _ZNK6StringgeERKS_
|
||||
00000000 T _ZNK6StringgtERKS_
|
||||
00000000 T _ZNK6StringixEj
|
||||
00000000 T _ZNK6StringleERKS_
|
||||
00000000 T _ZNK6StringltERKS_
|
||||
00000000 b _ZZN6StringixEjE19dummy_writable_char
|
||||
00000000 T _ZplRK15StringSumHelperPKc
|
||||
00000000 T _ZplRK15StringSumHelperRK6String
|
||||
00000000 T _ZplRK15StringSumHelperc
|
||||
00000000 T _ZplRK15StringSumHelperh
|
||||
00000000 T _ZplRK15StringSumHelperi
|
||||
00000000 T _ZplRK15StringSumHelperj
|
||||
00000000 T _ZplRK15StringSumHelperl
|
||||
00000000 T _ZplRK15StringSumHelperm
|
||||
U atol
|
||||
U free
|
||||
U isspace
|
||||
U memcpy
|
||||
U memmove
|
||||
U realloc
|
||||
U strchr
|
||||
U strcmp
|
||||
U strcpy
|
||||
U strlen
|
||||
U strncmp
|
||||
U strncpy
|
||||
U strrchr
|
||||
U strstr
|
||||
U tolower
|
||||
U toupper
|
||||
|
||||
cxxabi-compat.o:
|
||||
00000000 T __cxa_pure_virtual
|
||||
|
||||
main.o:
|
||||
00000004 r _ZL15APinDescription
|
||||
00000000 r _ZL2SS
|
||||
00000003 r _ZL3SCK
|
||||
00000002 r _ZL4MISO
|
||||
00000001 r _ZL4MOSI
|
||||
U init
|
||||
U loop
|
||||
00000000 T main
|
||||
U setup
|
||||
|
||||
variant.o:
|
||||
00000120 B Serial1
|
||||
00000138 B Serial2
|
||||
00000000 t _GLOBAL__I_rx_buffer1
|
||||
00000000 T _Z16UART0_IrqHandlerv
|
||||
00000000 T _Z16UART1_IrqHandlerv
|
||||
00000000 t _Z41__static_initialization_and_destruction_0ii
|
||||
00000004 r _ZL15APinDescription
|
||||
00000000 r _ZL2SS
|
||||
00000003 r _ZL3SCK
|
||||
00000002 r _ZL4MISO
|
||||
00000001 r _ZL4MOSI
|
||||
U _ZN9UARTClass10IrqHandlerEv
|
||||
U _ZN9UARTClassC1EP4Uart4IRQnmP12_ring_bufferS4_
|
||||
00000000 B rx_buffer1
|
||||
00000090 B rx_buffer2
|
||||
00000048 B tx_buffer1
|
||||
000000d8 B tx_buffer2
|
Binary file not shown.
Binary file not shown.
@ -1,15 +1,19 @@
|
||||
#define ARDUINO_MAIN
|
||||
#include "Arduino.h"
|
||||
|
||||
int main(void)
|
||||
/*
|
||||
* \brief Main entry point of Arduino application
|
||||
*/
|
||||
int main( void )
|
||||
{
|
||||
init();
|
||||
init() ;
|
||||
|
||||
setup();
|
||||
setup() ;
|
||||
|
||||
for (;;)
|
||||
loop();
|
||||
for ( ; ; )
|
||||
{
|
||||
loop() ;
|
||||
}
|
||||
|
||||
return 0;
|
||||
// return 0 ;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
* Exported functions
|
||||
*----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern caddr_t _sbrk( int incr ) ;
|
||||
|
@ -43,8 +43,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined ( __GNUC__ ) /* GCC CS3 */
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Exported variables
|
||||
|
@ -19,4 +19,8 @@ clean:
|
||||
@echo --- Cleaning test
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f test.mk $@
|
||||
|
||||
.PHONY: debug
|
||||
debug:
|
||||
@echo --- Debugging test
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f test.mk $@
|
||||
|
||||
|
@ -8,7 +8,7 @@ AR = $(CROSS_COMPILE)ar
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CXX = $(CROSS_COMPILE)g++
|
||||
AS = $(CROSS_COMPILE)as
|
||||
#LD = $(CROSS_COMPILE)ld
|
||||
GDB = $(CROSS_COMPILE)gdb
|
||||
SIZE = $(CROSS_COMPILE)size
|
||||
NM = $(CROSS_COMPILE)nm
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
|
@ -15,14 +15,31 @@ OUTPUT_PATH = .
|
||||
# Libraries
|
||||
PROJECT_BASE_PATH = .
|
||||
SYSTEM_PATH = ../../../system
|
||||
CMSIS_PATH = $(SYSTEM_PATH)/CMSIS/CM3/CoreSupport
|
||||
CMSIS_BASE_PATH = $(SYSTEM_PATH)/CMSIS/Include
|
||||
VARIANT_PATH = ../../../variants/sam3s-ek
|
||||
|
||||
ifeq ($(CHIP), __SAM3S4C__)
|
||||
CHIP_NAME=sam3s4c
|
||||
CHIP_SERIE=sam3s
|
||||
else ifeq ($(CHIP), __SAM3U4E__)
|
||||
CHIP_NAME=sam3u4e
|
||||
CHIP_SERIE=sam3u
|
||||
else ifeq ($(CHIP), __SAM3N4C__)
|
||||
CHIP_NAME=sam3n4c
|
||||
CHIP_SERIE=sam3n
|
||||
else ifeq ($(CHIP), __SAM3X8H__)
|
||||
CHIP_NAME=sam3x8h
|
||||
CHIP_SERIE=sam3xa
|
||||
else
|
||||
endif
|
||||
|
||||
CMSIS_CHIP_PATH=$(PROJECT_BASE_PATH)/../cmsis/$(CHIP_SERIE)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Files
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
vpath %.h $(PROJECT_BASE_PATH)/.. $(VARIANT_PATH) $(SYSTEM_PATH)
|
||||
vpath %.h $(PROJECT_BASE_PATH)/.. $(VARIANT_PATH) $(SYSTEM_PATH) $(CMSIS_BASE_PATH)
|
||||
vpath %.cpp $(PROJECT_BASE_PATH)
|
||||
|
||||
VPATH+=$(PROJECT_BASE_PATH)
|
||||
@ -31,7 +48,7 @@ INCLUDES = -I$(PROJECT_BASE_PATH)/..
|
||||
INCLUDES += -I$(VARIANT_PATH)
|
||||
INCLUDES += -I$(SYSTEM_PATH)
|
||||
INCLUDES += -I$(SYSTEM_PATH)/libsam
|
||||
INCLUDES += -I$(CMSIS_PATH)
|
||||
INCLUDES += -I$(CMSIS_BASE_PATH)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
ifdef DEBUG
|
||||
@ -90,7 +107,7 @@ $(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp
|
||||
@$(CXX) -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/flash.ld" -Wl,-Map,$(OUTPUT_PATH)/$@.map -o $(OUTPUT_PATH)/$@.elf $^ $(LIBS)
|
||||
$(CC) $(LIB_PATH) $(LDFLAGS) -T"$(VARIANT_PATH)/linker_scripts/gcc/flash.ld" -Wl,-Map,$(OUTPUT_PATH)/$@.map -o $(OUTPUT_PATH)/$@.elf $^ $(LIBS)
|
||||
$(NM) $(OUTPUT_PATH)/$@.elf >$(OUTPUT_PATH)/$@.elf.txt
|
||||
$(OBJCOPY) -O binary $(OUTPUT_PATH)/$@.elf $(OUTPUT_PATH)/$@.bin
|
||||
$(SIZE) $^ $(OUTPUT_PATH)/$@.elf
|
||||
@ -104,3 +121,6 @@ clean:
|
||||
-@$(RM) $(OUTPUT_PATH)/$(OUTPUT_BIN).elf.txt 1>NUL 2>&1
|
||||
-@$(RM) $(OUTPUT_PATH)/$(OUTPUT_BIN).bin 1>NUL 2>&1
|
||||
-@$(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
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,281 +0,0 @@
|
||||
00402190 t .udivsi3_skip_div0_test
|
||||
00401b58 W ACC_IrqHandler
|
||||
00401b58 W ADC_IrqHandler
|
||||
00405434 t APinDescription
|
||||
00405040 t APinDescription
|
||||
00401b58 W BusFault_Handler
|
||||
00401b58 W CRCCU_IrqHandler
|
||||
00401b58 W DAC_IrqHandler
|
||||
00401b58 W DebugMon_Handler
|
||||
00401b58 T Dummy_Handler
|
||||
00401b58 W EEFC_IrqHandler
|
||||
00401b58 W HardFault_Handler
|
||||
00400324 t LowLevelInit_sam3s_ek
|
||||
00401b58 W MCI_IrqHandler
|
||||
00405432 t MISO
|
||||
0040503e t MISO
|
||||
00405431 t MOSI
|
||||
0040503d t MOSI
|
||||
00401b58 W MemManage_Handler
|
||||
00401b58 W NMI_Handler
|
||||
00400248 t NVIC_SetPriority
|
||||
00401b58 W PIOA_IrqHandler
|
||||
00401b58 W PIOB_IrqHandler
|
||||
00401b58 W PIOC_IrqHandler
|
||||
00401d9c T PIO_Configure
|
||||
00401b60 T PIO_DisableInterrupt
|
||||
00401b7c T PIO_PullUp
|
||||
00401cb8 T PIO_SetInput
|
||||
00401d38 T PIO_SetOutput
|
||||
00401bac T PIO_SetPeripheral
|
||||
00401f38 T PMC_DisablePeripheral
|
||||
00401e94 T PMC_EnablePeripheral
|
||||
00401b58 W PMC_IrqHandler
|
||||
00401b58 W PWM_IrqHandler
|
||||
00401b58 W PendSV_Handler
|
||||
00401b58 W RSTC_IrqHandler
|
||||
00401b58 W RTC_IrqHandler
|
||||
00401b58 W RTT_IrqHandler
|
||||
00400188 T Reset_Handler
|
||||
00405433 t SCK
|
||||
0040503f t SCK
|
||||
00401b58 W SMC_IrqHandler
|
||||
00401b58 W SPI_IrqHandler
|
||||
0040503c t SS
|
||||
00405430 t SS
|
||||
00401b58 W SSC_IrqHandler
|
||||
00401b58 W SUPC_IrqHandler
|
||||
00401b58 W SVC_Handler
|
||||
200006a8 B Serial1
|
||||
200006c0 B Serial2
|
||||
004002a0 t SysTick_Config
|
||||
00400314 T SysTick_Handler
|
||||
00401b58 W TC0_IrqHandler
|
||||
00401b58 W TC1_IrqHandler
|
||||
00401b58 W TC2_IrqHandler
|
||||
00401b58 W TC3_IrqHandler
|
||||
00401b58 W TC4_IrqHandler
|
||||
00401b58 W TC5_IrqHandler
|
||||
00401b58 W TWI0_IrqHandler
|
||||
00401b58 W TWI1_IrqHandler
|
||||
00401ff8 T TimeTick_Increment
|
||||
00401b58 W UART0_IrqHandler
|
||||
00401b58 W UART1_IrqHandler
|
||||
00401b58 W USART0_IrqHandler
|
||||
00401b58 W USART1_IrqHandler
|
||||
00401b58 W USBD_IrqHandler
|
||||
00401b58 W UsageFault_Handler
|
||||
00401fdc T WDT_Disable
|
||||
00401b58 W WDT_IrqHandler
|
||||
00402014 T Wait
|
||||
00400a14 t _GLOBAL__I_rx_buffer1
|
||||
w _Jv_RegisterClasses
|
||||
0040099c t _Z41__static_initialization_and_destruction_0ii
|
||||
00405848 t _ZL15APinDescription
|
||||
00404c4c t _ZL15APinDescription
|
||||
00405c68 t _ZL15APinDescription
|
||||
00405844 t _ZL2SS
|
||||
00405c64 t _ZL2SS
|
||||
00404c46 t _ZL2SS
|
||||
00405c67 t _ZL3SCK
|
||||
00405847 t _ZL3SCK
|
||||
00404c49 t _ZL3SCK
|
||||
00405846 t _ZL4MISO
|
||||
00405c66 t _ZL4MISO
|
||||
00404c48 t _ZL4MISO
|
||||
00405845 t _ZL4MOSI
|
||||
00404c47 t _ZL4MOSI
|
||||
00405c65 t _ZL4MOSI
|
||||
004006e8 W _ZN14HardwareSerialC1Ev
|
||||
004006e8 W _ZN14HardwareSerialC2Ev
|
||||
00400604 T _ZN5Print5printEPKc
|
||||
00400628 T _ZN5Print5printEc
|
||||
0040057c T _ZN5Print5writeEPKc
|
||||
004005bc T _ZN5Print5writeEPKhj
|
||||
00400674 T _ZN5Print7printlnEPKc
|
||||
0040064c T _ZN5Print7printlnEv
|
||||
0040069c W _ZN5PrintC1Ev
|
||||
0040069c W _ZN5PrintC2Ev
|
||||
004006bc W _ZN6StreamC1Ev
|
||||
004006bc W _ZN6StreamC2Ev
|
||||
004007c0 T _ZN9UARTClass3endEv
|
||||
00400830 T _ZN9UARTClass4peekEv
|
||||
00400870 T _ZN9UARTClass4readEv
|
||||
00400764 T _ZN9UARTClass5beginEm
|
||||
004008c8 T _ZN9UARTClass5flushEv
|
||||
004008f4 T _ZN9UARTClass5writeEh
|
||||
00400804 T _ZN9UARTClass9availableEv
|
||||
00400714 T _ZN9UARTClassC1EP4Uart4IRQnmP12_ring_bufferS4_
|
||||
00400714 T _ZN9UARTClassC2EP4Uart4IRQnmP12_ring_bufferS4_
|
||||
00406058 V _ZTV14HardwareSerial
|
||||
00405830 T _ZTV5Print
|
||||
00406088 V _ZTV6Stream
|
||||
00405c38 T _ZTV9UARTClass
|
||||
00406100 t __FUNCTION__.5774
|
||||
004060e8 t __FUNCTION__.5778
|
||||
004060d4 t __FUNCTION__.5800
|
||||
00402408 W __aeabi_idiv0
|
||||
00402408 W __aeabi_ldiv0
|
||||
00402190 T __aeabi_uidiv
|
||||
004023ec T __aeabi_uidivmod
|
||||
00404544 T __aeabi_uldivmod
|
||||
00404334 T __ascii_wctomb
|
||||
00402454 T __assert
|
||||
0040240c T __assert_func
|
||||
00400a2c T __cxa_pure_virtual
|
||||
004045d0 T __divdi3
|
||||
004000d0 t __do_global_dtors_aux
|
||||
00406250 t __do_global_dtors_aux_fini_array_entry
|
||||
00406254 T __fini_array_end
|
||||
00406250 T __fini_array_start
|
||||
004035cc t __fp_lock
|
||||
004037bc T __fp_lock_all
|
||||
004035d0 t __fp_unlock
|
||||
004037d4 T __fp_unlock_all
|
||||
0040623c t __frame_dummy_init_array_entry
|
||||
00404570 T __gnu_ldivmod_helper
|
||||
004045a0 T __gnu_uldivmod_helper
|
||||
00406244 T __init_array_end
|
||||
0040623c T __init_array_start
|
||||
00400a34 T __libc_init_array
|
||||
00403d6c T __locale_charset
|
||||
00403d8c T __locale_cjk_lang
|
||||
00403d78 T __locale_mb_cur_max
|
||||
00403d84 T __locale_msgcharset
|
||||
20000000 D __malloc_av_
|
||||
200006dc B __malloc_current_mallinfo
|
||||
00401204 T __malloc_lock
|
||||
20000704 B __malloc_max_sbrked_mem
|
||||
20000708 B __malloc_max_total_mem
|
||||
20000408 D __malloc_sbrk_base
|
||||
200006d8 B __malloc_top_pad
|
||||
2000040c D __malloc_trim_threshold
|
||||
00401208 T __malloc_unlock
|
||||
20000524 D __mb_cur_max
|
||||
0040623c T __preinit_array_end
|
||||
0040623c T __preinit_array_start
|
||||
00404160 T __sclose
|
||||
004040f8 T __seofread
|
||||
00406204 T __sf_fake_stderr
|
||||
004061c4 T __sf_fake_stdin
|
||||
004061e4 T __sf_fake_stdout
|
||||
004035e0 T __sfmoreglue
|
||||
00403724 T __sfp
|
||||
004037ac T __sfp_lock_acquire
|
||||
004037b0 T __sfp_lock_release
|
||||
0040392c T __sfvwrite_r
|
||||
00404094 T __sigtramp
|
||||
00404014 T __sigtramp_r
|
||||
0040361c T __sinit
|
||||
004037b4 T __sinit_lock_acquire
|
||||
004037b8 T __sinit_lock_release
|
||||
00403db0 T __smakebuf_r
|
||||
00402510 T __sprint_r
|
||||
004040d4 T __sread
|
||||
00404138 T __sseek
|
||||
00404254 T __swbuf
|
||||
00404168 T __swbuf_r
|
||||
004040fc T __swrite
|
||||
004032cc T __swsetup_r
|
||||
00404930 T __udivdi3
|
||||
00402190 T __udivsi3
|
||||
20000580 D __wctomb
|
||||
00403610 T _cleanup
|
||||
004035d4 T _cleanup_r
|
||||
00402084 T _close
|
||||
004043ac T _close_r
|
||||
2000070c b _dwTickCount
|
||||
20000718 B _ebss
|
||||
00406254 T _efixed
|
||||
20002b18 A _end
|
||||
20000584 D _erelocate
|
||||
0040625c A _etext
|
||||
0040214c T _exit
|
||||
20000718 B _ezero
|
||||
004043d4 T _fclose_r
|
||||
004033e0 T _fflush_r
|
||||
00406244 T _fini
|
||||
00402460 T _fiprintf_r
|
||||
004037ec T _fputwc_r
|
||||
00401934 T _free_r
|
||||
0040209c T _fstat
|
||||
00404498 T _fstat_r
|
||||
00403c64 T _fwalk
|
||||
00403cb8 T _fwalk_reent
|
||||
0040217c T _getpid
|
||||
004040d0 T _getpid_r
|
||||
004060b0 T _global_impure_ptr
|
||||
20000410 D _impure_ptr
|
||||
00406230 T _init
|
||||
00404088 T _init_signal
|
||||
00403f50 T _init_signal_r
|
||||
004024e4 T _iprintf_r
|
||||
004020c0 T _isatty
|
||||
004044c4 T _isatty_r
|
||||
00402168 T _kill
|
||||
004040a4 T _kill_r
|
||||
00403d90 T _localeconv_r
|
||||
004020d8 T _lseek
|
||||
004044ec T _lseek_r
|
||||
00400a84 T _malloc_r
|
||||
0040188c T _malloc_trim_r
|
||||
00403fbc T _raise_r
|
||||
004020f4 T _read
|
||||
00404518 T _read_r
|
||||
0040120c T _realloc_r
|
||||
00402044 T _sbrk
|
||||
00401628 T _sbrk_r
|
||||
20000584 B _sbss
|
||||
00403d10 T _setlocale_r
|
||||
00400000 T _sfixed
|
||||
00403f80 T _signal_r
|
||||
20000000 D _srelocate
|
||||
20000584 B _szero
|
||||
00402594 T _vfiprintf_r
|
||||
00404264 T _wcrtomb_r
|
||||
00404350 T _wctomb_r
|
||||
00402110 T _write
|
||||
00404380 T _write_r
|
||||
004033d0 T abort
|
||||
00406174 t blanks.6556
|
||||
20000584 b completed.7631
|
||||
004002f8 T delay
|
||||
00400500 T digitalWrite
|
||||
20000714 B errno
|
||||
00404488 T fclose
|
||||
004035a4 T fflush
|
||||
00402480 T fiprintf
|
||||
004038d4 T fputwc
|
||||
004000e4 t frame_dummy
|
||||
20000710 b heap.6819
|
||||
20000414 d impure_data
|
||||
004003dc T init
|
||||
004024ac T iprintf
|
||||
20000504 d lc_ctype_charset
|
||||
20000528 d lc_message_charset
|
||||
20000548 d lconv
|
||||
00403da8 T localeconv
|
||||
00400128 T loop
|
||||
0040097c T main
|
||||
00401acc T memchr
|
||||
00401000 T memcpy
|
||||
00401150 T memmove
|
||||
00403e9c T memset
|
||||
20000718 B pdwStack
|
||||
00400428 T pinMode
|
||||
00404068 T raise
|
||||
20000588 B rx_buffer1
|
||||
20000618 B rx_buffer2
|
||||
00403d98 T setlocale
|
||||
00400100 T setup
|
||||
00000000 a shift
|
||||
00404078 T signal
|
||||
00401650 T strcmp
|
||||
004016d0 t strcmp_unaligned
|
||||
0040182c T strlen
|
||||
200005d0 B tx_buffer1
|
||||
20000660 B tx_buffer2
|
||||
00400000 T vector_table
|
||||
004032b0 T vfiprintf
|
||||
004042c0 T wcrtomb
|
||||
00406184 t zeroes.6557
|
File diff suppressed because it is too large
Load Diff
@ -33,11 +33,11 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state></state>
|
||||
<state>$PROJ_DIR$\..\..\..\..\variants\sam3s-ek\debug_scripts\iar\sam3s_ek_flash.mac</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
@ -45,7 +45,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state></state>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\debugger\Atmel\iosam3s.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
@ -85,7 +85,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>ARMSIM_ID</state>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
@ -117,7 +117,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoadersV3</name>
|
||||
<state>$TOOLKIT_DIR$\config\flashloader\</state>
|
||||
<state>$TOOLKIT_DIR$\config\flashloader\Atmel\SAM3S4\sam3s4-flash.board</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck1</name>
|
||||
@ -366,7 +366,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadioV2</name>
|
||||
<state>0</state>
|
||||
<state>2</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCUSBDevice</name>
|
||||
@ -424,7 +424,7 @@
|
||||
<option>
|
||||
<name>CCJLinkResetList</name>
|
||||
<version>5</version>
|
||||
<state>5</state>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkInterfaceCmdLine</name>
|
||||
|
@ -164,7 +164,7 @@
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCDefines</name>
|
||||
<state>__sam3s4c__</state>
|
||||
<state>__SAM3S4C__</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPreprocFile</name>
|
||||
@ -200,7 +200,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>CCEnableRemarks</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDiagSuppress</name>
|
||||
@ -562,7 +562,7 @@
|
||||
<option>
|
||||
<name>OOCOutputFormat</name>
|
||||
<version>2</version>
|
||||
<state>0</state>
|
||||
<state>2</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCOutputOverride</name>
|
||||
@ -570,7 +570,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>OOCOutputFile</name>
|
||||
<state></state>
|
||||
<state>test.bin</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OOCCommandLineProducer</name>
|
||||
@ -578,7 +578,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>OOCObjCopyEnable</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
@ -660,35 +660,35 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkMapFile</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogFile</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogInitialization</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogModule</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogSection</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogVeneer</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfOverride</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\generic_cortex.icf</state>
|
||||
<state>$PROJ_DIR$\..\..\..\..\variants\sam3s-ek\linker_scripts\iar\sam3s_ek_flash.icf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFileSlave</name>
|
||||
@ -696,7 +696,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkEnableRemarks</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkSuppressDiags</name>
|
||||
@ -823,15 +823,15 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogAutoLibSelect</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogRedirSymbols</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogUnusedFragments</name>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkCrcReverseByteOrder</name>
|
||||
@ -1792,6 +1792,30 @@
|
||||
<data/>
|
||||
</settings>
|
||||
</configuration>
|
||||
<group>
|
||||
<name>resources</name>
|
||||
<group>
|
||||
<name>arduino_due</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>sam3s_ek</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\variants\sam3s-ek\linker_scripts\iar\sam3s_ek_flash.icf</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\variants\sam3s-ek\debug_scripts\iar\sam3s_ek_flash.mac</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\variants\sam3s-ek\linker_scripts\iar\sam3s_ek_sram.icf</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\variants\sam3s-ek\debug_scripts\iar\sam3s_ek_sram.mac</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
<name>sam3u_ek</name>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<name>variants</name>
|
||||
<group>
|
||||
|
@ -5,18 +5,20 @@ void setup( void )
|
||||
// initialize the digital pin as an output.
|
||||
// Pin PIN_LED has an LED connected on most Arduino boards:
|
||||
pinMode( PIN_LED, OUTPUT ) ;
|
||||
pinMode( PIN_LED_RED, OUTPUT ) ;
|
||||
digitalWrite( PIN_LED_RED, HIGH ) ;
|
||||
|
||||
Serial1.begin( 19200 ) ;
|
||||
// Serial1.begin( 19200 ) ;
|
||||
}
|
||||
|
||||
void loop( void )
|
||||
{
|
||||
digitalWrite( PIN_LED, HIGH ) ; // set the LED on
|
||||
delay( 1000 ) ; // wait for a second
|
||||
digitalWrite( PIN_LED, LOW ) ; // set the LED off
|
||||
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
|
||||
//digitalWrite( PIN_LED, HIGH ) ; // set the LED on
|
||||
//delay( 1000 ) ; // wait for a second
|
||||
//digitalWrite( PIN_LED, LOW ) ; // set the LED off
|
||||
//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
|
||||
}
|
||||
|
@ -24,6 +24,10 @@
|
||||
|
||||
#include "wiring_private.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
uint32_t millis( void )
|
||||
{
|
||||
// todo: ensure no interrupts
|
||||
@ -74,69 +78,44 @@ extern void SysTick_Handler( void )
|
||||
TimeTick_Increment() ;
|
||||
}
|
||||
|
||||
//! Check Variant for PLL/Clock inits
|
||||
#if defined sam3s_ek
|
||||
#define VARIANT_PLLAR (CKGR_PLLAR_STUCKTO1 | \
|
||||
CKGR_PLLAR_MULA( 0x0f ) | \
|
||||
CKGR_PLLAR_PLLACOUNT( 0x1 ) | \
|
||||
CKGR_PLLAR_DIVA( 0x3 ))
|
||||
#else
|
||||
#error "No settings for current VARIANT"
|
||||
#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 ) ;
|
||||
|
||||
SysTick_Config( VARIANT_MCK/1000 ) ;
|
||||
|
||||
// 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_Clear( APinDescription[PIN_LED_RED].pPort, APinDescription[PIN_LED_RED].dwPin ) ;
|
||||
//PIO_Configure( APinDescription[PIN_LED_RED].pPort, APinDescription[PIN_LED_RED].dwPinType,
|
||||
// APinDescription[PIN_LED_RED].dwPin, APinDescription[PIN_LED_RED].dwPinAttribute ) ;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Performs the low-level initialization of the chip.
|
||||
* This includes EFC and master clock configuration.
|
||||
* It also enable a low level on the pin NRST triggers a user reset.
|
||||
* \brief
|
||||
*
|
||||
* \param c Character to output.
|
||||
*
|
||||
* \return The character that was output.
|
||||
*/
|
||||
static void LowLevelInit_sam3s_ek( void )
|
||||
extern WEAK signed int putchar( signed int c )
|
||||
{
|
||||
/* Set 3 FWS for Embedded Flash Access @ 64MHz, we are now at 4MHz on Internal FastRC */
|
||||
EFC->EEFC_FMR = EEFC_FMR_FWS( 3 ) ;
|
||||
|
||||
/* Initialize main oscillator */
|
||||
if ( !(PMC->CKGR_MOR & CKGR_MOR_MOSCSEL) )
|
||||
{
|
||||
PMC->CKGR_MOR = CKGR_MOR_KEY(0x37) | CKGR_MOR_MOSCXTST(0x8) | CKGR_MOR_MOSCRCEN | CKGR_MOR_MOSCXTEN ;
|
||||
for ( ; !(PMC->PMC_SR & PMC_SR_MOSCXTS) ; ) ;
|
||||
}
|
||||
|
||||
/* Switch to 3-20MHz Xtal oscillator */
|
||||
PMC->CKGR_MOR = CKGR_MOR_KEY(0x37) | CKGR_MOR_MOSCXTST(0x8) | CKGR_MOR_MOSCRCEN | CKGR_MOR_MOSCXTEN | CKGR_MOR_MOSCSEL ;
|
||||
for ( ; !(PMC->PMC_SR & PMC_SR_MOSCSELS) ; ) ;
|
||||
|
||||
PMC->PMC_MCKR = (PMC->PMC_MCKR & ~(uint32_t)PMC_MCKR_CSS_Msk) | PMC_MCKR_CSS_MAIN_CLK ;
|
||||
for ( ; !(PMC->PMC_SR & PMC_SR_MCKRDY) ; ) ;
|
||||
|
||||
/* Initialize PLLA */
|
||||
PMC->CKGR_PLLAR = VARIANT_PLLAR ;
|
||||
for ( ; !(PMC->PMC_SR & PMC_SR_LOCKA) ; ) ;
|
||||
|
||||
/* Switch to main clock */
|
||||
PMC->PMC_MCKR = ((PMC_MCKR_PRES_CLK | PMC_MCKR_CSS_PLLA_CLK) & ~PMC_MCKR_CSS_Msk) | PMC_MCKR_CSS_MAIN_CLK ;
|
||||
for ( ; !(PMC->PMC_SR & PMC_SR_MCKRDY) ; ) ;
|
||||
|
||||
PMC->PMC_MCKR = (PMC_MCKR_PRES_CLK | PMC_MCKR_CSS_PLLA_CLK) ;
|
||||
for ( ; !(PMC->PMC_SR & PMC_SR_MCKRDY) ; ) ;
|
||||
return c ;
|
||||
}
|
||||
|
||||
void init( void )
|
||||
{
|
||||
// Disable watchdog, common to all SAM variants
|
||||
WDT_Disable( WDT ) ;
|
||||
|
||||
#if defined sam3s_ek
|
||||
// Set Main clock to 64MHz using external 12MHz
|
||||
LowLevelInit_sam3s_ek() ;
|
||||
#else
|
||||
# error "Board/Variant not defined"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set Systick to 1ms interval, common to all SAM3 variants
|
||||
SysTick_Config( VARIANT_MCK/1000 ) ;
|
||||
|
||||
// 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 ) ;
|
||||
}
|
||||
|
@ -25,7 +25,11 @@
|
||||
*/
|
||||
|
||||
#include "wiring_private.h"
|
||||
#include "pins_arduino.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
uint8_t analog_reference = DEFAULT;
|
||||
|
||||
@ -257,3 +261,7 @@ void analogWrite(uint8_t pin, int val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -25,79 +25,66 @@
|
||||
*/
|
||||
|
||||
#include "wiring_private.h"
|
||||
//#include "pins_arduino.h"
|
||||
|
||||
/// \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
|
||||
///
|
||||
void pinMode( uint32_t dwPin, uint32_t dwMode )
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void pinMode( uint32_t dwPin, uint32_t dwMode )
|
||||
{
|
||||
if ( APinDescription[dwPin].dwPinType == PIO_NOT_A_PIN )
|
||||
{
|
||||
return ;
|
||||
}
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
switch ( dwMode )
|
||||
{
|
||||
case INPUT:
|
||||
PIO_Configure( APinDescription[dwPin].pPort, PIO_INPUT, APinDescription[dwPin].dwPin, 0 ) ;
|
||||
break ;
|
||||
{
|
||||
case INPUT:
|
||||
/* Enable peripheral for clocking input */
|
||||
PMC_EnablePeripheral( APinDescription[dwPin].dwPeripheralId ) ;
|
||||
PIO_Configure( APinDescription[dwPin].pPort, PIO_INPUT, APinDescription[dwPin].dwPin, 0 ) ;
|
||||
break ;
|
||||
|
||||
case OUTPUT:
|
||||
PIO_Configure( APinDescription[dwPin].pPort, PIO_OUTPUT_1, APinDescription[dwPin].dwPin, APinDescription[dwPin].dwPinAttribute ) ;
|
||||
break ;
|
||||
case OUTPUT:
|
||||
/* if all pins are output, disable PIO Controller clocking, reduce power consomption */
|
||||
if ( APinDescription[dwPin].pPort->PIO_OSR == 0xffffffff )
|
||||
{
|
||||
PMC_DisablePeripheral( APinDescription[dwPin].dwPeripheralId ) ;
|
||||
}
|
||||
PIO_Configure( APinDescription[dwPin].pPort, PIO_OUTPUT_1, APinDescription[dwPin].dwPin, APinDescription[dwPin].dwPinAttribute ) ;
|
||||
break ;
|
||||
|
||||
default:
|
||||
break ;
|
||||
}
|
||||
default:
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
/// \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
|
||||
/// 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
|
||||
/// 20K pullup resistor (see the tutorial on digital pins). Writing LOW will disable the pullup. The pullup
|
||||
/// resistor is enough to light an LED dimly, so if LEDs appear to work, but very dimly, this is a likely
|
||||
/// cause. The remedy is to set the pin to an output with the pinMode() function.
|
||||
///
|
||||
/// NOTE: Digital pin PIN_LED is harder to use as a digital input than the other digital pins because it has an LED
|
||||
/// and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up
|
||||
/// resistor, it will hang at around 1.7 V instead of the expected 5V because the onboard LED and series resistor
|
||||
/// pull the voltage level down, meaning it always returns LOW. If you must use pin PIN_LED as a digital input, use an
|
||||
/// external pull down resistor.
|
||||
///
|
||||
/// \param dwPin the pin number
|
||||
/// \param dwVal HIGH or LOW
|
||||
///
|
||||
void digitalWrite( uint32_t dwPin, uint32_t dwVal )
|
||||
extern void digitalWrite( uint32_t dwPin, uint32_t dwVal )
|
||||
{
|
||||
if ( APinDescription[dwPin].dwPinType == PIO_NOT_A_PIN )
|
||||
{
|
||||
return ;
|
||||
}
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
PIO_SetOutput( APinDescription[dwPin].pPort, APinDescription[dwPin].dwPin, dwVal, 0, PIO_PULLUP ) ;
|
||||
}
|
||||
|
||||
/// \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)
|
||||
///
|
||||
int digitalRead( uint32_t dwPin )
|
||||
extern int digitalRead( uint32_t dwPin )
|
||||
{
|
||||
if ( APinDescription[dwPin].dwPinType == PIO_NOT_A_PIN )
|
||||
{
|
||||
return LOW ;
|
||||
}
|
||||
{
|
||||
return LOW ;
|
||||
}
|
||||
|
||||
if ( PIO_Get( APinDescription[dwPin].pPort, PIO_INPUT, APinDescription[dwPin].dwPin ) == 1 )
|
||||
{
|
||||
return HIGH ;
|
||||
}
|
||||
{
|
||||
return HIGH ;
|
||||
}
|
||||
|
||||
return LOW ;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -37,6 +37,16 @@ extern "C"{
|
||||
|
||||
typedef void (*voidFuncPtr)( void ) ;
|
||||
|
||||
/* Define attribute */
|
||||
#if defined ( __CC_ARM ) /* Keil <20>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
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
@ -28,7 +28,7 @@
|
||||
* or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds
|
||||
* to 3 minutes in length, but must be called at least a few dozen microseconds
|
||||
* before the start of the pulse. */
|
||||
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout)
|
||||
extern uint32_t pulseIn( uint32_t ulPin, uint32_t ulState, uint32_t ulTimeout )
|
||||
{
|
||||
// cache the port and bit of the pin in order to speed up the
|
||||
// pulse width measuring loop and achieve finer resolution. calling
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
wiring_shift.c - shiftOut() function
|
||||
wiring_shift.c
|
||||
Part of Arduino - http://www.arduino.cc/
|
||||
|
||||
Copyright (c) 2005-2006 David A. Mellis
|
||||
@ -24,32 +24,54 @@
|
||||
|
||||
#include "wiring_private.h"
|
||||
|
||||
uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) {
|
||||
uint8_t value = 0;
|
||||
uint8_t i;
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
for (i = 0; i < 8; ++i) {
|
||||
digitalWrite(clockPin, HIGH);
|
||||
if (bitOrder == LSBFIRST)
|
||||
value |= digitalRead(dataPin) << i;
|
||||
else
|
||||
value |= digitalRead(dataPin) << (7 - i);
|
||||
digitalWrite(clockPin, LOW);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val)
|
||||
extern uint32_t shiftIn( uint32_t ulDataPin, uint32_t ulClockPin, uint32_t ulBitOrder )
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t value = 0 ;
|
||||
uint8_t i ;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (bitOrder == LSBFIRST)
|
||||
digitalWrite(dataPin, !!(val & (1 << i)));
|
||||
for ( i=0 ; i < 8 ; ++i )
|
||||
{
|
||||
digitalWrite( ulClockPin, HIGH ) ;
|
||||
|
||||
if ( ulBitOrder == LSBFIRST )
|
||||
{
|
||||
value |= digitalRead( ulDataPin ) << i ;
|
||||
}
|
||||
else
|
||||
digitalWrite(dataPin, !!(val & (1 << (7 - i))));
|
||||
{
|
||||
value |= digitalRead( ulDataPin ) << (7 - i) ;
|
||||
}
|
||||
|
||||
digitalWrite(clockPin, HIGH);
|
||||
digitalWrite(clockPin, LOW);
|
||||
digitalWrite( ulClockPin, LOW ) ;
|
||||
}
|
||||
|
||||
return value ;
|
||||
}
|
||||
|
||||
extern void shiftOut( uint32_t ulDataPin, uint32_t ulClockPin, uint32_t ulBitOrder, uint32_t ulVal )
|
||||
{
|
||||
uint8_t i ;
|
||||
|
||||
for ( i=0 ; i < 8 ; i++ )
|
||||
{
|
||||
if ( ulBitOrder == LSBFIRST )
|
||||
{
|
||||
digitalWrite( ulDataPin, !!(ulVal & (1 << i)) ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
digitalWrite( ulDataPin, !!(ulVal & (1 << (7 - i))) ) ;
|
||||
}
|
||||
|
||||
digitalWrite( ulClockPin, HIGH ) ;
|
||||
digitalWrite( ulClockPin, LOW ) ;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
@ -6,21 +6,21 @@ SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
|
||||
# Rules
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# libchip_sam3s4_gcc_rel.a
|
||||
all: libchip_sam3s4_gcc_dbg.a
|
||||
# libchip_sam3s4c_gcc_rel.a
|
||||
all: libchip_sam3s4c_gcc_dbg.a
|
||||
|
||||
libchip_sam3s4_gcc_dbg.a:
|
||||
libchip_sam3s4c_gcc_dbg.a:
|
||||
@echo --- Making $@
|
||||
@$(MAKE) CHIP=sam3s4 DEBUG=1 $(SUBMAKE_OPTIONS) -f sam3.mk
|
||||
@$(MAKE) CHIP=__SAM3S4C__ DEBUG=1 $(SUBMAKE_OPTIONS) -f sam3.mk
|
||||
|
||||
libchip_sam3s4_gcc_rel.a:
|
||||
libchip_sam3s4c_gcc_rel.a:
|
||||
@echo --- Making $@
|
||||
@$(MAKE) CHIP=sam3s4 $(SUBMAKE_OPTIONS) -f sam3.mk
|
||||
@$(MAKE) CHIP=__SAM3S4C__ $(SUBMAKE_OPTIONS) -f sam3.mk
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo --- Cleaning sam3s4 release and debug
|
||||
@$(MAKE) CHIP=sam3s4 $(SUBMAKE_OPTIONS) -f sam3.mk $@
|
||||
@$(MAKE) CHIP=sam3s4 DEBUG=1 $(SUBMAKE_OPTIONS) -f sam3.mk $@
|
||||
@echo --- Cleaning sam3s4c release and debug
|
||||
@$(MAKE) CHIP=__SAM3S4C__ $(SUBMAKE_OPTIONS) -f sam3.mk $@
|
||||
@$(MAKE) CHIP=__SAM3S4C__ DEBUG=1 $(SUBMAKE_OPTIONS) -f sam3.mk $@
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -9,6 +9,9 @@ ifeq ($(CHIP),)
|
||||
$(error CHIP not defined)
|
||||
endif
|
||||
|
||||
#CHIP_NAME=$(subst __,,$(CHIP))
|
||||
#CHIP_NAME=$(subst __,,$(call lc,$(CHIP)))
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Path
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -18,22 +21,43 @@ OUTPUT_BIN = ../lib
|
||||
|
||||
# Libraries
|
||||
PROJECT_BASE_PATH = ..
|
||||
CMSIS_BASE_PATH = $(PROJECT_BASE_PATH)/../CMSIS/CM3/CoreSupport
|
||||
CMSIS_BASE_PATH = $(PROJECT_BASE_PATH)/../CMSIS/Include
|
||||
|
||||
ifeq ($(CHIP), __SAM3S4C__)
|
||||
CHIP_NAME=sam3s4c
|
||||
CHIP_SERIE=sam3s
|
||||
else ifeq ($(CHIP), __SAM3U4E__)
|
||||
CHIP_NAME=sam3u4e
|
||||
CHIP_SERIE=sam3u
|
||||
else ifeq ($(CHIP), __SAM3N4C__)
|
||||
CHIP_NAME=sam3n4c
|
||||
CHIP_SERIE=sam3n
|
||||
else ifeq ($(CHIP), __SAM3X8H__)
|
||||
CHIP_NAME=sam3x8h
|
||||
CHIP_SERIE=sam3xa
|
||||
else
|
||||
endif
|
||||
|
||||
CMSIS_CHIP_PATH=$(PROJECT_BASE_PATH)/../cmsis/$(CHIP_SERIE)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Files
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
vpath %.h $(PROJECT_BASE_PATH)/include
|
||||
vpath %.c $(PROJECT_BASE_PATH)/source $(CMSIS_BASE_PATH)
|
||||
vpath %.s $(PROJECT_BASE_PATH)/source $(CMSIS_BASE_PATH)
|
||||
vpath %.h $(PROJECT_BASE_PATH)/include $(PROJECT_BASE_PATH)/../cmsis/$(CHIP_SERIE)/include
|
||||
vpath %.c $(PROJECT_BASE_PATH)/source $(CMSIS_BASE_PATH) $(CMSIS_CHIP_PATH)/source/templates $(CMSIS_CHIP_PATH)/source/templates
|
||||
|
||||
VPATH+=$(PROJECT_BASE_PATH)/source
|
||||
VPATH+=$(CMSIS_BASE_PATH)
|
||||
VPATH+=$(CMSIS_CHIP_PATH)/include
|
||||
VPATH+=$(CMSIS_CHIP_PATH)/source/templates
|
||||
VPATH+=$(CMSIS_CHIP_PATH)/source/templates/gcc
|
||||
|
||||
INCLUDES = -I$(PROJECT_BASE_PATH)
|
||||
INCLUDES += -I$(PROJECT_BASE_PATH)/include
|
||||
INCLUDES += -I$(CMSIS_BASE_PATH)
|
||||
INCLUDES += -I$(CMSIS_CHIP_PATH)/include
|
||||
INCLUDES += -I$(CMSIS_CHIP_PATH)/source/templates
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
ifdef DEBUG
|
||||
@ -51,19 +75,20 @@ include $(TOOLCHAIN).mk
|
||||
#-------------------------------------------------------------------------------
|
||||
ifdef DEBUG
|
||||
OUTPUT_OBJ=debug
|
||||
OUTPUT_LIB=$(LIBNAME)_$(CHIP)_$(TOOLCHAIN)_dbg.a
|
||||
OUTPUT_LIB=$(LIBNAME)_$(CHIP_NAME)_$(TOOLCHAIN)_dbg.a
|
||||
else
|
||||
OUTPUT_OBJ=release
|
||||
OUTPUT_LIB=$(LIBNAME)_$(CHIP)_$(TOOLCHAIN)_rel.a
|
||||
OUTPUT_LIB=$(LIBNAME)_$(CHIP_NAME)_$(TOOLCHAIN)_rel.a
|
||||
endif
|
||||
|
||||
OUTPUT_PATH=$(OUTPUT_OBJ)_$(CHIP)
|
||||
OUTPUT_PATH=$(OUTPUT_OBJ)_$(CHIP_NAME)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# C source files and objects
|
||||
#-------------------------------------------------------------------------------
|
||||
C_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.c)
|
||||
C_SRC+=$(wildcard $(CMSIS_BASE_PATH)/*.c)
|
||||
C_SRC+=$(wildcard $(CMSIS_CHIP_PATH)/*.c)
|
||||
C_SRC+=$(wildcard $(CMSIS_CHIP_PATH)/gcc*.c)
|
||||
|
||||
C_OBJ_TEMP=$(patsubst %.c, %.o, $(notdir $(C_SRC)))
|
||||
|
||||
|
@ -103,7 +103,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>GenLowLevelInterface</name>
|
||||
<state>1</state>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GEndianModeBE</name>
|
||||
@ -164,7 +164,7 @@
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCDefines</name>
|
||||
<state>__sam3s4c__</state>
|
||||
<state>__SAM3S4C__</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPreprocFile</name>
|
||||
@ -295,6 +295,7 @@
|
||||
<name>CCIncludePath2</name>
|
||||
<state>$PROJ_DIR$\..</state>
|
||||
<state>$PROJ_DIR$\..\include</state>
|
||||
<state>$PROJ_DIR$\..\source\templates</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCStdIncCheck</name>
|
||||
@ -3822,9 +3823,6 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\cmsis\sam3s\include\sam3s4c.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\cmsis\sam3s\include\system_sam3s.h</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
<name>source</name>
|
||||
@ -3832,12 +3830,6 @@
|
||||
<name>templates</name>
|
||||
<group>
|
||||
<name>iar</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\cmsis\sam3s\source\templates\iar\exceptions.c</name>
|
||||
<excluded>
|
||||
<configuration>Debug</configuration>
|
||||
</excluded>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\cmsis\sam3s\source\templates\iar\startup_sam3s.c</name>
|
||||
</file>
|
||||
@ -3851,6 +3843,9 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\cmsis\sam3s\source\templates\system_sam3s.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\cmsis\sam3s\source\templates\system_sam3s.h</name>
|
||||
</file>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
|
@ -10,7 +10,23 @@
|
||||
<project>
|
||||
<path>$WS_DIR$\..\..\..\cores\sam\validation\build_iar\test.ewp</path>
|
||||
</project>
|
||||
<batchBuild/>
|
||||
<batchBuild>
|
||||
<batchDefinition>
|
||||
<name>all_debug_sam3s</name>
|
||||
<member>
|
||||
<project>libsam</project>
|
||||
<configuration>Debug</configuration>
|
||||
</member>
|
||||
<member>
|
||||
<project>libarduino</project>
|
||||
<configuration>Debug</configuration>
|
||||
</member>
|
||||
<member>
|
||||
<project>test</project>
|
||||
<configuration>Debug</configuration>
|
||||
</member>
|
||||
</batchDefinition>
|
||||
</batchBuild>
|
||||
</workspace>
|
||||
|
||||
|
||||
|
@ -1,17 +1,14 @@
|
||||
/*
|
||||
%atmel_license%
|
||||
*/
|
||||
|
||||
#ifndef _LIB_SAM3S_
|
||||
#define _LIB_SAM3S_
|
||||
|
||||
/*
|
||||
* Peripherals registers definitions
|
||||
* Core and peripherals registers definitions
|
||||
*/
|
||||
#if defined sam3s4
|
||||
#elif defined sam3s2
|
||||
#elif defined sam3s1
|
||||
#else
|
||||
#warning Library does not support the specified chip, specifying sam3s4.
|
||||
#define sam3s4
|
||||
#endif
|
||||
#include "include/SAM3S.h"
|
||||
#include "include/sam3.h"
|
||||
|
||||
/** Define MAX number of Interrupts: (IRQn_Type+1) + 8 for CM3 core */
|
||||
#define EXTERNAL_NUM_INTERRUPTS (UDP_IRQn+1+8)
|
||||
@ -19,43 +16,29 @@
|
||||
/* Define attribute */
|
||||
#if defined ( __GNUC__ ) /* GCC CS3 */
|
||||
#define WEAK __attribute__ ((weak))
|
||||
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
|
||||
#define WEAK __weak
|
||||
#endif
|
||||
|
||||
/* Define NO_INIT attribute */
|
||||
#if defined ( __GNUC__ )
|
||||
#define NO_INIT
|
||||
#elif defined ( __ICCARM__ )
|
||||
#define NO_INIT __no_init
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Core
|
||||
*/
|
||||
|
||||
#include "include/exceptions.h"
|
||||
|
||||
/*
|
||||
* Peripherals
|
||||
*/
|
||||
#include "include/acc.h"
|
||||
#include "include/adc.h"
|
||||
#include "include/async.h"
|
||||
#include "include/crccu.h"
|
||||
#include "include/dacc.h"
|
||||
#include "include/efc.h"
|
||||
#include "include/flashd.h"
|
||||
#include "include/pio.h"
|
||||
//#include "include/pio_it.h"
|
||||
#include "include/pio_capture.h"
|
||||
#include "include/pmc.h"
|
||||
#include "include/pwmc.h"
|
||||
#include "include/rtc.h"
|
||||
#include "include/rtt.h"
|
||||
#include "include/spi.h"
|
||||
#include "include/spi_pdc.h"
|
||||
#include "include/ssc.h"
|
||||
#include "include/tc.h"
|
||||
#include "include/twi.h"
|
||||
#include "include/twid.h"
|
||||
#include "include/usart.h"
|
||||
#include "include/wdt.h"
|
||||
|
||||
|
@ -1,75 +1,95 @@
|
||||
/*
|
||||
%atmel_license%
|
||||
*/
|
||||
|
||||
/** \file cmsis example */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <compiler.h>
|
||||
#include <board.h>
|
||||
#include "conf_board.h"
|
||||
|
||||
volatile uint32_t msTicks = 0; /* counts 1ms timeTicks */
|
||||
//! counts 1ms timeTicks
|
||||
volatile uint32_t dw_ms_ticks = 0;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
SysTick_Handler
|
||||
*----------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \brief SysTick_Handler.
|
||||
*/
|
||||
void SysTick_Handler(void)
|
||||
{
|
||||
msTicks++; /* increment counter necessary in Delay() */
|
||||
// increment counter necessary in delay()
|
||||
dw_ms_ticks++;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
delays number of tick Systicks (happens every 1 ms)
|
||||
*----------------------------------------------------------------------------*/
|
||||
__INLINE static void Delay(uint32_t dlyTicks)
|
||||
/**
|
||||
* \brief delays number of tick Systicks (happens every 1 ms)
|
||||
*/
|
||||
__INLINE static void delay_ms(uint32_t dw_dly_ticks)
|
||||
{
|
||||
uint32_t curTicks;
|
||||
uint32_t dw_cur_ticks;
|
||||
|
||||
curTicks = msTicks;
|
||||
while ((msTicks - curTicks) < dlyTicks);
|
||||
dw_cur_ticks = dw_ms_ticks;
|
||||
while ((dw_ms_ticks - dw_cur_ticks) < dw_dly_ticks);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
configer LED pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
__INLINE static void LED_Config(void)
|
||||
/**
|
||||
* \brief configer LED pins
|
||||
*/
|
||||
__INLINE static void led_config(void)
|
||||
{
|
||||
LED0_PIO->PIO_PER = LED0_MASK; /* Setup Pin PA19 for LED */
|
||||
// Setup LED Pin
|
||||
LED0_PIO->PIO_PER = LED0_MASK;
|
||||
LED0_PIO->PIO_OER = LED0_MASK;
|
||||
LED0_PIO->PIO_PUDR = LED0_MASK;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Switch on LEDs
|
||||
*----------------------------------------------------------------------------*/
|
||||
__INLINE static void LED_On(uint32_t led)
|
||||
/**
|
||||
* \brief Switch on LED
|
||||
*/
|
||||
__INLINE static void led_on(uint32_t dw_led)
|
||||
{
|
||||
LED0_PIO->PIO_CODR = led; /* Turn On LED */
|
||||
// Turn On LED
|
||||
LED0_PIO->PIO_CODR = dw_led;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Switch off LEDs
|
||||
*----------------------------------------------------------------------------*/
|
||||
__INLINE static void LED_Off(uint32_t led)
|
||||
/**
|
||||
* \brief Switch off LED
|
||||
*/
|
||||
__INLINE static void led_off(uint32_t dw_led)
|
||||
{
|
||||
LED0_PIO->PIO_SODR = led; /* Turn Off LED */
|
||||
// Turn Off LED
|
||||
LED0_PIO->PIO_SODR = dw_led;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
MAIN function
|
||||
*----------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \brief Application entry point.
|
||||
*
|
||||
* \return Unused (ANSI-C compatibility).
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
SystemInit();
|
||||
SystemInit();
|
||||
|
||||
WDT->WDT_MR = WDT_MR_WDDIS;
|
||||
WDT->WDT_MR = WDT_MR_WDDIS;
|
||||
|
||||
if (SysTick_Config(SystemCoreClock / 1000)) { /* Setup SysTick Timer for 1 msec interrupts */
|
||||
while (1); /* Capture error */
|
||||
}
|
||||
// Setup SysTick Timer for 1 msec interrupts
|
||||
if (SysTick_Config(SystemCoreClock / 1000)) {
|
||||
// Capture error
|
||||
while (1);
|
||||
}
|
||||
|
||||
LED_Config();
|
||||
led_config();
|
||||
|
||||
// Flash the LED
|
||||
while(1) {
|
||||
LED_On (LED0_MASK); /* Turn on the LED. */
|
||||
Delay (1000); /* delay 100 Msec */
|
||||
LED_Off (LED0_MASK); /* Turn off the LED. */
|
||||
Delay (1000); /* delay 100 Msec */
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* %ATMEL_LICENCE% */
|
||||
/* $asf_license$ */
|
||||
|
||||
#ifndef _SAM3N_ADC_COMPONENT_
|
||||
#define _SAM3N_ADC_COMPONENT_
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* %ATMEL_LICENCE% */
|
||||
/* $asf_license$ */
|
||||
|
||||
#ifndef _SAM3N_CHIPID_COMPONENT_
|
||||
#define _SAM3N_CHIPID_COMPONENT_
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* %ATMEL_LICENCE% */
|
||||
/* $asf_license$ */
|
||||
|
||||
#ifndef _SAM3N_DACC_COMPONENT_
|
||||
#define _SAM3N_DACC_COMPONENT_
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user