<?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>LPC MicrocontrollersのトピックRe: How do I enlarge .bin file size, and write data to a specific address?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1414186#M47916</link>
    <description>&lt;P&gt;Binary files are not intended for that purpose. They contain no meta information, just plain machine code. Here is a good explanation:&lt;A href="https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_an_introduction_to_binary_files.html" target="_blank"&gt;https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_an_introduction_to_binary_files.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Your best option, as suggested, would be to switch to a format containing meta data, namely addresses. Like S19/S-Record, or Intel HEX. This is usually done in the linker settings of your project.&lt;/P&gt;&lt;P&gt;As the given link explains, you can always create a bin file from a S19/HEX file with the &lt;FONT face="courier new,courier"&gt;objcopy&lt;/FONT&gt; command.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Feb 2022 06:46:18 GMT</pubDate>
    <dc:creator>frank_m</dc:creator>
    <dc:date>2022-02-16T06:46:18Z</dc:date>
    <item>
      <title>How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411524#M47873</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using LPC4078 with MCUXPresso.&lt;/P&gt;&lt;P&gt;By default, the file size of .bin is smaller than flash size, but I wanted to enlarge file size to 0x80000 (Whole flash), and locate 4-bytes data at 0x7fffc.&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 04:21:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411524#M47873</guid>
      <dc:creator>at-nakano</dc:creator>
      <dc:date>2022-02-10T04:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411555#M47874</link>
      <description>&lt;P&gt;Hi,Atsuki,&lt;/P&gt;
&lt;P&gt;As you know that the *.bin file only contains binary code and data, which does not contain any address, if you want to enlarge the data to 0x8_0000, you have to fill all the hole with data until it reach to 0x8_0000 address.&lt;/P&gt;
&lt;P&gt;I suggest you generates S-Record file, which has address information, so you are not required to fill the empty address.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 06:01:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411555#M47874</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-02-10T06:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411564#M47875</link>
      <description>&lt;P&gt;Hi XiangJun Rong&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;Right after I posted this question, I was realized that the .bin file is not a flash image, and my question was so stupid...&lt;/P&gt;&lt;P&gt;Anyway, I'll check S-Record as you recommended to, but it is appreciated if you have some information about S-Record.&lt;/P&gt;&lt;P&gt;Thanx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 06:26:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411564#M47875</guid>
      <dc:creator>at-nakano</dc:creator>
      <dc:date>2022-02-10T06:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411582#M47876</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; As you know that the *.bin file only contains binary code and data, which does not contain any address, if you want to enlarge the data to 0x8_0000, you have to fill all the hole with data until it reach to 0x8_0000 address.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This should not be necessary.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If one defines variables/data at given addresses, the linker will place it there, and the BIN file will automatically fill up all the gaps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is why the question is usually the other way around : "Why is my BIN file so big ?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The GCC toolchain uses the __attribute__ specifier to modify such features. Check the tutorial for details.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 06:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411582#M47876</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-02-10T06:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411585#M47877</link>
      <description>&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I understand and will check more based on your information.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 06:50:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411585#M47877</guid>
      <dc:creator>at-nakano</dc:creator>
      <dc:date>2022-02-10T06:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411594#M47878</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;For the S-Record file format, pls refer to the docs:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.amelek.gda.pl/avr/uisp/srecord.htm" target="_blank"&gt;http://www.amelek.gda.pl/avr/uisp/srecord.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/SREC_(file_format)" target="_blank"&gt;https://en.wikipedia.org/wiki/SREC_(file_format)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 07:04:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411594#M47878</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-02-10T07:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411598#M47879</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 07:12:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411598#M47879</guid>
      <dc:creator>at-nakano</dc:creator>
      <dc:date>2022-02-10T07:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411653#M47882</link>
      <description>&lt;P&gt;I never tried that with the MCUXpresso toolchain. You might need to to create a special linker section.&lt;/P&gt;&lt;P&gt;The syntax is very toolchain specific, and I did the same thing for the IAR and Keil enviroments a while ago, which use different compilers.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 08:31:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1411653#M47882</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-02-10T08:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1414170#M47915</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Thank you guys for the answers, it helps a lot.&lt;/P&gt;&lt;P&gt;However, I have not solved the issue to be cleared.&lt;/P&gt;&lt;P&gt;What I wanted to is, put 4 bytes data at very end of bin file, regardless file size.&lt;/P&gt;&lt;P&gt;I did tried # pragma directive like:&lt;/P&gt;&lt;P&gt;#pragma address data_on_eof = 0x2f000&lt;/P&gt;&lt;P&gt;ULONG data_on_eof = 0x0000E1F1;&lt;/P&gt;&lt;P&gt;Note: Current file size is 179,356 bytes (0x2bc9c)&lt;/P&gt;&lt;P&gt;But line "#pragma" was ignored by gcc, and&lt;BR /&gt;.data.data_on_eof&lt;BR /&gt;0x10000000 0x4 ./src/test/test.o&lt;BR /&gt;0x10000000 data_on_eof&lt;/P&gt;&lt;P&gt;Is there any way to locate "data_on_eof" at the very end of .bin file anyway?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 06:18:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1414170#M47915</guid>
      <dc:creator>at-nakano</dc:creator>
      <dc:date>2022-02-16T06:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enlarge .bin file size, and write data to a specific address?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1414186#M47916</link>
      <description>&lt;P&gt;Binary files are not intended for that purpose. They contain no meta information, just plain machine code. Here is a good explanation:&lt;A href="https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_an_introduction_to_binary_files.html" target="_blank"&gt;https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_an_introduction_to_binary_files.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Your best option, as suggested, would be to switch to a format containing meta data, namely addresses. Like S19/S-Record, or Intel HEX. This is usually done in the linker settings of your project.&lt;/P&gt;&lt;P&gt;As the given link explains, you can always create a bin file from a S19/HEX file with the &lt;FONT face="courier new,courier"&gt;objcopy&lt;/FONT&gt; command.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 06:46:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-do-I-enlarge-bin-file-size-and-write-data-to-a-specific/m-p/1414186#M47916</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-02-16T06:46:18Z</dc:date>
    </item>
  </channel>
</rss>

