{"id":2726,"date":"2019-07-09T09:40:17","date_gmt":"2019-07-09T09:40:17","guid":{"rendered":""},"modified":"2019-07-09T17:41:49","modified_gmt":"2019-07-09T09:41:49","slug":"c51%e5%8d%95%e7%89%87%e6%9c%ba%e4%b8%b2%e5%8f%a3%e9%a9%b1%e5%8a%a8%e8%ae%be%e8%ae%a1%e7%9a%84%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2726","title":{"rendered":"C51\u5355\u7247\u673a\u4e32\u53e3\u9a71\u52a8\u8bbe\u8ba1\u7684\u5e38\u89c1\u95ee\u9898\u89e3\u6790"},"content":{"rendered":"
\n\t1\u3001C51\u4e32\u53e3\u7684\u5f0a\u7aef\u3002<\/p>\n
\n\tC51\u7684\u4e32\u53e3\u6536\u53d1\u7a0b\u5e8f\u76f8\u4fe1\u5927\u5bb6\u90fd\u5f88\u719f\u6089\u4e86\uff0c\u5728hello.c\u91cc\u9762\u6709\u5f88\u7b80\u5355\u7684\u4f8b\u7a0b\uff0c\u4e0d\u77e5 \u9053\u5927\u5bb6\u6709\u6ca1\u6709\u6ce8\u610f\u5230hello.c\u91cc\u9762\u6709\u4e00\u53e5\u5f88\u4e0d\u663e\u773c\u7684\u8bed\u53e5“TI<\/u> = 1;” \u5f53\u4f60\u5728\u521d\u59cb\u5316\u4e32\u53e3\u7684\u65f6\u5019\u5982\u679c\u4f60\u4e0d\u8ba9TI = 1\u7684\u8bdd\uff0c\u76f8\u4fe1\u4f60\u770b\u5230\u4f60\u7684\u6570\u636e\u6c38\u8fdc\u90fd\u53d1\u4e0d\u51fa\u53bb\uff0cdebug\u91cc\u8fd0\u884cstop\u4f1a\u770b\u5230\u7a0b\u5e8f\u5b9e\u9645\u4e0a\u662f\u8fdb\u884c\u5230\u4e86while\uff08\uff01TI\uff09;\u7684\u8bed\u53e5\u5904\u8fdb\u5165\u6b7b\u5faa\u73af\u4e86\u3002<\/p>\n \n\t\u6df1 \u5165\u4e00\u70b9\u7684\u770b\uff0c\u53ef\u4ee5\u5728keil<\/u>\/c51\/lib\u4e0b\u53d1\u73b0putchar\u51fd\u6570\u7684\u539f\u6587\u4ef6\uff0c\u548c\u8bb8\u591a\u8f6f\u4ef6\u4e32\u53e3\u9a71\u52a8\u4e00\u6837printf\uff08\uff09\u90fd\u662f\u53cd\u590d\u8c03\u7528putchar\uff08\uff09 \u6765\u5b9e\u73b0\u7684\uff0c\u6240\u4ee5putchar\u51fd\u6570\u662f\u6211\u4eec\u8fdb\u5165\u6b7b\u5faa\u73af\u7684\u75c7\u7ed3\u3002putchar\u51fd\u6570\u5f88\u7b80\u5355\uff0c\u5728\u5176\u4e2d\u6709\u4e00\u4e2a\u6700\u5c0f\u5b9e\u73b0\u65b9\u5f0f\uff0c\u6211\u5c31\u4ee5\u8fd9\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\u6765\u89e3\u91ca\u3002<\/p>\n \n\t<\/p>\n \n\tchar putchar\uff08char c\uff09{<\/p>\n \n\twhile\uff08\uff01TI\uff09;<\/p>\n \n\tTI = 0;<\/p>\n \n\treturn\uff08SBUF = c\uff09;<\/p>\n \n\t}<\/p>\n \n\t\u5f88 \u663e\u7136\uff0cC51\u4e2d\u7f3a\u7701\u7684putchar\u51fd\u6570\u662f\u9760\u67e5\u8be2\u5e76\u7b49\u5f85TI\u8fd9\u4e2a\u6807\u5fd7\u4f4d\u6765\u5b9e\u73b0\u4e32\u53e3\u53d1\u9001\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5728putchar\u51fd\u6570\u4e2d\u786e\u5b9e\u53d1\u9001\u4e86\u6240\u6709\u7684\u6570\u636e\uff0c\u4f46\u662f\u6bcf \u53d1\u9001\u4e00\u4e2aBYTE<\/u>\u524d\u90fd\u7b49\u5f85\u4e86\u4e00\u6bb5\u65f6\u95f4\u3002\u8fd9\u5c31\u4e0d\u96be\u7406\u89e3\u4e3a\u4ec0\u4e48\u5728\u521d\u59cb\u5316\u4e32\u53e3\u7684\u65f6\u5019\u5fc5\u987b\u628aTI\u7f6e\u4f4d\u4e86\uff0c\u65e0\u975e\u662f\u60f3\u8ba9\u53d1\u7b2c\u4e00\u4e2a\u6570\u636e\u7684\u65f6\u5019\u8ba9putchar\u51fd\u6570\u80fd\u987a\u5229 \u6267\u884c\u3002<\/p>\n \n\t\u6ce8\u610f\uff0c\u8fd9\u91cc\u6709\u4e00\u4e2a\u95ee\u9898\u51fa\u73b0\u4e86\uff0c\u6211\u4eec\u53ef\u4ee5\u628aUART<\/u>\u7406\u89e3\u4e3a\u4e00\u4e2a\u72ec\u7acb\u7684\u5916\u8bbe\uff0c\u5728\u4e00\u6b21\u6570\u636e\u88c5\u8ba2\u540e\u5c31\u5e94\u8be5\u4ea4\u7ed9UART\u81ea\u52a8\u5b8c\u6210\u6570\u636e\u6536\u53d1\uff0c\u4e5f \u5c31\u662f\u8bf4\u5b9d\u8d35\u7684CPU<\/u>\u65f6\u95f4\u5e94\u8be5\u4e0d\u5728\u8fd9\u91cc\u6d6a\u8d39\u6389\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u505a\u51fa\u8fd9\u6837\u4e00\u4e2a\u7ed3\u8bbaC51\u7684putchar\u51fd\u6570\u5176\u5b9e\u662f\u6709\u5f0a\u7aef\u7684\uff0c\u5b83\u5728\u7b49\u5f85TI\u7f6e\u4f4d\u65f6\u5927\u5927\u5360\u7528\u4e86 CPU\u65f6\u95f4\u3002<\/p>\n \n\t2\u3001\u5228\u6839\u95ee\u5e95<\/p>\n \n\t\u4e3a\u4ec0\u4e48C51\u8fd9\u4e48\u522b\u6709\u7528\u5fc3\u7684\u8bbe\u8ba1\u8fd9\u6837\u4e00\u4e2a\u57fa\u7840\u7684\u51fd\u6570\u6765\u5b9e\u73b0\u6536\u53d1\u5462\uff0c\u4e3a\u4ec0\u4e48\u5fc5\u987b\u7528TI\u6765\u652f\u6301\u8fd9\u4e2a\u5224\u65ad\uff0c\u6211\u5728\u5199\u7a0b\u5e8f\u7684\u65f6\u5019\u53d1\u73b0\u4e86\u4e00\u70b9\uff0c\u5176\u5b9e\u5c31\u662f51\u4e2dUART\u7684\u4e00\u70b9\u7279\u6027\u3002<\/p>\n \n\t51 \u7684UART\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u81ea\u52a8\u7684\u4e32\u884c\u8f93\u51fa\u5916\u8bbe\uff0c\u6bcf\u5bf9SBUF\u5199\u4e00\u4e2a\u6570\u636e\u5c31\u4f1a\u89e6\u53d1UART\u7684\u4e00\u6b21\u4e32\u884c\u8f93\u51fa\u64cd\u4f5c\uff0c\u5373\u5728\u5b9a\u65f6\u5668<\/u>\u5206\u9891\u7684\u57fa\u7840\u4e0a\u9010\u6b65\u79fb\u521d\u6240\u6709\u6570\u636e\u4f4d \uff08\u5305\u62ec\u542f\u59cb\u4e3a\u548c\u7ed3\u675f\u4f4d\u7b49\u7b49\uff09\uff0c\u79fb\u51fa\u901f\u5ea6\u662f\u9760\u5b9a\u65f6\u5668\u6ea2\u51fa\u65f6\u95f4\u6765\u6765\u5ea6\u91cf\u7684\uff0c\u6240\u4ee5\u5bf9\u4e8eMCU<\/u>\u6765\u8bf4\u8fd9\u4e2a\u65f6\u95f4\u4e00\u822c\u90fd\u6bd4\u8f83\u957f\u3002\u56e0\u6b64\u5982\u679c\u5728\u5b9a\u65f6\u5668\u8fd8\u6ca1\u6709\u6ea2\u51fa\u7684\u65f6\u5019\u518d\u5bf9 SBUF\u5199\u6570\u636e\u7684\u8bdd\u4f1a\u91cd\u65b0\u5f15\u8d77\u8fd9\u4e2a\u65b0\u6570\u636e\u7684\u53d1\u9001\u3002\u8fd9\u6837\u5982\u679c\u4f60\u5199<\/p>\n \n\twhile\uff081\uff09<\/p>\n \n\tSBUF = ‘a’;<\/p>\n \n\t\u5176\u5b9e\u662f\u6ca1\u6709\u4efb\u4f55\u610f\u4e49\u7684\uff0c\u53d1\u51fa\u7684\u80af\u5b9a\u662f\u4e71\u7801\u3002<\/p>\n \n\t\u7531\u4e8e\u4ee5\u4e0a\u7684\u539f\u56e0\u6211\u4eec\u5c31\u53ef\u4ee5\u770b\u51faTI\u786e\u5b9e\u662f\u4e0a\u6b21\u53d1\u9001\u7684\u7ed3\u675f\u548c\u4e0b\u6b21\u53d1\u9001\u7684\u5f00\u59cb\u7684\u7ed3\u70b9\u3002C51\u4e5f\u662f\u5229\u7528\u4e86\u8fd9\u6837\u4e00\u4e2a\u7279\u6027\u6765\u5b9e\u73b0\u81ea\u5df1\u7684\u51fd\u6570\u3002<\/p>\n \n\t3 \u6539\u8fdb\u7684PUTCHAR\u51fd\u6570<\/p>\n \n\t\u7f13 \u51b2\u533a\u662f\u8fde\u63a5\u544a\u8bc9\u8bbe\u5907\u548c\u4f4e\u901f\u8bbe\u5907\u7684\u63a5\u53e3<\/u>\uff0c\u6211\u4eec\u7684\u4e32\u53e3\u6536\u53d1\u5176\u5b9e\u5c31\u662fMCU\u7684\u9ad8\u901f\u548cUART\u7684\u4f4e\u901f\u7684\u534f\u540c\u5de5\u4f5c\uff0c\u6240\u4ee5\u6211\u4eec\u5e94\u8be5\u8bbe\u8ba1\u4e00\u4e2a\u7f13\u51b2\u533a\u4f5c\u4e3a\u6570\u636e\u7684\u6682\u5b58\u4f4d\u7f6e\uff0c \u5f53\u8bbe\u5907\u53d1\u9001\u6570\u636e\u7684\u65f6\u5019\u5982\u679cUART\u6b63\u5728\u5fd9\u4e8e\u53d1\u4e0a\u4e00\u4e2a\u6570\u636e\u90a3\u4e48\u5c31\u5e94\u8be5\u628a\u6570\u636e\u5b58\u5728BUFF\u91cc\u9762\uff0c\u800c\u5982\u679cUART\u4e0d\u5fd9\u4e86\u5c31\u5e94\u8be5\u628a\u6570\u636e\u4eceBUFF\u91cc\u9762\u987a\u5e8f\u8bfb\u51fa\u5e76\u53d1 \u9001\u3002<\/p>\n \n\t\u8fd9\u4e2a\u6b63\u597d\u7b26\u5408\u961f\u5217\u7684\u6982\u5ff5\uff0c\u6211\u5c31\u8bbe\u8ba1\u4e86\u4e00\u4e2a\u5faa\u73af\u961f\u5217\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002\u800c\u5728<\/p>\n \n\tputchar\u51fd\u6570\u5c31\u5e94\u8be5\u8bbe\u8ba1\u6210<\/p>\n \n\tvoid putchar\uff08char c\uff09<\/p>\n \n\t{<\/p>\n \n\tif<\/u>\uff08UART\u4e0d\u5fd9\uff09<\/p>\n \n\t\u76f4\u63a5\u53d1\u9001\u6570\u636e\u5230SBUF<\/p>\n \n\telse<\/p>\n \n\t\u628a\u6570\u636e\u5199\u5230BUFF\u91cc<\/p>\n \n\t}<\/p>\n \n\t\u800c\u4e2d\u65ad\u51fd\u6570\u5219\u5e94\u8be5\u5199\u4e3a<\/p>\n \n\tISR\uff08\uff09{<\/p>\n \n\t……<\/p>\n \n\tif\uff08TI\uff09{<\/p>\n \n\tTI = 0\uff1b<\/p>\n \n\tif\uff08BUFF\u91cc\u9762\u8fd8\u6709\u6570\u636e\uff09<\/p>\n \n\t\u53d6\u4e0b\u4e00\u4e2a\u6570\u636e\u5e76\u53d1\u9001\uff1b<\/p>\n \n\t}<\/p>\n \n\t\u65b0\u7684\u95ee\u9898\u53c8\u51fa\u73b0\u4e86\uff0c\u4ec0\u4e48\u662fUART\u5fd9\uff0c\u4ed6\u4e0eTI\u7684\u5173\u7cfb\u5982\u4f55\uff0c\u662f\u4e0d\u662fTI = 0\u5c31\u662fUART\u5fd9\uff1f<\/p>\n \n\t\u524d\u4e24\u4e2a\u95ee\u9898\u5148\u4e0d\u8bf4\uff0c\u6700\u540e\u4e00\u4e2a\u95ee\u9898\u7684\u7b54\u6848\u5f88\u663e\u7136\u662f“no\uff01”\uff0c\u4ece\u6700\u6781\u7aef\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u4e0a\u7535\u540eUART\u5c31\u662f\u7a7a\u95f2\uff0cTI\u4e5f\u5e94\u8be5\u7b49\u4e8e0\uff01<\/p>\n \n\t\u4e0a\u9762\u7684\u51e0\u4e2a\u95ee\u9898\u4ece\u53e6\u4e00\u4e2a\u89d2\u5ea6\u4e5f\u53ef\u4ee5\u5f97\u5230\u7b54\u6848\uff0c\u8fd9\u91cc\u6709\u4e00\u70b9\u70b9\u54f2\u7406\u7684\u95ee\u9898\uff0c\u4e00\u4e2a\u7269\u54c1\u4e00\u822c\u53ea\u80fd\u5b8c\u6210\u4e00\u4ef6\u4e8b\u60c5\uff0c\u65e2\u7136TI\u5df2\u7ecf\u4f5c\u4e3a\u4e0a\u6b21\u53d1\u9001\u7684\u7ed3\u675f\u548c\u4e0b\u6b21\u53d1\u9001\u7684\u5f00\u59cb\u7684\u7ed3\u70b9\u90a3\u4e48\u5b83\u5e94\u8be5\u4e0d\u662f\u4f5c\u4e3aUART\u5fd9\u7684\u6807\u81f4\u3002<\/p>\n \n\t4\u3001\u6700\u540e\u7684\u8bbe\u8ba1\u6982\u8981<\/p>\n \n\t\u4eceOS\u7684\u89d2\u5ea6\u6765\u770bUART\u662f\u4e00\u79cd\u8d44\u6e90\uff0c\u5bf9\u4e8e\u6211\u4eec\u7684\u7a0b\u5e8f\u6211\u4eec\u628aSBUF\u770b\u505a\u5b83\u7684\u8f7d\u4f53\uff0c\u6240\u4ee5\u5bf9\u4e8e\u9ad8\u901f\u548c\u4f4e\u901f\u8bbe\u5907\u7684\u540c\u6b65\u95ee\u9898\u6211\u4eec\u5e94\u8be5\u5f15\u5165\u4e92\u65a5\u91cf\u6765\u5b9e\u73b0\u5bf9\u8fd9\u4e2a\u8d44\u6e90\u5360\u7528\u60c5\u51b5\u7684\u6807\u5fd7\u3002\u6240\u4ee5\u6211\u8bbe\u8ba1\u7684\u4e32\u53e3\u9a71\u52a8\u91cc\u5199\u4e86\u4e00\u4e2amutex_sbuf\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002<\/p>\n \n\t\u540e\u9762\u7684\u4e8b\u60c5\u5c31\u7b80\u5355\u4e86<\/p>\n \n\tvoid putchar\uff08char c\uff09<\/p>\n \n\t{<\/p>\n \n\tif\uff08mutex_sbuf == 0\uff09{<\/p>\n \n\tEA = 0<\/p>\n \n\tmutex_sbuf = 1;<\/p>\n \n\tSBUF = c;<\/p>\n \n\tEA = 1<\/p>\n \n\t}<\/p>\n \n\telse<\/p>\n \n\t\u628a\u6570\u636e\u5199\u5230SBUF\u91cc\u9762<\/p>\n \n\t}<\/p>\n \n\tISR\uff08\uff09<\/p>\n \n\t{<\/p>\n \n\t……<\/p>\n \n\tif\uff08TI\uff09{<\/p>\n \n\tTI = 0\uff1b<\/p>\n \n\tmutex_sbuf = 0;<\/p>\n \n\tif\uff08BUFF\u91cc\u9762\u8fd8\u6709\u6570\u636e\uff09{<\/p>\n \n\tmutex_sbuf = 1;<\/p>\n \n\t\u53d6\u4e0b\u4e00\u4e2a\u6570\u636e\u5e76\u9001\uff1b<\/p>\n \n\t}<\/p>\n \n\t}<\/p>\n \n\t}<\/p>\n \n\t\u5199\u5230\u8fd9\u91cc\u8bf4\u7684\u5dee\u4e0d\u591a\u4e86\uff0c\u6ca1\u5174\u81f4\u4e86\uff1a\uff08 \u4ee5\u540e\u6211\u628a\u7a0b\u5e8f\u8d34\u4e0a\u6765\u4f9b\u5927\u5bb6\u53c2\u8003<\/p>\n \n\t\u5e0c\u671b\u5927\u5bb6\u80fd\u628a\u6211\u7684\u7a0b\u5e8f\u4f18\u5316\u4e00\u4e0b\uff0c\u6211\u73b0\u5728\u7684\u8fd9\u4e2a\u7248\u672c\u7684driver\u662f\u7528\u7eafC\u5199\u7684\uff0c\u5bf9ROM<\/u>\u7684\u5360\u7528\u592a\u5927\u4e86\u3002\u4ee5\u540e\u6211\u4f1a\u7528ASM\u6765\u6539\u5199\u90e8\u5206\u4ee3\u7801\u3002<\/p>\n \n\t\u800c\u4e14\u8fd8\u6709\u4e00\u4e2a\u95ee\u9898\u5c31\u662fC51\u5bf9\u4e8e\u6307\u9488\u7684\u4f7f\u7528\u5f88\u9ebb\u70e6\uff0c\u7a0b\u5e8f\u5f88\u5bb9\u6613\u8dd1\u98de\uff0c\u6211\u7684\u4ee3\u7801\u8fd8\u4e0d\u662f\u8db3\u591f\u7684\u6e05\u6670\uff0c\u56e0\u4e3a\u5c31\u662f\u6307\u9488\u7684\u4e71\u8dd1\uff0c\u6240\u4ee5\u6211\u5728\u5fc5\u8981\u7684\u51fd\u6570\u91cc\u9762\u52a0\u4e86\u6307\u9488\u7c7b\u578b\u9650\u5b9a\uff0c\u4f46\u662f\u6211\u53d1\u73b0\u5982\u679c\u90fd\u52a0\u9650\u5b9a\u7684\u8bdd\u53cd\u800c\u4e5f\u4f1a\u98de\u3002<\/p>\n \n\t\u8fc7\u4e24\u5929\u6211\u4f1a\u653e\u4e0a\u6765\u5e0c\u671b\u5927\u5bb6\u80fd\u4e00\u8d77\u628a\u8fd9\u4e2a\u5199\u597d\u3002<\/p>\n \n\t\u5199\u5f97\u4e0d\u9519\uff0c\u4f46\u6211\u4e0d\u503e\u5411\u91c7\u7528\u4e2d\u65ad\u53d1\u9001\u3002\u56e0\u4e3a\u5982\u679c\u91c7 \u7528\u4e2d\u65ad\u53d1\u9001\u7684\u8bdd\uff0c\u9700\u8981\u4e00\u4e2a\u53d1\u9001\u7f13\u51b2\u533a\uff0c\u7f13\u51b2\u533a\u8bbe\u591a\u5927\uff1f\u53ea\u8bbe\u4e00\u4e2a\u5b57\u8282\u7684\u8bdd\uff0c\u90a3\u4e48\u8c03\u7528putchar\u7684\u65f6\u5019\u662f\u4e0d\u662f\u5148\u5f97\u5224\u65ad\u7f13\u51b2\u533a\u975e\u7a7a\uff0c\u5982\u679c\u4e0d\u7a7a\u5219printf \u4e00\u7c7b\u7684\u51fd\u6570\u4ecd\u7136\u9700\u8981\u7b49\u5f85\u3002\u7f13\u51b2\u533a\u8bbe\u5f88\u5927\u7684\u8bdd\uff0c\u6709\u4e24\u4e2a\u95ee\u9898\uff0c\u4e00\u662f51\u672c\u6765\u5185\u5b58\u5c31\u5c0f\uff0c\u4e8c\u4ecd\u7136\u662f\u9700\u8981\u5224\u65ad\u7f13\u51b2\u533a\u7a7a\u4e0d\u7a7a\u3002\u8003\u8651\u518d\u4e09\uff0c\u8fd8\u662f\u7528\u7684\u67e5\u8be2\u53d1\u9001\u3002\u5230\u5e95\u91c7\u7528\u67e5 \u8be2\u6216\u4e2d\u65ad\u53d1\u9001\uff0c\u53ef\u80fd\u8981\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u6765\u9009\u62e9\u3002<\/p>\n \n\t\u53e6\u5916\uff0cKeilC\u5199\u7684\u4e0d\u89c1\u5f97\u5c31\u6bd4asm\u5199\u7684\u5360\u7a7a\u95f4\u5927\uff1bc\u6307\u9488\u8dd1\u98de\u7684\u539f\u56e0\uff0c\u5927\u90e8\u5206\u662f\u6307\u9488\u8d8a\u754c\uff0c\u6bd4\u5982\u7533\u8bf7\u4e865\u5b57\u8282\u5185\u5b58\uff0c\u4f7f\u7528\u4e86\u7b2c6\u4e2a\uff0c\u628a\u522b\u7684\u53d8\u91cf\u51b2\u6389\u4e86\u7b49\u7b49\uff0c\u4e0d\u5728\u4e8e\u4f60\u662f\u5426\u52a0cast\uff0c\u4e5f\u5c31\u662f\u8bf4\u4e0e\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u65e0\u5173\uff0c\u8981\u52a0\u5f3a\u5bf9\u67e5\u8868\u7b49\u7d22\u5f15\u6307\u9488\u7684\u68c0\u67e5\uff0c\u786e\u4fdd\u6307\u9488\u4e0d\u8d8a\u754c\u3002<\/p>\n \n\t\u786e\u5b9e\u662f\u8fd9\u6837\u7684\uff0c\u6839\u636e\u9879\u76ee\u9700\u8981\u5427\uff0c\u6211\u73b0\u5728\u53ea\u662f\u60f3\u5199\u4e00\u4e2a\u6a21\u5757\u51fa\u6765\u7ed9\u5927\u5bb6\u53c2\u8003\uff1a\uff09<\/p>\n \n\t\u4ee3\u7801\u91cf\u5927\u662f\u56e0\u4e3a\u6211\u7528\u4e86\u5faa\u73af\u961f\u5217\uff0c\u5bf9\u4e8ebuff\u7684\u64cd\u4f5c\u51e0\u4e4e\u662f\u900f\u660e\u7684\uff0c\u6240\u4ee5\u51e0\u4e4e\u4e0d\u7528\u8003\u8651\uff0c\u8fd8\u6709\u4e00\u70b9\u56e0\u4e3a\u6211\u7528\u7684\u662fRD2\u7684\u82af\u7247\uff0c\u6240\u4ee5\u6709ERAM<\/u>\uff0c\u6211\u5bf9\u5185\u5b58\u7684\u8003\u8651\u5c31\u7a0d\u5fae\u5c11\u4e86\u4e00\u4e9b\u3002<\/p>\n \n\t\u5982\u679c\u4e0d\u7528\u4e2d\u65ad\u7684\u8bdd\u5c31\u8981\u5199\u4e00\u4e2ascheduler\u6765\u5b9e\u73b0\uff0c\u6211\u60f3\u4ee5\u540e\u8981\u5199\u4e00\u4e2a\u8c03\u5ea6\u5668\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0c\u4e0d\u8fc7\u6211\u73b0\u5728\u4e0d\u77e5\u9053\u600e\u4e48\u6a21\u62df\u4e32\u53e3\u6536\u6570\u636e\uff0c\u597d\u8c61\u8fd9\u4e2a\u95ee\u9898\u6bd4\u8f83\u9ebb\u70e6\uff0c\u6591\u7af9\u6709\u6ca1\u6709\u4ec0\u4e48\u597d\u7684\u60f3\u6cd5\uff1f<\/p>\n \n\t\u4e8e\u8fd9\u4e2a\u95ee\u9898\u6211\u60f3\u8fd8\u662f\u6709\u5fc5\u8981\u8ba8\u8bba\u4e00\u4e0b\u7684\uff0c\u4f60\u53ef\u80fd\u8ba4\u4e3a\u6211\u5bf9buff\u7684\u6821\u9a8c\u4e0d\u5230\u4f4d\uff0c\u6240\u4ee5\u4ea7\u751f\u4e86\u8d8a\u754c\uff0c\u4f46\u662f\u6211\u60f3\u95ee\u4e3a\u4ec0\u4e48\u6709\u4e86casting\u4ee5\u540e\u5c31\u53ef\u4ee5\u4e0d\u8d8a\u754c\u4e86\u5462<\/p>\n \n\t\u6211\u5bf9C51\u4e0d\u662f\u5f88\u719f\u6089\uff0c\u4f46\u662f\u6211\u89c9\u5f97\u75c7\u7ed3\u53ef\u80fd\u5728\u4e8e\u51fd\u6570\u5d4c\u5957\u8fc7\u591a\uff0c\u867d\u7136\u7ed3\u6784\u660e\u6670\u4e86\uff0c\u4f46\u662f\u5806\u6808\u4e0d\u591f\u7528\u4e86\u3002<\/p>\n \n\t\u53e6\u5916\u4e00\u4e2a\u9700\u8981\u6ce8\u610f\u7684\u662f\u4e3a\u4ec0\u4e48\u603b\u662f\u8dd1\u5230IDATA\u91cc\u9762\uff0c\u8fd9\u4e2a\u6211\u4e5f\u4e0d\u89e3\uff1a\uff09<\/p>\n \n\t\u6211\u6240\u6709\u7684buff\u90fd\u662f\u5728XDATA\u4e2d\u7684\uff0c\u800c\u4e14\u6211\u7528\u4e86MALLOC\u51fd\u6570\uff0c\u4f46\u6211\u53c8\u7528\u7684\u662fcompact mode<\/p>\n","protected":false},"excerpt":{"rendered":" 1\u3001C51\u4e32\u53e3\u7684\u5f0a\u7aef\u3002 C51\u7684\u4e32\u53e3\u6536\u53d1\u7a0b\u5e8f\u76f8\u4fe1\u5927\u5bb6\u90fd\u5f88\u719f\u6089\u4e86\uff0c\u5728hello.c\u91cc\u9762\u6709\u5f88\u7b80\u5355\u7684\u4f8b\u7a0b\uff0c\u4e0d\u77e5 \u9053\u5927\u5bb6\u6709\u6ca1\u6709\u6ce8\u610f\u5230hello.c\u91cc\u9762\u6709\u4e00\u53e5\u5f88\u4e0d\u663e\u773c\u7684\u8bed\u53e5 TI = 1; \u5f53\u4f60\u5728\u521d\u59cb\u5316\u4e32\u53e3\u7684\u65f6\u5019\u5982<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2726"}],"collection":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2726"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2726\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2726"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}