<?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>topic Re: Listing file size vs. on-chip size in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130680#M1428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;rocco wrote:&lt;BR /&gt;Hi, Christian:&lt;BR /&gt;&lt;BR /&gt;The ratio depends on the number of bytes that the linker puts on each line, but it is typically around 2.5 to one. In other words, your 960 byte .S19 file would contain approximately 380 to 400 bytes of code.&lt;BR /&gt;&lt;BR /&gt;Note that data that exists in ram is not represented in the .S19 file, so there is no indication of the amount of ram used.&lt;BR /&gt;&lt;BR /&gt;The linker typically puts 32 bytes of code in each line. All values are represented as hexadecimal, so each byte of code takes two characters. That means 64 bytes for code, and 11 bytes for overhead ("S1", count, address, checksum and carriage-return) add up to 75 characters for every 32 bytes of code.&lt;P&gt;Message Edited by rocco on &lt;SPAN class="date_text"&gt;03-30-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;05:38 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for the detailed explanation. That makes sense, as I have yet to run out of memory but I only had 512 bytes available. I had a faulty board earlier that gave me issues, which I assumed was code stored in RAM running into the stack. However, on a newer board (same kind) the code had no issues at all.&lt;BR /&gt;&lt;BR /&gt;Again, thank you.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Mar 2006 10:12:14 GMT</pubDate>
    <dc:creator>cjw</dc:creator>
    <dc:date>2006-03-31T10:12:14Z</dc:date>
    <item>
      <title>Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130678#M1426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering (out of need and out of curiousity) what the relationship is between the size of the listing file (.s19) on my windows computer and the amount of RAM/ROM occupied on the M68HC912B32 chip. For example, I have a listing file that is 960 bytes according to Windows. Does this translate directly to 960 bytes on the chip? If not, is there a mathematical relationship or a rule of thumb?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 08:48:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130678#M1426</guid>
      <dc:creator>cjw</dc:creator>
      <dc:date>2006-03-31T08:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130679#M1427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Christian:&lt;BR /&gt;&lt;BR /&gt;The ratio depends on the number of bytes that the linker puts on each line, but it is typically around 2.5 to one. In other words, your 960 byte .S19 file would contain approximately 380 to 400 bytes of code.&lt;BR /&gt;&lt;BR /&gt;Note that data that exists in ram is not represented in the .S19 file, so there is no indication of the amount of ram used.&lt;BR /&gt;&lt;BR /&gt;The linker typically puts 32 bytes of code in each line. All values are represented as hexadecimal, so each byte of code takes two characters. That means 64 bytes for code, and 11 bytes for overhead ("S1", count, address, checksum and carriage-return) add up to 75 characters for every 32 bytes of code.&lt;P&gt;Message Edited by rocco on &lt;SPAN class="date_text"&gt;03-30-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;05:38 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 09:37:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130679#M1427</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-03-31T09:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130680#M1428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;rocco wrote:&lt;BR /&gt;Hi, Christian:&lt;BR /&gt;&lt;BR /&gt;The ratio depends on the number of bytes that the linker puts on each line, but it is typically around 2.5 to one. In other words, your 960 byte .S19 file would contain approximately 380 to 400 bytes of code.&lt;BR /&gt;&lt;BR /&gt;Note that data that exists in ram is not represented in the .S19 file, so there is no indication of the amount of ram used.&lt;BR /&gt;&lt;BR /&gt;The linker typically puts 32 bytes of code in each line. All values are represented as hexadecimal, so each byte of code takes two characters. That means 64 bytes for code, and 11 bytes for overhead ("S1", count, address, checksum and carriage-return) add up to 75 characters for every 32 bytes of code.&lt;P&gt;Message Edited by rocco on &lt;SPAN class="date_text"&gt;03-30-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;05:38 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for the detailed explanation. That makes sense, as I have yet to run out of memory but I only had 512 bytes available. I had a faulty board earlier that gave me issues, which I assumed was code stored in RAM running into the stack. However, on a newer board (same kind) the code had no issues at all.&lt;BR /&gt;&lt;BR /&gt;Again, thank you.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 10:12:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130680#M1428</guid>
      <dc:creator>cjw</dc:creator>
      <dc:date>2006-03-31T10:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130681#M1429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello Rocco,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The overhead is actually slightly greater than you indicate.&amp;nbsp; For CW S19 files (.SZ),&amp;nbsp;the first line&amp;nbsp;seems to be an extra&amp;nbsp;one containing ASCII path information in S19 format.&amp;nbsp; I presume this gets stripped during the programming process.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 11:42:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130681#M1429</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-03-31T11:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130682#M1430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Mac:&lt;BR /&gt;&lt;BR /&gt;Yeah, I skipped the S0 record and the S9 record. Since most of my firmware is between 8k and 30k, those records don't have much impact.&lt;BR /&gt;&lt;BR /&gt;But to be complete, the file usually starts with an S0 "header" line, which can be anything. CW usually puts a mangled version of the path to the .PRM file, but nothing I know of uses it. The Suite56 linker puts an empty S0 record, so that is 11 more bytes of overhead.&lt;BR /&gt;&lt;BR /&gt;The S9 record at the end of the file simply defines the program start address. It's useful to the debugger, but it isn't used to program the flash. That's another 11 bytes.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 13:29:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130682#M1430</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-03-31T13:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130683#M1431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;Just some additional input on this one.&lt;/P&gt;&lt;P&gt;Yes CodeWarrior for HC(S)08 and CodeWarrior for HC(S)12 put the full path to the&amp;nbsp;actual executable file in the S0 record.&lt;/P&gt;&lt;P&gt;You can disable generation of the path in the S0 record using burner option -Ns=p.&lt;BR /&gt;You can prevent generation of the S0 record using the burner option -Ns=0&lt;BR /&gt;You can prevent generation of the s9 record using the burner option -Ns=9.&lt;/P&gt;&lt;P&gt;For more details, check the description of the option -Ns in the Burner manual or on line help.&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 15:16:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130683#M1431</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-03-31T15:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130684#M1432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello CrasyCat,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;As a matter of curiosity, is there a similar method of preventing the S0 record from occurring&amp;nbsp;in the SZ file directly generated by the assembler (absolute assembly, no linking)?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Apr 2006 00:26:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130684#M1432</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-04-02T00:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130685#M1433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Mac,&lt;BR /&gt;also out of curiosity, why do you need a SRecord file without S0?&lt;BR /&gt;To answer the question, the same method that does apply to linked application does also apply to applications generated directly by the assembler (-Fa2).&lt;BR /&gt;The reason is that not the assembler or the linker are (usually) generating the SRecord, but instead the burner.&lt;BR /&gt;You may have noticed that in crazycat's explanation the option was added to the burner preference.&lt;BR /&gt;The burner is automatically called whenever there is a *.bbl file in the project, regardless if the project is absolute assembly or is using the linker.&lt;P&gt;Message Edited by CompilerGuru on &lt;SPAN class="date_text"&gt;04-01-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;02:56 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Apr 2006 04:56:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130685#M1433</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2006-04-02T04:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Listing file size vs. on-chip size</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130686#M1434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello Compiler Guru,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Thankyou for your response.&lt;/FONT&gt;&lt;/P&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;P&gt;&lt;FONT size="1"&gt;also out of curiosity, why do you need a SRecord file without S0?&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT size="2"&gt;The reason for my previous query is to maintain backward compatibility with S19 files generated by CASM08 - at the moment I am using both CW and P&amp;amp;E tools.&amp;nbsp; The output from CASM08 does not generate an S0 record, and I am not yet sure if the presence of one will upset PROG08 programmer.&amp;nbsp; Of course, I can always strip out the record by hand if it proves to be a problem.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 22:32:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Listing-file-size-vs-on-chip-size/m-p/130686#M1434</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-04-04T22:32:19Z</dc:date>
    </item>
  </channel>
</rss>

