<?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>CodeWarrior Development Toolsのトピック.incbin produces the wrong result (does not match original file)</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1467569#M8782</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to add some binary file to the final elf according to section&lt;BR /&gt;&lt;STRONG&gt;12.2.7.1.3 incbin&lt;/STRONG&gt;&lt;BR /&gt;of "&lt;A href="https://www.nxp.com/docs/en/user-guide/CWPABTR.pdf" target="_blank" rel="noopener"&gt;CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual&lt;/A&gt;"&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Below is the the source of asm file:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;.section .rodata
.global _flashBuf
_flashBuf:
.incbin "D:/Freescale/Projects/test-core00/Sources/flash.bin"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final elf file contains the original data from binary "flash.bin" file of the correct size but with all bytes 0x0A changed to 0x0D. All other bytes except of 0x0A are not changed.&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;It looks like .incbin parses the binary file not as raw data, but as text,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 16:19:19 GMT</pubDate>
    <dc:creator>forum2</dc:creator>
    <dc:date>2022-06-01T16:19:19Z</dc:date>
    <item>
      <title>.incbin produces the wrong result (does not match original file)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1467569#M8782</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to add some binary file to the final elf according to section&lt;BR /&gt;&lt;STRONG&gt;12.2.7.1.3 incbin&lt;/STRONG&gt;&lt;BR /&gt;of "&lt;A href="https://www.nxp.com/docs/en/user-guide/CWPABTR.pdf" target="_blank" rel="noopener"&gt;CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual&lt;/A&gt;"&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Below is the the source of asm file:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;.section .rodata
.global _flashBuf
_flashBuf:
.incbin "D:/Freescale/Projects/test-core00/Sources/flash.bin"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final elf file contains the original data from binary "flash.bin" file of the correct size but with all bytes 0x0A changed to 0x0D. All other bytes except of 0x0A are not changed.&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;It looks like .incbin parses the binary file not as raw data, but as text,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 16:19:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1467569#M8782</guid>
      <dc:creator>forum2</dc:creator>
      <dc:date>2022-06-01T16:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: .incbin produces the wrong result (does not match original file)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468014#M8785</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Please let us know your chip part number thus we can assign this thread to the right engineer.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 06:33:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468014#M8785</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2022-06-02T06:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: .incbin produces the wrong result (does not match original file)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468251#M8786</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have recompiled the project for each processor from the drop-down list:&lt;BR /&gt;e300v1, e300c2, e300c3, e300c4, e500e1, e500v2, e600 and generic processors.&lt;BR /&gt;&lt;SPAN class=""&gt;The result is the same and does not depend on the specific processor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/182105i3DF376623B556CA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 13:32:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468251#M8786</guid>
      <dc:creator>forum2</dc:creator>
      <dc:date>2022-06-02T13:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: .incbin produces the wrong result (does not match original file)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468346#M8787</link>
      <description>Hi, I answered you in a previous message.</description>
      <pubDate>Thu, 02 Jun 2022 17:14:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468346#M8787</guid>
      <dc:creator>forum2</dc:creator>
      <dc:date>2022-06-02T17:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: .incbin produces the wrong result (does not match original file)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468416#M8788</link>
      <description>&lt;P&gt;The problem turned out to be in assembler: PA\PA_Tools\Command_Line_Tools\mwasmeppc.exe&lt;BR /&gt;It's a bug that the binary file by &lt;STRONG&gt;.incbin&lt;/STRONG&gt; directive is opened as text and than function FixTextHandle called internally where &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;all '\n' characters are replaced with '\r'.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;In my case the mwasmeppc.exe file has the following version:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Freescale assembler for embedded PowerPC.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Version 4.3 build 303&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Run time: June 16, 2015, 12:00:17 PM.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 20:01:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1468416#M8788</guid>
      <dc:creator>forum2</dc:creator>
      <dc:date>2022-06-02T20:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: .incbin produces the wrong result (does not match original file)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1472135#M8792</link>
      <description>&lt;P&gt;The version (&lt;SPAN class=""&gt;Version 4.3 build 303&lt;/SPAN&gt;&amp;nbsp;)&amp;nbsp;of&amp;nbsp;&lt;SPAN&gt;mwasmeppc.exe is from CodeWarrior for PA 10.5.1, it is the latest version for PA architecture. I will report this bug to CodeWarrior development team.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 08:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/incbin-produces-the-wrong-result-does-not-match-original-file/m-p/1472135#M8792</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2022-06-10T08:57:38Z</dc:date>
    </item>
  </channel>
</rss>

