nutinit.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2001-2005 by egnite Software GmbH. All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the copyright holders nor the names of
00014  *    contributors may be used to endorse or promote products derived
00015  *    from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00018  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00019  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00020  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00021  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00022  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00023  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00024  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00025  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00026  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00027  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00028  * SUCH DAMAGE.
00029  *
00030  * For additional information see http://www.ethernut.de/
00031  *
00032  */
00033 
00034 /*
00035  * $Log: nutinit.c,v $
00036  * Revision 1.16  2008/08/11 07:00:34  haraldkipp
00037  * BSD types replaced by stdint types (feature request #1282721).
00038  *
00039  * Revision 1.15  2005/08/02 17:47:04  haraldkipp
00040  * Major API documentation update.
00041  *
00042  * Revision 1.14  2005/07/26 15:58:49  haraldkipp
00043  * Cygwin added.
00044  * Linux EEPROM support moved to dev.
00045  *
00046  * Revision 1.13  2005/05/27 17:30:25  drsung
00047  * Platform dependant files were moved to /arch directory.
00048  *
00049  * Revision 1.12  2005/02/10 07:06:51  hwmaier
00050  * Changes to incorporate support for AT90CAN128 CPU
00051  *
00052  * Revision 1.11  2005/01/22 19:29:56  haraldkipp
00053  * Initializing ms62_5 will move it to the data segment. Still no final
00054  * solution to make sure it's kept in AVR's internal memory. But helps
00055  * in most cases.
00056  *
00057  * Revision 1.10  2005/01/13 18:56:04  haraldkipp
00058  * Moved ms62_5 counter from timer.c to make sure this is located in internal
00059  * RAM (AVR platforms). This fixes the wrong baudrate bug for applications
00060  * occupying all internal RAM.
00061  *
00062  * Revision 1.9  2004/08/04 23:10:30  freckle
00063  * added an avr-libc compatible (but yet uncomplete) eeprom simulation that
00064  * uses file 'eeprom.bin' in the current directory to store eeprom content
00065  *
00066  * Revision 1.8  2004/04/07 12:13:58  haraldkipp
00067  * Matthias Ringwald's *nix emulation added
00068  *
00069  * Revision 1.7  2004/03/16 16:48:45  haraldkipp
00070  * Added Jan Dubiec's H8/300 port.
00071  *
00072  * Revision 1.6  2004/03/03 17:52:26  drsung
00073  * New field 'hostname' added to structure confos.
00074  *
00075  * Revision 1.5  2004/02/18 13:51:06  drsung
00076  * Changed memory calculations to use u_short. Makes more sense than using signed integers, especially on hardware with more than 32KB static RAM...
00077  *
00078  * Revision 1.4  2003/12/15 19:30:19  haraldkipp
00079  * Thread termination support
00080  *
00081  * Revision 1.3  2003/12/05 22:39:46  drsung
00082  * New external RAM handling
00083  *
00084  * Revision 1.2  2003/09/29 16:35:25  haraldkipp
00085  * Replaced XRAMEND by NUTRAMEND
00086  *
00087  * Revision 1.1.1.1  2003/05/09 14:41:51  haraldkipp
00088  * Initial using 3.2.1
00089  *
00090  * Revision 1.4  2003/05/06 18:53:43  harald
00091  * ICCAVR port
00092  *
00093  * Revision 1.3  2003/04/21 17:08:34  harald
00094  * Local var removed from naked function
00095  *
00096  * Revision 1.2  2003/03/31 14:39:05  harald
00097  * Fix GCC different handling of main
00098  *
00099  * Revision 1.1  2003/02/04 18:17:07  harald
00100  * Version 3 released
00101  *
00102  */
00103 
00104 #define __NUTINIT__
00105 #include <compiler.h>
00106 #include <sys/heap.h>
00107 #include <sys/thread.h>
00108 #include <sys/timer.h>
00109 
00110 #include <sys/confos.h>
00111 #include <string.h>
00112 
00117 
00129 volatile uint8_t ms62_5 = 0;
00130 
00133 #if defined(__AVR__)
00134 #include "../arch/avr/os/nutinit.c"
00135 #elif defined(__arm__)
00136 #include "../arch/arm/os/nutinit.c"
00137 #elif defined(__H8300H__) || defined(__H8300S__)
00138 #include "../arch/h8300h/os/nutinit.c"
00139 #elif defined(__m68k__)
00140 #include "../arch/m68k/os/nutinit.c"
00141 #elif defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__)
00142 // avoid stdio nut wrapper */
00143 #define NO_STDIO_NUT_WRAPPER
00144 #include "../arch/unix/os/nutinit.c"
00145 #include "../arch/unix/os/options.c"
00146 #include "../arch/unix/dev/eeprom.c"
00147 #endif
00148 

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/