<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: Link Error : Undefined : mcf5xxx_byterev</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Link-Error-Undefined-mcf5xxx-byterev/m-p/220439#M11254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may find that this routine is in an assembly file somewhere since the Coldfire has a specal assembler instruction that can be used to reverse bytes very efficiently:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CodeWarrior assembler is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;_byte_rev:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byterev.l d0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GCC assembler may be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;byte_rev:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; move.l&amp;nbsp; 4(%SP),%D0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byterev.l %D0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rts&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, it can also be replaced by a macro similar to the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#define fnLE_add(x) ((x &amp;gt;&amp;gt; 24) | ((x &amp;gt;&amp;gt; 8) &amp;amp; 0x0000ff00) | ((x &amp;lt;&amp;lt; 8) &amp;amp; 0x00ff0000) | ((x &amp;lt;&amp;lt; 24) &amp;amp; 0xff000000))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.uTasker.com" rel="nofollow" target="_self"&gt;www.uTasker.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Sep 2010 15:32:33 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2010-09-02T15:32:33Z</dc:date>
    <item>
      <title>Link Error : Undefined : mcf5xxx_byterev</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Link-Error-Undefined-mcf5xxx-byterev/m-p/220438#M11253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Help please!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;typedef unsigned long int hcc_u32;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;extern hcc_u32 mcf5xxx_byterev(hcc_u32 val);&lt;BR /&gt;&lt;BR /&gt;#define WR_LE32(a, v) ((*(hcc_u32*)(a))=mcf5xxx_byterev(v))&lt;BR /&gt;#define WR_LE16(a, v) ((*(hcc_u16*)(a))=(hcc_u16)(mcf5xxx_byterev(v) &amp;gt;&amp;gt; 16))&lt;BR /&gt;#define RD_LE32(a)&amp;nbsp;&amp;nbsp;&amp;nbsp; (mcf5xxx_byterev(*(hcc_u32*)(a)))&lt;BR /&gt;#define RD_LE16(a)&amp;nbsp;&amp;nbsp;&amp;nbsp; ((hcc_u16)(mcf5xxx_byterev((hcc_u32)*(hcc_u16*)(a))&amp;gt;&amp;gt;16))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; WR_LE32(&amp;amp;BDT_CTL_RX(1,0),1);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mcf5xxx_byterev is undefined!&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 15:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Link-Error-Undefined-mcf5xxx-byterev/m-p/220438#M11253</guid>
      <dc:creator>opv</dc:creator>
      <dc:date>2010-09-02T15:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Link Error : Undefined : mcf5xxx_byterev</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Link-Error-Undefined-mcf5xxx-byterev/m-p/220439#M11254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may find that this routine is in an assembly file somewhere since the Coldfire has a specal assembler instruction that can be used to reverse bytes very efficiently:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CodeWarrior assembler is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;_byte_rev:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byterev.l d0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GCC assembler may be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;byte_rev:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; move.l&amp;nbsp; 4(%SP),%D0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byterev.l %D0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rts&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, it can also be replaced by a macro similar to the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#define fnLE_add(x) ((x &amp;gt;&amp;gt; 24) | ((x &amp;gt;&amp;gt; 8) &amp;amp; 0x0000ff00) | ((x &amp;lt;&amp;lt; 8) &amp;amp; 0x00ff0000) | ((x &amp;lt;&amp;lt; 24) &amp;amp; 0xff000000))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.uTasker.com" rel="nofollow" target="_self"&gt;www.uTasker.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 15:32:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Link-Error-Undefined-mcf5xxx-byterev/m-p/220439#M11254</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2010-09-02T15:32:33Z</dc:date>
    </item>
  </channel>
</rss>

