Nut/OS  5.0.5
API Reference
cortexM3.h
Go to the documentation of this file.
00001 #ifndef _ARCH_CM3_CORTEXM3_H_
00002 #define _ARCH_CM3_CORTEXM3_H_
00003 
00004 /*
00005  * Copyright (C) 2010 by Ulrich Prinz (uprinz2@netscape.net)
00006  *
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  *
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  * 3. Neither the name of the copyright holders nor the names of
00019  *    contributors may be used to endorse or promote products derived
00020  *    from this software without specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00025  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00026  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00027  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00028  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00029  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00030  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00031  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00032  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00033  * SUCH DAMAGE.
00034  *
00035  * For additional information see http://www.ethernut.de/
00036  */
00037 
00038 /*
00039  * \verbatim
00040  * $Id: cortexM3.h $
00041  * \endverbatim
00042  */
00043 
00044 #include <stdint.h>
00045 #include <cfg/arch.h>
00046 #include <cfg/os.h>
00047 
00048 #if defined(MCU_SAM3U)
00049 #include <arch/cm3/atmel/sam3u.h>
00050 #elif defined(MCU_STM32)
00051 #include <arch/cm3/stm/stm32xxxx.h>
00052 #elif defined(MCU_LPC176x)
00053 #include <arch/cm3/nxp/lpc176x.h>
00054 #elif defined(MCU_LPC177x_8x)
00055 #include <arch/cm3/nxp/lpc177x_8x.h>
00056 #else
00057 #warning "Unknown CM3 family"
00058 #endif
00059 
00060 /* Export initial startup vectors */
00061 #if defined(NUTDEBUG_RAM)
00062 extern void (* g_pfnVectors[])(void *);
00063 #else
00064 extern void (* const g_pfnVectors[])(void *);
00065 #endif
00066 
00067 extern int Cortex_ResetCause(void);
00068 extern void Cortex_Reset(void);
00069 extern void Cortex_Start(void);
00070 extern void Cortex_IntInit(void);
00071 
00072 extern void CortexExceptHandler(int state);
00073 
00076 
00077 #endif  /* _ARCH_CM3_CORTEXM3_H_ */