[sam] led blink working on SAM3U-EK using validation app

This commit is contained in:
Thibaut VIARD 2011-09-13 11:18:38 +02:00
parent d287bba7d1
commit b014d9eacd
5 changed files with 13 additions and 11 deletions

4
hardware/sam/sam.bat Normal file
View File

@ -0,0 +1,4 @@
start "libsam" /d"system\libsam\build_gcc" /max "cd"
start "libarduino" /d"cores\sam\build_gcc" /max "cd"
start "libvariant sam3u-ek" /d"variants\sam3u_ek\build_gcc" /max "cd"
start "test" /d"cores\sam\validation\build_gcc" /max "cd"

View File

@ -61,7 +61,6 @@ extern uint32_t _ezero;
/** \cond DOXYGEN_SHOULD_SKIP_THIS */
extern int main( void ) ;
/** \endcond */
void ResetException( void ) ;
extern void __libc_init_array( void ) ;
/*------------------------------------------------------------------------------

View File

@ -31,9 +31,9 @@ extern "C" {
#ifdef __GNUC__
/* Cortex-M3 core handlers */
extern void Reset_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
//extern void Reset_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
extern void NMI_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
extern void HardFault_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
//extern void HardFault_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
extern void MemManage_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
extern void BusFault_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
extern void UsageFault_Handler( void ) __attribute__ ((weak, alias ("Dummy_Handler"))) ;
@ -77,9 +77,9 @@ extern void UDPHS_IrqHandler( void ) __attribute__ ((weak, alias ("Dummy_Handler
#ifdef __ICCARM__
/* Cortex-M3 core handlers */
#pragma weak Reset_Handler=Dummy_Handler
//#pragma weak Reset_Handler=Dummy_Handler
#pragma weak NMI_Handler=Dummy_Handler
#pragma weak HardFault_Handler=Dummy_Handler
//#pragma weak HardFault_Handler=Dummy_Handler
#pragma weak MemManage_Handler=Dummy_Handler
#pragma weak BusFault_Handler=Dummy_Handler
#pragma weak UsageFault_Handler=Dummy_Handler

View File

@ -46,7 +46,6 @@ extern uint32_t _ezero;
/** \cond DOXYGEN_SHOULD_SKIP_THIS */
extern int main( void ) ;
/** \endcond */
void ResetException( void ) ;
extern void __libc_init_array( void ) ;
/*------------------------------------------------------------------------------
@ -58,7 +57,7 @@ IntFunc exception_table[] = {
/* Configure Initial Stack Pointer, using linker-generated symbols */
(IntFunc)(&pdwStack[STACK_SIZE-1]),
ResetException,
Reset_Handler,
NMI_Handler,
HardFault_Handler,
MemManage_Handler,
@ -113,7 +112,7 @@ IntFunc exception_table[] = {
* \brief This is the code that gets called on processor reset.
* To initialize the device, and call the main() routine.
*/
void ResetException( void )
void Reset_Handler( void )
{
uint32_t *pSrc, *pDest ;

View File

@ -10,7 +10,7 @@
extern const PinDescription g_APinDescription[]=
{
// LEDS, 0..2
{ PIOB, PIO_PB0, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT }, // LED BLUE
{ PIOB, PIO_PB0, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT }, // LED BLUE
{ PIOB, PIO_PB1, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT }, // LED GREEN
{ PIOB, PIO_PB2, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT }, // LED RED
@ -23,8 +23,8 @@ extern const PinDescription g_APinDescription[]=
{ PIOA, PIO_PA11A_URXD|PIO_PA12A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT }, // All UART pins
// Push buttons, 7..8
{ PIOA, PIO_PA18, ID_PIOA, PIO_INPUT, PIO_PULLUP | PIO_DEBOUNCE | PIO_IT_RISE_EDGE }, // PB_LEFT
{ PIOA, PIO_PA19, ID_PIOA, PIO_INPUT, PIO_PULLUP | PIO_DEBOUNCE | PIO_IT_FALL_EDGE }, // PB_RIGHT
{ PIOA, PIO_PA18, ID_PIOA, PIO_INPUT, PIO_PULLUP | PIO_DEGLITCH }, // PB_LEFT
{ PIOA, PIO_PA19, ID_PIOA, PIO_INPUT, PIO_PULLUP | PIO_DEGLITCH }, // PB_RIGHT
// MCI (SDCARD), 9..19
{ PIOA, PIO_PA25, ID_PIOA, PIO_INPUT, PIO_PULLUP }, // MCI Card Detect