<?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 Bootloader with DZ60 in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Bootloader-with-DZ60/m-p/179180#M12820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new with DZ 60 and I've found several very interested informations on the forum but I've a little problem&lt;/P&gt;&lt;P&gt;for building a serial bootloader. I'm not very familiar with assembler and prefer C.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) We want to send the .mot (or .s19) file to SCI1 (full duplex) with terminal (or hyperterminal) on Windows.&lt;/P&gt;&lt;P&gt;We use XON/XOFF software protocol to wait for programmation of Flash.&lt;/P&gt;&lt;P&gt;I've built that bootloader (~800 bytes) and I must copy it in Ram then jump to it.&lt;/P&gt;&lt;P&gt;My problem is that all the long jumps in that bootloader are directed in ROM and not in RAM.&lt;/P&gt;&lt;P&gt;I've use the maximum of INLINE functions but relatives jumps are 128 bytes at maximum.&lt;/P&gt;&lt;P&gt;How can I change the adresses of these long jumps ? Or how can I force the compiler not to use&amp;nbsp;&lt;/P&gt;&lt;P&gt;long jumps ?&lt;/P&gt;&lt;P&gt;I thought to write this bootloader for the RAM and then place it into ROM, is it the good solution.&lt;/P&gt;&lt;P&gt;How can I shift a part of code from an adress to an other one ?&lt;/P&gt;&lt;P&gt;(After, I'll have to build an other bootloader for half duplex ModBus protocol but it'll be very similar)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) When programming my device, the eeprom is always cleared (set to 0xFF)&lt;/P&gt;&lt;P&gt;I've tried the following but without succes :&lt;/P&gt;&lt;P&gt;- set the option for non programming EEPROM,&lt;/P&gt;&lt;P&gt;- indicate not to program the 0x1400 0x1800 area&lt;/P&gt;&lt;P&gt;- save the EEPROM contents when preload (the .s19 file is correctly stored)&lt;/P&gt;&lt;P&gt;but, in postload, when I recall the .s19 file, it doesn't load&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I recall my previous eeprom parameters ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) When I stop the debugger, it opens the file at the stop point, is there a way not to open this file&amp;nbsp;&lt;/P&gt;&lt;P&gt;and to stay in the current displayed file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excuse me for my poor knowledge of DZ 60 and my poor english, if you need further informations,&lt;/P&gt;&lt;P&gt;don't hesitate to ask me&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;francois&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Feb 2010 06:00:34 GMT</pubDate>
    <dc:creator>Francois</dc:creator>
    <dc:date>2010-02-25T06:00:34Z</dc:date>
    <item>
      <title>Bootloader with DZ60</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Bootloader-with-DZ60/m-p/179180#M12820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new with DZ 60 and I've found several very interested informations on the forum but I've a little problem&lt;/P&gt;&lt;P&gt;for building a serial bootloader. I'm not very familiar with assembler and prefer C.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) We want to send the .mot (or .s19) file to SCI1 (full duplex) with terminal (or hyperterminal) on Windows.&lt;/P&gt;&lt;P&gt;We use XON/XOFF software protocol to wait for programmation of Flash.&lt;/P&gt;&lt;P&gt;I've built that bootloader (~800 bytes) and I must copy it in Ram then jump to it.&lt;/P&gt;&lt;P&gt;My problem is that all the long jumps in that bootloader are directed in ROM and not in RAM.&lt;/P&gt;&lt;P&gt;I've use the maximum of INLINE functions but relatives jumps are 128 bytes at maximum.&lt;/P&gt;&lt;P&gt;How can I change the adresses of these long jumps ? Or how can I force the compiler not to use&amp;nbsp;&lt;/P&gt;&lt;P&gt;long jumps ?&lt;/P&gt;&lt;P&gt;I thought to write this bootloader for the RAM and then place it into ROM, is it the good solution.&lt;/P&gt;&lt;P&gt;How can I shift a part of code from an adress to an other one ?&lt;/P&gt;&lt;P&gt;(After, I'll have to build an other bootloader for half duplex ModBus protocol but it'll be very similar)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) When programming my device, the eeprom is always cleared (set to 0xFF)&lt;/P&gt;&lt;P&gt;I've tried the following but without succes :&lt;/P&gt;&lt;P&gt;- set the option for non programming EEPROM,&lt;/P&gt;&lt;P&gt;- indicate not to program the 0x1400 0x1800 area&lt;/P&gt;&lt;P&gt;- save the EEPROM contents when preload (the .s19 file is correctly stored)&lt;/P&gt;&lt;P&gt;but, in postload, when I recall the .s19 file, it doesn't load&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I recall my previous eeprom parameters ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) When I stop the debugger, it opens the file at the stop point, is there a way not to open this file&amp;nbsp;&lt;/P&gt;&lt;P&gt;and to stay in the current displayed file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excuse me for my poor knowledge of DZ 60 and my poor english, if you need further informations,&lt;/P&gt;&lt;P&gt;don't hesitate to ask me&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;francois&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 06:00:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Bootloader-with-DZ60/m-p/179180#M12820</guid>
      <dc:creator>Francois</dc:creator>
      <dc:date>2010-02-25T06:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader with DZ60</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Bootloader-with-DZ60/m-p/179181#M12821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linking code for execution 'elsewhere' is done with the linker command:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; COPY_ROM = READ_ONLY 0xEE26 TO 0xEEF2 RELOCATE_TO 0x0100;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CODE_RAM = READ_WRITE 0x0100 TO 0x01CE;&lt;/P&gt;&lt;P&gt;With some appropriate segment names and #pragma sections,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAM_CODE INTO CODE_RAM;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; COPIED_CODE INTO COPY_ROM;&lt;/P&gt;&lt;P&gt;&amp;nbsp;this code moves it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void copy_down(void) //Shift FLASH handling code that must run in RAM&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t *srcPtr, *dstPtr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint16_t cnt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt&amp;nbsp;= (u16_t)__SEG_SIZE_COPIED_CODE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcPtr = (u8_t *)(u16_t)__SEG_START_COPIED_CODE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstPtr = (u8_t *)(u16_t)&amp;amp;Do_Cmd;&amp;nbsp; //Locate linked entry point of first procedure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; *dstPtr++ = *srcPtr++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }while( --cnt&amp;gt; 0 );&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jul 2010 19:34:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Bootloader-with-DZ60/m-p/179181#M12821</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2010-07-26T19:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader with DZ60</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Bootloader-with-DZ60/m-p/179182#M12822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I note that the 'DZ series does have two independent flash arrays, one for program flash and the other array for the EEPROM flash.&amp;nbsp; Therefore, while it will do no harm, it should be unnecessary to transfer and run any code from RAM, specifically for this type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The flash programming function could be located in EEPROM flash, and the EEPROM programming function within program flash array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 05:15:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Bootloader-with-DZ60/m-p/179182#M12822</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-07-27T05:15:47Z</dc:date>
    </item>
  </channel>
</rss>

