<?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: S12DG256 - Trying to flash page 3F in program. in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140908#M3166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I think you get your answer from following thread:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &lt;A href="http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&amp;amp;thread.id=4255" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&amp;amp;thread.id=4255&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2007 13:47:58 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2007-07-27T13:47:58Z</dc:date>
    <item>
      <title>S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140901#M3159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to load my S12DG256 program from a external memory(sd card)and re-flash my the Page 30,,,35 and 3F.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I try to put all the code used for this in the Page 36.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But my program use the rtshc12.c function like _LCMP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I move theses functions from page 3F to Page 36 and how to do it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;#ifdef __cplusplusextern "C"#endif#pragma NO_FRAME#pragma NO_ENTRY#pragma NO_EXITvoid _LCMP (void) {__asm {CPD 4,SPBEQ L1PSHXXGDXSBCB 5,SPSBCA 4,SPXGDXANDCC #0xFB ; clr zPULXBRA doneL1: CPX 2,SPdone:PULY ; load return addressLEAS 4, SP ; release stack argumentsJMP 0, Y}}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I try to use :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#pragma CODE_SEG CODE_CPYMEM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but it does nothing.&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;--&lt;BR /&gt;Alban Edit: FSL Part Number must figure in Message Subject line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by Alban on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-07-24&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;02:11 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:41:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140901#M3159</guid>
      <dc:creator>hdan</dc:creator>
      <dc:date>2020-10-29T08:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140902#M3160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Perhaps less difficult, i can push all my data in the others pages.(then no need to flash the page 3F)&lt;BR /&gt;&lt;BR /&gt;But it create a problem function like sprintf doesn't work&lt;BR /&gt;with far data...&lt;BR /&gt;&lt;BR /&gt;I think there is a way to make these function to deal with far data.&lt;BR /&gt;&lt;BR /&gt;Someone can give me that?&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 22:16:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140902#M3160</guid>
      <dc:creator>hdan</dc:creator>
      <dc:date>2007-07-24T22:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140903#M3161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Remember that when you flash, you can be affecting not only the 'page' you are trying to write to, but the 'bank' as well.&lt;BR /&gt;&lt;BR /&gt;When I did my program, I purposely picked pages for all my 'options' and data so that the code running the flashing wasn't on the same bank.&lt;BR /&gt;&lt;BR /&gt;Also, remember what else may be affected. ISR vectors for example... If you try to muck with flash so that they can disappear, you'd better have everything disabled that might try to use them!&lt;BR /&gt;&lt;BR /&gt;As to using page 36 instead of 3F, in your case that's really a 'c' issue and I'm not a c person, I did all my stuff in assembly. But in that case, all I did was 'org' my code to be at the 'flat address' of the page. However, I did write my own page switching routines. (In one case, I did identical routines on two pages, and what I called and used depended on what my target page was.)&lt;BR /&gt;&lt;BR /&gt;Mike&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 22:36:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140903#M3161</guid>
      <dc:creator>mke_et</dc:creator>
      <dc:date>2007-07-24T22:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140904#M3162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Using anything else than page 3F for the loader means that you have to at least temporarily erase the reset vector, therefore if the board looses power just at this time (Murphy), it does not boot anymore (and you can only rescue it via BDM).&lt;BR /&gt;&lt;BR /&gt;About your question of how to use sprintf with far pointers, search in this forum, I think this came up a couple of times. Basically possible but __far pointers are not especially efficient for the HC12/S12. So check what you really need, and avoid to use __far everywhere.&lt;BR /&gt;&lt;BR /&gt;Also putting _LCMP into a paged bank can cause troubles if anything outside of this page is using _LCMP. The _LCMP runtime routine is called with a JSR, so calls from another page will not reach it. If the complete application is just on a single page, say 0x36, then PPAGE is always just set right anyway. But be careful not to place any code in the same application anywhere else.&lt;BR /&gt;What you should think of, if you did not do it already, is to create the loader in its own completely separate ELF application. This way it gets its own copy of the runtime support and you can place it all together into its own completely separate area.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 03:23:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140904#M3162</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-07-25T03:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140905#M3163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just to close the loop on the question around storing string constants in banked memory, there is a FAQ available on&amp;nbsp;that topic.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just go the Freescale web page and search for "FAQ-27439".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 13:30:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140905#M3163</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-07-25T13:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140906#M3164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks to all, i think with these answers i'll found the solution.&lt;BR /&gt;&lt;BR /&gt;hdan.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 14:35:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140906#M3164</guid>
      <dc:creator>hdan</dc:creator>
      <dc:date>2007-07-25T14:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140907#M3165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;hello,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Well, i've done it and i can work with string in banked page now but i have a problem:&lt;BR /&gt;&lt;BR /&gt;char stH[10]=" --- ";&lt;BR /&gt;char stO[30];&lt;BR /&gt;nInd = sprintf(stO,stH); // =&amp;gt; good result&lt;BR /&gt;nInd = sprintf(stO,"%s",stH); // =&amp;gt; bad one&lt;BR /&gt;&lt;BR /&gt;why ?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 16:03:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140907#M3165</guid>
      <dc:creator>hdan</dc:creator>
      <dc:date>2007-07-26T16:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: S12DG256 - Trying to flash page 3F in program.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140908#M3166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I think you get your answer from following thread:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &lt;A href="http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&amp;amp;thread.id=4255" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&amp;amp;thread.id=4255&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 13:47:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12DG256-Trying-to-flash-page-3F-in-program/m-p/140908#M3166</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-07-27T13:47:58Z</dc:date>
    </item>
  </channel>
</rss>

