Files
wolfssl/IDE/IAR-EWARM/Projects/common/minimum-startup.c

53 lines
1.6 KiB
C
Raw Normal View History

2015-06-01 20:02:20 +09:00
/* minimum-startup.c
2014-05-12 13:36:20 -07:00
*
2015-01-08 09:39:04 -07:00
* Copyright (C) 2006-2015 wolfSSL Inc.
2014-05-12 13:36:20 -07:00
*
2015-01-06 12:14:15 -07:00
* This file is part of wolfSSL. (formerly known as CyaSSL)
2014-05-12 13:36:20 -07:00
*
2015-01-06 12:14:15 -07:00
* wolfSSL is free software; you can redistribute it and/or modify
2014-05-12 13:36:20 -07:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
2015-01-06 12:14:15 -07:00
* wolfSSL is distributed in the hope that it will be useful,
2014-05-12 13:36:20 -07:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
2015-06-01 20:02:20 +09:00
#include <stdint.h>
#pragma language=extended
2014-05-12 13:36:20 -07:00
2015-06-01 20:02:20 +09:00
extern void __iar_program_start(void);
static void Reset(void)
{
__iar_program_start();
2014-05-12 13:36:20 -07:00
}
2015-06-01 20:02:20 +09:00
static void Nmi (void){ while(1) ; }
static void Fault(void){ while(1) ; }
static unsigned long long Stack[256*4*16] @ ".noinit";
typedef union
{
void (*Handler)(void);
uint32_t Ptr;
} Vector;
__root const Vector __vector_table[100] @ ".intvec" =
{
{ .Ptr = (uint32_t)Stack + sizeof(Stack) },
// stack top
Reset, // reset
Nmi, // NMI
Fault, // hard fault
Fault, // MPU fault
Fault, // bus fault
Fault, // usage fault
};
2014-05-12 13:36:20 -07:00