📄 os.nut
字号:
---- Copyright (C) 2004-2005 by egnite Software GmbH. All rights reserved.---- Redistribution and use in source and binary forms, with or without-- modification, are permitted provided that the following conditions-- are met:---- 1. Redistributions of source code must retain the above copyright-- notice, this list of conditions and the following disclaimer.-- 2. Redistributions in binary form must reproduce the above copyright-- notice, this list of conditions and the following disclaimer in the-- documentation and/or other materials provided with the distribution.-- 3. Neither the name of the copyright holders nor the names of-- contributors may be used to endorse or promote products derived-- from this software without specific prior written permission.---- THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS-- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS-- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE-- SOFTWARE GMBH OR CONTRIBUTORS 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.---- For additional information see http://www.ethernut.de/---- Operating system functions---- $Log: os.nut,v $-- Revision 1.12 2005/10/24 09:58:21 haraldkipp-- Generalized description for NUT_CPU_FREQ.---- Revision 1.11 2005/10/04 05:44:29 hwmaier-- Added support for separating stack and conventional heap as required by AT09CAN128 MCUs---- Revision 1.10 2005/07/26 16:13:24 haraldkipp-- Target dependent modules moved to arch.---- Revision 1.9 2005/02/16 20:02:07 haraldkipp-- Typo of NUTDEBUG corrected.-- Philipp Blum's tracer added.---- Revision 1.8 2004/11/24 14:48:34 haraldkipp-- crt/crt.nut---- Revision 1.7 2004/11/08 18:58:58 haraldkipp-- Configurable stack sizes---- Revision 1.6 2004/09/25 15:42:09 drsung-- Removed configuration for separate interrupt stack,-- it's now in conf/dev/dev.nut---- Revision 1.5 2004/09/01 14:07:15 haraldkipp-- Cleaned up memory configuration---- Revision 1.4 2004/08/18 16:05:38 haraldkipp-- Use consistent directory structure---- Revision 1.3 2004/08/18 13:46:10 haraldkipp-- Fine with avr-gcc---- Revision 1.2 2004/08/03 15:09:31 haraldkipp-- Another change of everything---- Revision 1.1 2004/06/07 16:38:43 haraldkipp-- First release----nutos ={ -- -- Initialization -- { name = "nutos_init", brief = "Initialization", description = "This module is automatically called after booting the system. ".. "It will initialize memory and timer hardware and start the ".. "Nut/OS idle thread, which in turn starts the application's ".. "main routine in a separate thread.", sources = { "nutinit.c" }, targets = { "nutinit.o" } }, -- -- Memory management -- { name = "nutos_heap", brief = "Memory management", provides = { "NUT_HEAPMEM" }, sources = { "heap.c" }, options = { { macro = "NUTMEM_SIZE", brief = "Memory Size", description = "Number of bytes available in fast data memory. On ".. "most platforms this value specifies the total number ".. "of bytes available in RAM.\n\n".. "On Harvard architectures this value specifies the size ".. "of the data memory. It will be occupied by global ".. "variables and static data. Any remaining space will ".. "be added to the Nut/OS heap during system initialization.\n".. "When running on an AVR MCU, set this to size of the ".. "on-chip SRAM, e.g. 4096 for the ATmega128.", default = "4096", file = "include/cfg/memory.h" }, { macro = "NUTMEM_START", brief = "Memory Start", description = "First address of fast data memory.", file = "include/cfg/memory.h" }, { macro = "NUTMEM_RESERVED", brief = "Reserved Memory Size", description = "Number of bytes reserved for special purposes.\n".. "Right now this is used with the AVR platform only. ".. "The specified number of bytes may be used by a ".. "device driver when the external memory interface ".. " is disabled.", requires = { "HW_MCU_AVR" }, flavor = "booldata", file = "include/cfg/memory.h", makedefs = { "NUTMEM_RESERVED" } }, { macro = "NUTXMEM_SIZE", brief = "Extended Memory Size", description = "Number of bytes available in external data memory.\n\n".. "The result of enabling this item is platform specific.".. "With AVR systems it will enable the external memory ".. "interface of the CPU, even if the value is set to zero.", provides = { "NUTXDATAMEM_SIZE" }, flavor = "booldata", file = "include/cfg/memory.h" }, { macro = "NUTXMEM_START", brief = "Extended Memory Start", description = "First address of external data memory.", requires = { "NUTXDATAMEM_SIZE" }, file = "include/cfg/memory.h" }, { macro = "NUTBANK_COUNT", brief = "Memory Banks", description = "Number of memory banks.\n\n".. "Specially on 8-bit systems the address space is typically ".. "very limited. To overcome this, some hardware implementations ".. "like the Ethernut 2 reference design provide memory banking. ".. "Right now this is supported for the AVR platform only.", requires = { "HW_MCU_AVR" }, provides = { "NUTBANK_COUNT" }, flavor = "booldata", file = "include/cfg/memory.h" }, { macro = "NUTBANK_START", brief = "Banked Memory Start", description = "First address of the banked memory area.", requires = { "NUTBANK_COUNT" }, file = "include/cfg/memory.h" }, { macro = "NUTBANK_SIZE", brief = "Banked Memory Size", description = "Size of the banked memory area.", requires = { "NUTBANK_COUNT" }, file = "include/cfg/memory.h" }, { macro = "NUTBANK_SR", brief = "Bank Select Register", description = "Address of the bank select register.", requires = { "NUTBANK_COUNT" }, file = "include/cfg/memory.h" }, { macro = "NUTMEM_STACKHEAP", brief = "Separate heap for stack", description = "This option enables use of a separate heap for stack.\n\n".. "When a thread is created with this option enabled, it's stack is ".. "allocated on a special \"thread stack heap\" which is kept in ".. "internal memory before the data segments instead of using the \"standard ".. "heap\" which is typically located in external memory after the data segments. \n".. "\n".. "Using this option is a must for silicon revisions C of the AT90CAN128 MCU \n".. "as the device misfunctions when code stack is in XRAM. Refer to \n".. "AT90CAN128 Datasheet Rev. 4250F朇AN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -