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

📄 port_assembly_source_code_from_vdsp_to_uclinux.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>  <title></title>  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><div class="toc"><div class="tocheader toctoggle" id="toc__header">Table of Contents</div><div id="toc__inside"><ul class="toc"><li class="level1"><div class="li"><span class="li"><a href="#porting_assembly_source_code_to_uclinux" class="toc">Porting Assembly source code to uClinux</a></span></div><ul class="toc"><li class="level2"><div class="li"><span class="li"><a href="#compile_.asm_files" class="toc">Compile *.ASM files</a></span></div></li><li class="level2"><div class="li"><span class="li"><a href="#assembler_directives" class="toc">Assembler Directives</a></span></div></li></ul></li></ul></div></div><h1><a name="porting_assembly_source_code_to_uclinux" id="porting_assembly_source_code_to_uclinux">Porting Assembly source code to uClinux</a></h1><div class="level1"><p> Here are some common guide lines:</p></div><!-- SECTION [1-90] --><h2><a name="compile_.asm_files" id="compile_.asm_files">Compile *.ASM files</a></h2><div class="level2"><p> VDSP assembly code comes in the form of *.asm.   *.asm contains preprocessing commands, assembler directives, comments etc., and it needs to be pre-processed first.  GCC does not recongnize *.asm files by default. So *.asm files are compiled using command like:</p><pre class="code"> bfin-uclinux-gcc -x assembler-with-cpp test.asm -o test.o </pre><p>&ldquo;-x assembler-with-cpp&rdquo; option tells GCC the input file is an assembly.</p></div><!-- SECTION [91-533] --><h2><a name="assembler_directives" id="assembler_directives">Assembler Directives</a></h2><div class="level2"><p>Some VDSP Aseembler is not recongnized by GCC. We need to do translations: </p><ul><li class="level1"><div class="li"> .byte2 to .short for intialized data <pre class="code">.byte2 array_1[3] = 0, 1, 2;</pre><p>Can be translated to: </p><pre class="code">array_1:.short 0, 1, 2;</pre></div></li></ul><ul><li class="level1"><div class="li"> .byte4 to .long for initialized data <pre class="code">.byte4 array_1[3] = 0, 1, 2;</pre><p> Can be translated to: </p><pre class="code">array_1:.long 0, 1, 2;</pre></div></li></ul><ul><li class="level1"><div class="li"> Define uninitialized data using &ldquo;.space&rdquo;<pre class="code">.byte4 array_1[3];</pre><p>For blackfin gcc: </p><pre class="code">.align 4;array_1:.space 12;</pre></div></li></ul><p> &ldquo;&rdquo;&ldquo;&rdquo; </p><p>For more information on Gnu assembler directives, refer to the manual here: <a href="http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_mono/as.html#SEC67" class="urlextern" title="http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_mono/as.html#SEC67"  rel="nofollow">http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_mono/as.html#SEC67</a>.</p></div><!-- SECTION [534-] --></body></html>

⌨️ 快捷键说明

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