{"id":108009,"date":"2026-09-20T19:16:45","date_gmt":"2026-09-20T11:16:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/108009.html"},"modified":"2026-09-20T19:16:45","modified_gmt":"2026-09-20T11:16:45","slug":"arm-%e8%a3%b8%e6%9c%ba%e5%bc%80%e5%8f%91%ef%bd%9carm-%e6%b1%87%e7%bc%96-c-%e6%b7%b7%e5%90%88%e7%bc%96%e7%a8%8b-i-mx6ull-%e7%82%b9%e7%81%af%e5%ae%9e%e9%aa%8c","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/108009.html","title":{"rendered":"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u672c\u7ae0\u8282\u4ece ARM \u6c47\u7f16\u57fa\u7840\u3001\u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u673a\u5236&#xff0c;\u8fc7\u6e21\u5230 i.MX6ULL Cortex-A7 \u88f8\u673a\u73af\u5883\u642d\u5efa&#xff0c;\u6700\u540e\u5b8c\u6210\u88f8\u673a\u70b9\u706f\u5b8c\u6574\u5de5\u7a0b\u3002\u5185\u5bb9\u8986\u76d6\u5bc4\u5b58\u5668\u3001\u6307\u4ee4\u96c6\u3001\u5f02\u5e38\u5411\u91cf\u8868\u3001\u542f\u52a8\u4ee3\u7801\u3001GPIO \u786c\u4ef6\u914d\u7f6e\u3001\u4ea4\u53c9\u7f16\u8bd1\u3001\u70e7\u5f55\u8c03\u8bd5&#xff0c;\u662f\u5d4c\u5165\u5f0f ARM \u88f8\u673a\u5165\u95e8\u6838\u5fc3\u5185\u5bb9\u3002<br \/>\n\u6574\u4f53\u5b66\u4e60\u94fe\u8def&#xff1a;ARM \u6c47\u7f16\u57fa\u7840 \u2192 \u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u89c4\u8303 \u2192 \u542f\u52a8\u4ee3\u7801\u4e0e\u5f02\u5e38\u5411\u91cf \u2192 i.MX6ULL \u786c\u4ef6\u67b6\u6784 \u2192 \u88f8\u673a\u70b9\u706f\u5b9e\u9a8c&#xff08;\u6c47\u7f16\u5b9e\u73b0 &#043; \u7f16\u8bd1\u70e7\u5f55&#xff09;<\/p>\n<hr \/>\n<h3>\u4e00\u3001ARM \u6c47\u7f16\u4e0e C \u6df7\u5408\u7f16\u7a0b\u6838\u5fc3\u673a\u5236<\/h3>\n<h4>1. CPSR (\u7a0b\u5e8f\u72b6\u6001\u5bc4\u5b58\u5668) \u6807\u5fd7\u4f4d<\/h4>\n<ul>\n<li>N(Negative)&#xff1a;\u8fd0\u7b97\u7ed3\u679c\u4e3a\u8d1f\u6570&#xff0c;\u7f6e 1<\/li>\n<li>Z(Zero)&#xff1a;\u8fd0\u7b97\u7ed3\u679c\u7b49\u4e8e 0&#xff0c;\u7f6e 1<\/li>\n<li>C(Carry)&#xff1a;\u52a0\u6cd5\u8fdb\u4f4d\u3001\u51cf\u6cd5\u65e0\u501f\u4f4d\u3001\u79fb\u4f4d\u79fb\u51fa\u4f4d&#xff0c;\u7f6e 1<\/li>\n<li>V(Overflow)&#xff1a;\u6709\u7b26\u53f7\u6570\u8fd0\u7b97\u6ea2\u51fa&#xff0c;\u7f6e 1<\/li>\n<\/ul>\n<h4>2. ARM \u6307\u4ee4\u4e0e\u6808\u673a\u5236<\/h4>\n<ul>\n<li>\u8df3\u8f6c\u6307\u4ee4\n<ul>\n<li>B&#xff1a;\u666e\u901a\u8df3\u8f6c&#xff0c;\u4e0d\u4fdd\u5b58\u8fd4\u56de\u5730\u5740<\/li>\n<li>BL&#xff1a;\u5e26\u94fe\u63a5\u8df3\u8f6c&#xff0c;\u628a PC \u4fdd\u5b58\u5230 LR (\u94fe\u63a5\u5bc4\u5b58\u5668)&#xff0c;\u7528\u4e8e\u51fd\u6570\u8c03\u7528<\/li>\n<li>BX&#xff1a;\u8df3\u8f6c&#xff0c;\u5e38\u7528\u4e8eBX LR\u5b9e\u73b0\u51fd\u6570\u8fd4\u56de&#xff0c;\u8fd8\u53ef\u5207\u6362 ARM\/Thumb \u6307\u4ee4\u96c6<\/li>\n<\/ul>\n<\/li>\n<li>ARM \u9ed8\u8ba4\u6808&#xff1a;\u6ee1\u51cf\u6808 Full Descending&#xff0c;\u6808\u9876\u6307\u5411\u6709\u6548\u6570\u636e&#xff0c;\u5730\u5740\u4ece\u9ad8\u5411\u4f4e\u589e\u957f<\/li>\n<li>\u7acb\u5373\u6570&#xff1a;12 \u4f4d\u7f16\u7801&#xff08;8 \u4f4d\u6709\u6548\u503c &#043; 4 \u4f4d\u65cb\u8f6c&#xff09;&#xff0c;\u4e0d\u662f\u6240\u6709 32 \u4f4d\u6570\u5b57\u90fd\u53ef\u4ee5\u76f4\u63a5\u4f5c\u4e3a\u7acb\u5373\u6570\u3002\u5927\u6570\u9700\u8981 LDR \u4f2a\u6307\u4ee4\u52a0\u8f7d\u3002<\/li>\n<\/ul>\n<h4>3. \u6c47\u7f16\u4e0e C \u6df7\u5408\u7f16\u7a0b\u8c03\u7528\u89c4\u8303<\/h4>\n<li>\u53c2\u6570\u4f20\u9012&#xff1a;\u524d 4 \u4e2a\u53c2\u6570\u7528 R0~R3&#xff0c;\u591a\u4e8e 4 \u4e2a&#xff0c;\u5269\u4f59\u53c2\u6570\u538b\u6808\u4f20\u9012<\/li>\n<li>\u8fd4\u56de\u503c&#xff1a;\u7edf\u4e00\u901a\u8fc7R0\u8fd4\u56de<\/li>\n<li>\u5bfc\u5165\u5bfc\u51fa&#xff1a;\u6c47\u7f16\u8c03\u7528 C \u51fd\u6570\u7528IMPORT&#xff1b;C \u8c03\u7528\u6c47\u7f16\u51fd\u6570&#xff0c;\u6c47\u7f16\u4ee3\u7801\u4e2d\u7528EXPORT\u5bfc\u51fa\u51fd\u6570\u540d<\/li>\n<li>\u6808\u5bf9\u9f50&#xff1a;PRESERVE8\u4f2a\u64cd\u4f5c&#xff0c;\u4fdd\u8bc1 8 \u5b57\u8282\u6808\u5bf9\u9f50&#xff0c;\u4fdd\u8bc1 C \u4ee3\u7801\u517c\u5bb9\u6027<\/li>\n<h4>4. \u6c47\u7f16\u542f\u52a8\u4ee3\u7801\u4f5c\u7528<\/h4>\n<p>C \u8bed\u8a00\u4e0d\u80fd\u76f4\u63a5\u64cd\u4f5c MMU\u3001Cache \u8fd9\u7c7b\u5185\u6838\u5bc4\u5b58\u5668&#xff0c;\u5fc5\u987b\u6c47\u7f16\u505a\u5e95\u5c42\u521d\u59cb\u5316&#xff1a;<\/p>\n<ul>\n<li>\u8bbe\u7f6e SP \u6808\u6307\u9488<\/li>\n<li>\u642d\u5efa\u5f02\u5e38\u5411\u91cf\u8868<\/li>\n<li>\u5207\u6362 CPU \u5de5\u4f5c\u6a21\u5f0f&#xff08;SVC\u2192User&#xff09;<\/li>\n<li>\u521d\u59cb\u5316\u786c\u4ef6\u73af\u5883&#xff0c;\u4e3a C \u8bed\u8a00 main \u51fd\u6570\u8fd0\u884c\u505a\u51c6\u5907<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e8c\u3001ARM \u6307\u4ee4\u3001\u5f02\u5e38\u5411\u91cf\u8868\u4e0e\u542f\u52a8\u521d\u59cb\u5316\u6d41\u7a0b<\/h3>\n<h4>1. LDR \/ STR \u6570\u636e\u8bbf\u95ee\u6307\u4ee4<\/h4>\n<ul>\n<li>LDR(Load)&#xff1a;\u5185\u5b58\u2192\u5bc4\u5b58\u5668&#xff0c;C \u8bed\u8a00*p\u53d6\u503c<\/li>\n<li>STR(Store)&#xff1a;\u5bc4\u5b58\u5668\u2192\u5185\u5b58&#xff0c;C \u8bed\u8a00*p &#061; val\u8d4b\u503c<\/li>\n<li>\u652f\u6301\u504f\u79fb\u5bfb\u5740\u3001\u540e\u7d22\u5f15\u3001\u524d\u7d22\u5f15\u56de\u5199\u5bfb\u5740\u6a21\u5f0f<\/li>\n<\/ul>\n<h4>2. MRS \/ MSR \u72b6\u6001\u5bc4\u5b58\u5668\u64cd\u4f5c<\/h4>\n<p>CPSR \u4e0d\u662f\u901a\u7528\u5bc4\u5b58\u5668&#xff0c;\u666e\u901a\u6307\u4ee4\u4e0d\u80fd\u8bfb\u5199<\/p>\n<ul>\n<li>MRS&#xff1a;CPSR \u2192 \u901a\u7528\u5bc4\u5b58\u5668&#xff08;\u8bfb\u72b6\u6001\u5bc4\u5b58\u5668&#xff09;<\/li>\n<li>MSR&#xff1a;\u901a\u7528\u5bc4\u5b58\u5668 \u2192 CPSR&#xff08;\u5199\u72b6\u6001\u5bc4\u5b58\u5668&#xff0c;\u4fee\u6539\u6a21\u5f0f\u4f4d\u3001\u6807\u5fd7\u4f4d&#xff09;<\/li>\n<\/ul>\n<p>\u26a0\ufe0f \u6ce8\u610f&#xff1a;\u5199 CPSR \u9700\u8981\u6307\u5b9a\u57df\u540e\u7f00&#xff0c;\u64cd\u4f5c\u98ce\u9669\u9ad8&#xff0c;\u8c28\u614e\u4f7f\u7528<\/p>\n<h4>3. \u5f02\u5e38\u5411\u91cf\u8868<\/h4>\n<p>\u56fa\u5b9a\u653e\u57280x00 ~ 0x1C\u5730\u5740&#xff0c;8 \u4e2a\u5165\u53e3&#xff1a;<br \/>\n\u590d\u4f4d Reset\u3001\u672a\u5b9a\u4e49\u6307\u4ee4 Undef\u3001\u8f6f\u4e2d\u65ad SWI\/SVC\u3001\u9884\u53d6\u7ec8\u6b62 Pabort\u3001\u6570\u636e\u7ec8\u6b62 Dabort\u3001\u4fdd\u7559\u3001IRQ\u3001FIQ<\/p>\n<ul>\n<li>\u4e25\u91cd\u5f02\u5e38&#xff08;Undef\/Pabort&#xff09;\u4e00\u822c\u76f4\u63a5\u6b7b\u5faa\u73af<\/li>\n<li>SWI \u8f6f\u4e2d\u65ad&#xff0c;\u81ea\u5b9a\u4e49\u5904\u7406\u903b\u8f91&#xff0c;\u6267\u884c\u5b8c\u6210\u9700\u8981\u8fd4\u56de<\/li>\n<\/ul>\n<h4>4. \u542f\u52a8\u4ee3\u7801\u521d\u59cb\u5316\u6d41\u7a0b<\/h4>\n<li>\u590d\u4f4d\u9ed8\u8ba4 SVC \u6a21\u5f0f&#xff0c;\u5148\u521d\u59cb\u5316 SVC \u6808 SP<\/li>\n<li>MRS\/MSR \u4fee\u6539 CPSR \u7684 M \u57df&#xff0c;\u5207\u6362 CPU \u6a21\u5f0f&#xff08;SVC\u2192User&#xff09;<\/li>\n<li>\u5207\u6362\u6a21\u5f0f\u540e&#xff0c;\u5355\u72ec\u5206\u914d User \u6a21\u5f0f\u6808&#xff0c;\u4e0d\u540c\u6a21\u5f0f\u6808\u7a7a\u95f4\u76f8\u4e92\u72ec\u7acb&#xff0c;\u9632\u6b62\u51b2\u7a81<\/li>\n<li>\u521d\u59cb\u5316\u5168\u90e8\u5b8c\u6210&#xff0c;\u8df3\u8f6c C \u8bed\u8a00 main \u51fd\u6570<\/li>\n<h4>5. SWI\/SVC \u8f6f\u4e2d\u65ad<\/h4>\n<p>\u6c47\u7f16\u4e2d\u5c01\u88c5\u51fd\u6570&#xff0c;\u4f7f\u7528 SWI \u89e6\u53d1\u8f6f\u4e2d\u65ad&#xff0c;\u8fdb\u5165\u5f02\u5e38\u5904\u7406\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001i.MX6ULL \u88f8\u673a\u73af\u5883\u642d\u5efa &amp; start.S \u542f\u52a8\u4ee3\u7801<\/h3>\n<p>\u5e73\u53f0\u8fc1\u79fb&#xff1a;QEMU S3C2440 (ARMv5 ARM920T) \u2192 \u771f\u5b9e\u786c\u4ef6 i.MX6ULL Cortex-A7 (ARMv7-A)<\/p>\n<h4>1. \u5f00\u53d1\u73af\u5883<\/h4>\n<ul>\n<li>\u7f16\u8f91\u5668&#xff1a;Ubuntu &#043; VS Code&#xff0c;ARM Assembly \u63d2\u4ef6\u5f00\u542f\u6c47\u7f16\u8bed\u6cd5\u9ad8\u4eae<\/li>\n<li>\u6c47\u7f16\u6587\u4ef6\u540e\u7f00\u63a8\u8350\u5927\u5199.S&#xff1a;\u7f16\u8bd1\u524d\u4f1a\u505a\u9884\u5904\u7406&#xff0c;\u652f\u6301\u5b8f\u5b9a\u4e49<\/li>\n<li>\u7f16\u8bd1\u5de5\u5177&#xff1a;arm-linux-gnueabihf-gcc \u4ea4\u53c9\u5de5\u5177\u94fe<\/li>\n<\/ul>\n<h4>2. start.S \u542f\u52a8\u4ee3\u7801\u6838\u5fc3<\/h4>\n<li>\u5f02\u5e38\u5411\u91cf\u8868\u5b9a\u4e49&#xff0c;\u672a\u4f7f\u7528\u5f02\u5e38\u5165\u53e3\u76f4\u63a5\u6b7b\u5faa\u73af<\/li>\n<li>\u590d\u4f4d\u5904\u7406&#xff1a;\n<ul>\n<li>\u5148\u5173\u95ed IRQ\/FIQ \u4e2d\u65ad&#xff0c;\u907f\u514d\u6808\u672a\u521d\u59cb\u5316\u65f6\u4e2d\u65ad\u89e6\u53d1\u5d29\u6e83<\/li>\n<li>\u7ed9 SVC\u3001IRQ\u3001System \u6a21\u5f0f\u5206\u522b\u5206\u914d\u72ec\u7acb\u6808\u7a7a\u95f4<\/li>\n<li>System \u6a21\u5f0f\u7528\u4e8e\u8fd0\u884c C \u4e3b\u4e1a\u52a1\u4ee3\u7801&#xff0c;\u5fc5\u987b\u5206\u914d\u6808<\/li>\n<\/ul>\n<\/li>\n<li>\u521d\u59cb\u5316\u7ed3\u675f\u540e&#xff0c;\u6253\u5f00 IRQ \u603b\u5f00\u5173<\/li>\n<h4>3. ARMv7 \u65b0\u589e\u7b80\u5316\u6307\u4ee4<\/h4>\n<ul>\n<li>CPS\u6307\u4ee4&#xff1a;\u66ff\u4ee3 MRS&#043;MSR \u7ec4\u5408&#xff0c;\u5feb\u901f\u5207\u6362 CPU \u6a21\u5f0f\u3001\u4fee\u6539\u4e2d\u65ad\u4f4d\n<ul>\n<li>CPS #0x12&#xff1a;\u5207\u6362 IRQ \u6a21\u5f0f<\/li>\n<li>CPSIE I&#xff1a;\u4f7f\u80fd IRQ \u4e2d\u65ad<\/li>\n<li>CPSID I&#xff1a;\u5173\u95ed IRQ \u4e2d\u65ad<\/li>\n<\/ul>\n<\/li>\n<li>LDR\u4f2a\u6307\u4ee4&#xff1a;\u52a0\u8f7d 32 \u4f4d\u5927\u5730\u5740 \/ \u5927\u6570&#xff0c;\u5f25\u8865 MOV \u4e0d\u80fd\u52a0\u8f7d\u5927\u7acb\u5373\u6570\u7684\u5c40\u9650<\/li>\n<li>BX LR&#xff1a;\u51fd\u6570\u8fd4\u56de&#xff0c;\u81ea\u52a8\u8bc6\u522b\u5730\u5740\u6700\u4f4e\u4f4d\u5207\u6362 ARM\/Thumb<\/li>\n<\/ul>\n<h4>4. i.MX6ULL \u5185\u5b58\u4e0e\u6808\u89c4\u5212<\/h4>\n<ul>\n<li>DDR3&#xff1a;512MB&#xff0c;\u8d77\u59cb\u5730\u57400x80000000<\/li>\n<li>\u6808\u7c7b\u578b&#xff1a;\u6ee1\u51cf\u6808&#xff08;\u9ad8\u5730\u5740\u5411\u4f4e\u5730\u5740&#xff09;<\/li>\n<li>\u5206\u914d\u7b56\u7565&#xff1a;\u6bcf\u4e2a\u6a21\u5f0f\u5206\u914d\u72ec\u7acb\u6808&#xff0c;\u53c2\u8003 Linux&#xff0c;\u53ef\u5206\u914d 32MB \u4fdd\u8bc1\u5b89\u5168<\/li>\n<\/ul>\n<h4>5. \u4e1a\u52a1\u6846\u67b6&#xff08;\u70b9\u706f\u5de5\u7a0b&#xff09;<\/h4>\n<p>\u6a21\u5757\u5316\u5c01\u88c5 LED \u76f8\u5173\u51fd\u6570&#xff1a;led_init\u3001led_on\u3001led_off\u3001delay<br \/>\nSystem \u6a21\u5f0f\u4e0b\u6b7b\u5faa\u73af&#xff1a;\u5f00\u706f\u2192\u5ef6\u65f6\u2192\u5173\u706f\u2192\u5ef6\u65f6&#xff0c;\u5faa\u73af\u95ea\u70c1\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001i.MX6ULL \u786c\u4ef6\u67b6\u6784\u3001\u539f\u7406\u56fe\u4e0e GPIO \u914d\u7f6e<\/h3>\n<h4>1. \u786c\u4ef6\u5c42\u7ea7&#xff08;\u9762\u8bd5\u9ad8\u9891\u8003\u70b9&#xff0c;\u522b\u6df7\u6dc6&#xff09;<\/h4>\n<p>\u5f00\u53d1\u677f&#xff08;\u6b63\u70b9\u539f\u5b50 i.MX6U Mini&#xff09;&gt; SoC&#xff08;NXP i.MX6ULL&#xff09;&gt; \u5185\u6838 Cortex-A7<\/p>\n<p>\u9762\u8bd5\u5751\u70b9&#xff1a;\u533a\u5206 SoC \u578b\u53f7\u3001\u5185\u6838\u540d\u79f0\u3001\u6307\u4ee4\u96c6\u7248\u672c&#xff0c;\u4e0d\u8981\u6df7\u4e3a\u4e00\u8c08\u3002<\/p>\n<h4>2. \u5f00\u53d1\u677f\u786c\u4ef6\u4e0e\u542f\u52a8<\/h4>\n<ul>\n<li>\u4f9b\u7535 DC 6~16V&#xff0c;Type-C&#xff0c;\u7f51\u53e3&#xff1b;\u62e8\u7801\u5f00\u5173\u9009\u62e9\u542f\u52a8\u65b9\u5f0f<\/li>\n<li>SD \u5361\u542f\u52a8&#xff1a;\u62e8\u7801\u8bbe\u7f6e\u4e3a10000010<\/li>\n<li>\u6838\u5fc3\u677f&#xff1a;SoC\u3001DDR\u3001ROM\u3001\u9ad8\u901f\u603b\u7ebf&#xff1b;\u5e95\u677f&#xff1a;\u5916\u8bbe\u63a5\u53e3&#xff1b;\u6838\u5fc3\u677f PCB \u8bbe\u8ba1\u96be\u5ea6\u66f4\u9ad8<\/li>\n<\/ul>\n<h4>3. LED \u786c\u4ef6\u7535\u8def<\/h4>\n<p>LED0 \u5f15\u811a\u7f51\u7edc\u6807\u7b7e&#xff1a;GPIO1_IO03<br \/>\n\u4e32\u8054\u9650\u6d41\u7535\u963b&#xff0c;3.3V \u7a33\u538b\u4f9b\u7535\u3002<\/p>\n<h4>4. IOMUXC IO \u590d\u7528\u63a7\u5236\u5668<\/h4>\n<p>\u5f15\u811a\u8d44\u6e90\u6709\u9650&#xff0c;IOMUXC \u672c\u8d28\u591a\u8def\u9009\u62e9\u5f00\u5173&#xff0c;\u5b9e\u73b0\u5f15\u811a\u590d\u7528\u3002<br \/>\n\u914d\u7f6e\u4e24\u6b65&#xff1a;<\/p>\n<li>IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO03&#xff1a;\u8bbe\u7f6e ALT5&#xff0c;\u628a\u5f15\u811a\u590d\u7528\u4e3a GPIO \u529f\u80fd<\/li>\n<li>IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO03&#xff1a;\u914d\u7f6e\u4e0a\u4e0b\u62c9\u3001\u9a71\u52a8\u80fd\u529b\u3001\u538b\u6446\u7387&#xff0c;\u5b9e\u9a8c\u53ef\u4f7f\u7528\u9ed8\u8ba4\u503c<\/li>\n<h4>5. GPIO \u5bc4\u5b58\u5668<\/h4>\n<ul>\n<li>GPIOx_GDIR&#xff1a;\u65b9\u5411\u5bc4\u5b58\u5668&#xff0c;\u7f6e 1 &#061; \u8f93\u51fa\u6a21\u5f0f<\/li>\n<li>GPIOx_DR&#xff1a;\u6570\u636e\u5bc4\u5b58\u5668&#xff0c;\u5199 0 \u8f93\u51fa\u4f4e\u7535\u5e73&#xff08;\u70b9\u4eae LED&#xff09;&#xff0c;\u5199 1 \u8f93\u51fa\u9ad8\u7535\u5e73&#xff08;\u7184\u706d LED&#xff09;<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e94\u3001\u88f8\u673a\u70b9\u706f\u5b8c\u6574\u5de5\u7a0b&#xff1a;\u4ea4\u53c9\u7f16\u8bd1\u3001\u94fe\u63a5\u3001\u70e7\u5f55\u8c03\u8bd5<\/h3>\n<h4>1. LED \u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4<\/h4>\n<li>IOMUX \u914d\u7f6e&#xff0c;\u5f15\u811a\u590d\u7528\u4e3a GPIO<\/li>\n<li>\u914d\u7f6e PAD \u7535\u6c14\u5c5e\u6027&#xff08;\u9a71\u52a8\u3001\u4e0a\u4e0b\u62c9&#xff09;<\/li>\n<li>GDIR \u5bc4\u5b58\u5668\u8bbe\u4e3a\u8f93\u51fa<\/li>\n<li>DR \u5bc4\u5b58\u5668\u8f93\u51fa\u9ad8\u4f4e\u7535\u5e73\u63a7\u5236 LED \u4eae\u706d<\/li>\n<h4>2. \u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe<\/h4>\n<p>\u5de5\u5177\u94fe\u7ec4\u4ef6&#xff1a;\u9884\u5904\u7406\u5668\u3001gcc \u7f16\u8bd1\u5668\u3001as \u6c47\u7f16\u5668\u3001ld \u94fe\u63a5\u5668\u3001objcopy\u3001objdump<br \/>\n\u5b89\u88c5\u914d\u7f6e&#xff1a;\u89e3\u538b\u5de5\u5177\u94fe&#xff0c;\u4fee\u6539~\/.bashrc&#xff0c;\u6dfb\u52a0 bin \u76ee\u5f55\u5230 PATH \u73af\u5883\u53d8\u91cf&#xff0c;\u7ec8\u7aef\u5168\u5c40\u8c03\u7528\u547d\u4ee4\u3002<\/p>\n<h4>3. \u7f16\u8bd1 &amp; \u94fe\u63a5\u6d41\u7a0b<\/h4>\n<li>arm-linux-gnueabihf-gcc -c xxx.S -o xxx.o&#xff1a;\u7f16\u8bd1\u751f\u6210\u76ee\u6807\u6587\u4ef6&#xff0c;\u53ea\u6c47\u7f16\u4e0d\u94fe\u63a5<\/li>\n<li>ld \u94fe\u63a5&#xff0c;-Ttext\u6307\u5b9a\u4ee3\u7801\u52a0\u8f7d\u5730\u5740&#xff0c;\u4f8b0x87800000&#xff0c;\u907f\u5f00\u6808\u533a\u57df<\/li>\n<li>objcopy&#xff1a;ELF \u6587\u4ef6 \u2192 .bin \u4e8c\u8fdb\u5236\u955c\u50cf&#xff0c;\u53bb\u6389\u7b26\u53f7\u3001\u8c03\u8bd5\u4fe1\u606f&#xff0c;\u7528\u4e8e\u70e7\u5f55\u5f00\u53d1\u677f<\/li>\n<h4>4. \u70e7\u5f55\u4e0e\u8c03\u8bd5<\/h4>\n<ul>\n<li>imxdownload \u5de5\u5177&#xff0c;\u5c06 bin \u5199\u5165 SD \u5361&#xff1b;\u26a0\ufe0f\u6ce8\u610f\u8bbe\u5907\u8282\u70b9\u5982\/dev\/sdb&#xff0c;\u5343\u4e07\u4e0d\u8981\u8bef\u5199\u5165\u7cfb\u7edf\u786c\u76d8<\/li>\n<li>objdump \u53cd\u6c47\u7f16 ELF&#xff0c;\u67e5\u770b\u6c47\u7f16\u4ee3\u7801&#xff0c;\u8c03\u8bd5\u7a0b\u5e8f\u6267\u884c\u6d41\u7a0b<\/li>\n<li>\u7f16\u5199 Makefile&#xff0c;\u81ea\u52a8\u5316\u7f16\u8bd1\u3001\u6e05\u7406\u5de5\u7a0b&#xff0c;\u63d0\u5347\u5f00\u53d1\u6548\u7387<\/li>\n<\/ul>\n<hr \/>\n<h3>&#x1f525; \u672c\u7ae0\u6613\u9519\u70b9 &amp; \u9762\u8bd5\u901f\u8bb0\u6e05\u5355<\/h3>\n<li>ARM \u6808&#xff1a;\u6ee1\u51cf\u6808 FD&#xff0c;\u6808\u9876\u6307\u5411\u6709\u6548\u6570\u636e&#xff0c;\u5730\u5740\u4ece\u9ad8\u2192\u4f4e<\/li>\n<li>CPSR \u56db\u4e2a\u6807\u5fd7&#xff1a;N \u8d1f\u3001Z \u96f6\u3001C \u8fdb\u4f4d\u3001V \u6709\u7b26\u53f7\u6ea2\u51fa<\/li>\n<li>\u51fd\u6570\u4f20\u53c2&#xff1a;R0~R3 \u5b58\u524d 4 \u53c2\u6570&#xff0c;R0 \u8fd4\u56de\u7ed3\u679c<\/li>\n<li>BL \u4fdd\u5b58 LR&#xff0c;BX LR \u5b9e\u73b0\u8fd4\u56de&#xff1b;B \u4e0d\u4f1a\u4fdd\u5b58\u8fd4\u56de\u5730\u5740<\/li>\n<li>i.MX6ULL DDR \u8d77\u59cb\u5730\u5740&#xff1a;0x80000000<\/li>\n<li>IOMUXC \u8d1f\u8d23\u5f15\u811a\u590d\u7528&#xff1b;GDIR \u8bbe\u7f6e GPIO \u65b9\u5411&#xff1b;DR \u8f93\u51fa\u7535\u5e73<\/li>\n<li>\u5927\u5199.S \u6c47\u7f16\u6587\u4ef6&#xff1a;\u652f\u6301\u9884\u5904\u7406&#xff1b;\u5c0f\u5199.s \u4e0d\u505a\u9884\u5904\u7406<\/li>\n<li>\u542f\u52a8\u987a\u5e8f&#xff1a;\u6c47\u7f16\u521d\u59cb\u5316\u786c\u4ef6\u3001\u6808\u3001\u5f02\u5e38\u5411\u91cf \u2192 \u8df3\u8f6c C \u8bed\u8a00 main<\/li>\n<li>\u4ea4\u53c9\u7f16\u8bd1\u6d41\u7a0b&#xff1a;.S \u2192 .o \u2192 ELF \u2192 .bin<\/li>\n<li>SD \u5361\u70e7\u5f55\u52a1\u5fc5\u6838\u5bf9\u8bbe\u5907\u8282\u70b9&#xff0c;\u9632\u6b62\u7834\u574f\u7535\u8111\u78c1\u76d8<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00<br \/>\n\u672c\u7ae0\u8282\u4ece ARM \u6c47\u7f16\u57fa\u7840\u3001\u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u673a\u5236&#xff0c;\u8fc7\u6e21\u5230 i.MX6ULL Cortex-A7 \u88f8\u673a\u73af\u5883\u642d\u5efa&#xff0c;\u6700\u540e\u5b8c\u6210\u88f8\u673a\u70b9\u706f\u5b8c\u6574\u5de5\u7a0b\u3002\u5185\u5bb9\u8986\u76d6\u5bc4\u5b58\u5668\u3001\u6307\u4ee4\u96c6\u3001\u5f02\u5e38\u5411\u91cf\u8868\u3001\u542f\u52a8\u4ee3\u7801\u3001GPIO \u786c\u4ef6\u914d\u7f6e\u3001\u4ea4\u53c9\u7f16\u8bd1\u3001\u70e7\u5f55\u8c03\u8bd5&#xff0c;\u662f\u5d4c\u5165\u5f0f ARM \u88f8\u673a\u5165\u95e8\u6838\u5fc3\u5185\u5bb9\u3002<br \/>\n\u6574\u4f53\u5b66\u4e60\u94fe\u8def&#xff1a;ARM \u6c47\u7f16\u57fa\u7840 \u2192 \u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u89c4\u8303 \u2192 \u542f\u52a8\u4ee3\u7801\u4e0e\u5f02\u5e38\u5411\u91cf \u2192 i.MX6ULL \u786c\u4ef6\u67b6\u6784 \u2192 \u88f8\u673a\u70b9\u706f\u5b9e\u9a8c&#xff08;\u6c47\u7f16\u5b9e\u73b0<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1757],"topic":[],"class_list":["post-108009","post","type-post","status-publish","format-standard","hentry","category-server","tag-arm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title># ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/108009.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00 \u672c\u7ae0\u8282\u4ece ARM \u6c47\u7f16\u57fa\u7840\u3001\u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u673a\u5236&#xff0c;\u8fc7\u6e21\u5230 i.MX6ULL Cortex-A7 \u88f8\u673a\u73af\u5883\u642d\u5efa&#xff0c;\u6700\u540e\u5b8c\u6210\u88f8\u673a\u70b9\u706f\u5b8c\u6574\u5de5\u7a0b\u3002\u5185\u5bb9\u8986\u76d6\u5bc4\u5b58\u5668\u3001\u6307\u4ee4\u96c6\u3001\u5f02\u5e38\u5411\u91cf\u8868\u3001\u542f\u52a8\u4ee3\u7801\u3001GPIO \u786c\u4ef6\u914d\u7f6e\u3001\u4ea4\u53c9\u7f16\u8bd1\u3001\u70e7\u5f55\u8c03\u8bd5&#xff0c;\u662f\u5d4c\u5165\u5f0f ARM \u88f8\u673a\u5165\u95e8\u6838\u5fc3\u5185\u5bb9\u3002 \u6574\u4f53\u5b66\u4e60\u94fe\u8def&#xff1a;ARM \u6c47\u7f16\u57fa\u7840 \u2192 \u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u89c4\u8303 \u2192 \u542f\u52a8\u4ee3\u7801\u4e0e\u5f02\u5e38\u5411\u91cf \u2192 i.MX6ULL \u786c\u4ef6\u67b6\u6784 \u2192 \u88f8\u673a\u70b9\u706f\u5b9e\u9a8c&#xff08;\u6c47\u7f16\u5b9e\u73b0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/108009.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-20T11:16:45+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/108009.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/108009.html\",\"name\":\"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-20T11:16:45+00:00\",\"dateModified\":\"2026-09-20T11:16:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/108009.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/108009.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/108009.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/108009.html","og_locale":"zh_CN","og_type":"article","og_title":"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u8a00 \u672c\u7ae0\u8282\u4ece ARM \u6c47\u7f16\u57fa\u7840\u3001\u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u673a\u5236&#xff0c;\u8fc7\u6e21\u5230 i.MX6ULL Cortex-A7 \u88f8\u673a\u73af\u5883\u642d\u5efa&#xff0c;\u6700\u540e\u5b8c\u6210\u88f8\u673a\u70b9\u706f\u5b8c\u6574\u5de5\u7a0b\u3002\u5185\u5bb9\u8986\u76d6\u5bc4\u5b58\u5668\u3001\u6307\u4ee4\u96c6\u3001\u5f02\u5e38\u5411\u91cf\u8868\u3001\u542f\u52a8\u4ee3\u7801\u3001GPIO \u786c\u4ef6\u914d\u7f6e\u3001\u4ea4\u53c9\u7f16\u8bd1\u3001\u70e7\u5f55\u8c03\u8bd5&#xff0c;\u662f\u5d4c\u5165\u5f0f ARM \u88f8\u673a\u5165\u95e8\u6838\u5fc3\u5185\u5bb9\u3002 \u6574\u4f53\u5b66\u4e60\u94fe\u8def&#xff1a;ARM \u6c47\u7f16\u57fa\u7840 \u2192 \u6c47\u7f16 C \u6df7\u5408\u7f16\u7a0b\u89c4\u8303 \u2192 \u542f\u52a8\u4ee3\u7801\u4e0e\u5f02\u5e38\u5411\u91cf \u2192 i.MX6ULL \u786c\u4ef6\u67b6\u6784 \u2192 \u88f8\u673a\u70b9\u706f\u5b9e\u9a8c&#xff08;\u6c47\u7f16\u5b9e\u73b0","og_url":"https:\/\/www.wsisp.com\/helps\/108009.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-20T11:16:45+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/108009.html","url":"https:\/\/www.wsisp.com\/helps\/108009.html","name":"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-20T11:16:45+00:00","dateModified":"2026-09-20T11:16:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/108009.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/108009.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/108009.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"# ARM \u88f8\u673a\u5f00\u53d1\uff5cARM \u6c47\u7f16 + C \u6df7\u5408\u7f16\u7a0b + i.MX6ULL \u70b9\u706f\u5b9e\u9a8c"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/108009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=108009"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/108009\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=108009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=108009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=108009"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=108009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}