os_core.txt

来自「在ATmega16芯片上移植的ucosii系统」· 文本 代码 · 共 69 行

TXT
69
字号
===============================================================================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 + =
减小字号Ctrl + -
显示快捷键?