<?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: USBDM MC9S12G96 programming problem in OSBDM and TBDML</title>
    <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1792361#M3867</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The situation is as described above but there is a simpler solution.&amp;nbsp; If you add &lt;STRONG&gt;&lt;EM&gt;pageReset="0x0E"&lt;/EM&gt;&lt;/STRONG&gt; to the paged memory range it should accept programming in the paged area and will set the PPAGE accordingly (0xE).&lt;/P&gt;&lt;PRE&gt; &amp;lt;memoryRange start="0x8000" end="0xBFFF" &lt;STRONG&gt;pageReset="0x0E"&lt;/STRONG&gt; pages="128K" pageEnd="0x0F" /&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;This has not been tested as I can't find a suitable device for testing.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jan 2024 03:31:35 GMT</pubDate>
    <dc:creator>pgo</dc:creator>
    <dc:date>2024-01-20T03:31:35Z</dc:date>
    <item>
      <title>USBDM MC9S12G96 programming problem</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1791824#M3864</link>
      <description>&lt;P&gt;9S12G96 programs normally until I try to add code starting at flash address $8000.&lt;/P&gt;&lt;P&gt;The USBDM shows "program data not within target flash memory".&lt;/P&gt;&lt;P&gt;The PPAGE is set to $0e (default value). This should make the $8000..$bfff page visible for programming.&lt;/P&gt;&lt;P&gt;Pages $4000..$7fff and $c000.. $ffff all program pefectly well.&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 09:44:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1791824#M3864</guid>
      <dc:creator>rdr</dc:creator>
      <dc:date>2024-01-19T09:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM MC9S12G96 programming problem</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1791893#M3865</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There isn't sufficient information to suggest a reason with any certainty.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The PPAGE is set to $0e (default value).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does the &lt;STRONG&gt;&lt;EM&gt;image&lt;/EM&gt;&lt;/STRONG&gt; you are programming &lt;STRONG&gt;&lt;EM&gt;assume&lt;/EM&gt;&lt;/STRONG&gt; that the PPAGE actually has a value i.e. the image has data in the range 0x8000 to 0xBFFF that is destined for page 0xE?&amp;nbsp; If so, that is the problem.&amp;nbsp; The programmer has no way of knowing what PPAGE value you are using - this is something that is done by your running program.&amp;nbsp; It's not psychic.&lt;/P&gt;&lt;P&gt;The programmer uses the following memory map:&lt;/P&gt;&lt;PRE&gt; &amp;lt;memory pageAddress="0x0015" registerAddress="0x0100" type="flash" securityAddress="0xFF00" sectorSize="512" alignment="8"&amp;gt;&lt;BR /&gt;&amp;lt;securityEntryRef ref="HCS12-fprot-eeprot-fopt-security" /&amp;gt;&lt;BR /&gt;&amp;lt;memoryRange start="0x1000" end="0x1FFF" /&amp;gt; &amp;lt;!-- Gap between EEPROM and RAM --&amp;gt;&lt;BR /&gt;&amp;lt;memoryRange start="0x4000" end="0x7FFF" /&amp;gt;&lt;BR /&gt;&amp;lt;memoryRange start="0x8000" end="0xBFFF" pages="6" pageEnd="0x0F" /&amp;gt;&lt;BR /&gt;&amp;lt;memoryRange start="0xC000" end="0xFFFF" /&amp;gt;&lt;BR /&gt;&amp;lt;/memory&amp;gt;&lt;/PRE&gt;&lt;P&gt;Most development tools will create an image containing data for page 0xE.&amp;nbsp; This will have a &lt;STRONG&gt;&lt;EM&gt;paged&amp;nbsp; &lt;/EM&gt;&lt;/STRONG&gt;address range of [0xE8000,0xBFFF] as required by the programmer.&amp;nbsp; You running program can set the PPAGE to E and access that data in the expected location.&amp;nbsp; I know Codewarrior used to do this but it's been a long time since I've used it.&lt;/P&gt;&lt;P&gt;Solutions (assuming the above is the problem):&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Modify your linker map to correctly create the image - sorry I have no idea of the details.&lt;/LI&gt;&lt;LI&gt;Edit .../DeviceData/hcs12_devices.xml to add a &lt;STRONG&gt;&lt;EM&gt;small&lt;/EM&gt;&lt;/STRONG&gt; memory model e.g. MC9S12G96_small based on an existing model.&amp;nbsp;&amp;nbsp; If you remove the &lt;STRONG&gt;&lt;EM&gt;pageAddress=...&lt;/EM&gt;&lt;/STRONG&gt; the programmer should not access PPAGE and the reset default will be unchanged.&amp;nbsp; This will be effectively the model you are using.&amp;nbsp; Obvious broken if you go beyond 64k (small model).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The above is pure guesswork.&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 11:40:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1791893#M3865</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2024-01-19T11:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM MC9S12G96 programming problem</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1792342#M3866</link>
      <description>&lt;P&gt;Hi pgo,&lt;/P&gt;&lt;P&gt;Thank you for the prompt reply.&lt;/P&gt;&lt;P&gt;Firstly, some clarification:&lt;/P&gt;&lt;P&gt;I use several S12 variants namely S12XE256, S12G48, S12P128 and S12G96.&lt;/P&gt;&lt;P&gt;I use assembly language for all my applications (really!).&lt;/P&gt;&lt;P&gt;My images are assembled using "AS12" assembler. Despite it's age has served me well for over 20 years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The S-records generated by as12 all look perfectly correct. I assume the S-records are what really matters to the USBM programmer.&lt;/P&gt;&lt;P&gt;As a test I ran some small programs on an S12G48. This has 48K of contiguous Flash memory from $4000 to $ffff. Note that the $8000 to $bfff block is NOT paged, just linear address space.&lt;/P&gt;&lt;P&gt;The first program used two blocks of memory (org) at $4000 and also memory (org) at $c000. This works perfectly well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second program used 3 blocks of memory (org) $4000, $8000, $c000. This program was identical to the first except for about 20 lines of code starting at $c000. This failed to program with the usual "program data not within target flash memory".&lt;/P&gt;&lt;P&gt;Note that I have used full memory map programming on the S12XE256 without problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This problem appears to be peculiar to the programming of G48, G96 and G128 variants (that I have tested anyway).&lt;/P&gt;&lt;P&gt;Thanks for any insights.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 00:43:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1792342#M3866</guid>
      <dc:creator>rdr</dc:creator>
      <dc:date>2024-01-20T00:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM MC9S12G96 programming problem</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1792361#M3867</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The situation is as described above but there is a simpler solution.&amp;nbsp; If you add &lt;STRONG&gt;&lt;EM&gt;pageReset="0x0E"&lt;/EM&gt;&lt;/STRONG&gt; to the paged memory range it should accept programming in the paged area and will set the PPAGE accordingly (0xE).&lt;/P&gt;&lt;PRE&gt; &amp;lt;memoryRange start="0x8000" end="0xBFFF" &lt;STRONG&gt;pageReset="0x0E"&lt;/STRONG&gt; pages="128K" pageEnd="0x0F" /&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;This has not been tested as I can't find a suitable device for testing.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 03:31:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1792361#M3867</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2024-01-20T03:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM MC9S12G96 programming problem</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1792424#M3868</link>
      <description>&lt;P&gt;Hi pgo,&lt;/P&gt;&lt;PRE&gt;&amp;lt;memoryRange start="0x8000" end="0xBFFF" &lt;STRONG&gt;pageReset="0x0E"&lt;/STRONG&gt; pages="128K" pageEnd="0x0F" /&amp;gt;&lt;/PRE&gt;&lt;P&gt;This fixed the problem.&lt;/P&gt;&lt;P&gt;Note the need to change&amp;nbsp; pages="128K"&amp;nbsp; to "96K" or "48K" to suit the G series variant.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 22:56:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-MC9S12G96-programming-problem/m-p/1792424#M3868</guid>
      <dc:creator>rdr</dc:creator>
      <dc:date>2024-01-20T22:56:40Z</dc:date>
    </item>
  </channel>
</rss>

