⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_core.txt

📁 在ATmega16芯片上移植的ucosii系统
💻 TXT
字号:
===============================================================================Out-of-memory error when compiling OS_CORE.COn some systems with some combinations of DMAKE and either COMMAND.COM orCMD.EXE as a command interpreter an out-of-memory error will occur whencompiling OS_CORE.C.The compiler appears to choke on the definition of the OSUnMapTbl[] array nearthe start of the file.  Apparently the compiler doesn't like initializingan array of this size (256 elements).  To fix the problem break the definitioninto two separate arrays and then initialize OSUnMapTbl[] in OSInit().Here are step-by-step instructions for working around this problem if youhave it.1) Copy UCOS_II.H from the SOURCE directory to the PORT directory.    > cd \micrium\software\ucos-ii\ports\80x86\dos\l\pacc751\amr    > copy \micrium\software\ucos-ii\source\ucos_ii.h .   Edit UCOS_II.H and change the following line (line 540):    extern  INT8U  const OSUnMapTbl[256];   to    extern  INT8U  OSUnMapTbl[256];   2) Copy OS_CORE.C from the SOURCE directory to the PORT directory.    > copy \micrium\software\ucos-ii\source\os_core.c .   Edit OS_CORE.C and replace the 18 lines that initialize the   OSUnMapTbl[] array (near the top of the file) with the following   single line:    INT8U  OSUnMapTbl[256];   Then add the following lines to the beginning of the OSInit   routine (which can also be found near the beginning of the file):    int i;    INT8U  OSUnMapTbl1[] = {    0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0     };    INT8U  OSUnMapTbl2[] = {    7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,    4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0     };    for(i=0; i<128; i++) {          OSUnMapTbl[i] = OSUnMapTbl1[i];          OSUnMapTbl[i+128] = OSUnMapTbl2[i];    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -