Using: Codewarrior 3.0 on HCS12DG128 How do I map the EEPROM with Codewarrior? The only way I know of is to set the INITEE register manually. If I do that, everything will be fine except that the memory will then be erased at startup, which I don't want. I have written FLASH ERASE 1-8 in preload.cmd to exclude the EEPROM from beeing erased. But sence CW won't know about the INITEE change which will take place at runtime, it will probably erase at the default address and clear where I acctually want to place the EEPROM. Is there a better way to map the EEPROM which will make CW aware of the new location? Thanks in advance, Daniel Lundin |
|
EEPROM mapping in Codewarrior
Started by ●December 11, 2003
Reply by ●December 11, 20032003-12-11
Hi Daniel. I am glad to tell you that the EEPROM driver cares about the INITEE register value and EEPROM location. So if you move it, and can flash and erase it where it was moved. This was a must, as usually the eeprom is partially or totally hidden under chip registers and onchip ram. You can try this if you want: Execute a WB command from the Command window to set INITEE register. Then open the NMVC dialog. You will see that the EEPROM location range changes. Remind that if the reset the chip after the command is played, the eeprom turns back to default location. Regards, Gilles At 03:43 PM 12/11/2003, you wrote: >Using: Codewarrior 3.0 on HCS12DG128 > >How do I map the EEPROM with Codewarrior? > >The only way I know of is to set the INITEE register manually. >If I do that, everything will be fine except that the memory >will then be erased at startup, which I don't want. >I have written FLASH ERASE 1-8 in preload.cmd to exclude the >EEPROM from beeing erased. But sence CW won't know about the >INITEE change which will take place at runtime, it will probably >erase at the default address and clear where I acctually want to >place the EEPROM. > >Is there a better way to map the EEPROM which will make CW >aware of the new location? > >Thanks in advance, >Daniel Lundin > > >-------------------- > >">http://docs.yahoo.com/info/terms/ |
|
Reply by ●December 11, 20032003-12-11
Hi Daniel. I am glad to tell you that the EEPROM driver cares about the INITEE register value and EEPROM location. So if you move it, and can flash and erase it where it was moved. This was a must, as usually the eeprom is partially or totally hidden under chip registers and onchip ram. You can try this if you want: Execute a WB command from the Command window to set INITEE register. Then open the NMVC dialog. You will see that the EEPROM location range changes. Remind that if the reset the chip after the command is played, the eeprom turns back to default location. Regards, Gilles At 03:43 PM 12/11/2003, you wrote: >Using: Codewarrior 3.0 on HCS12DG128 > >How do I map the EEPROM with Codewarrior? > >The only way I know of is to set the INITEE register manually. >If I do that, everything will be fine except that the memory >will then be erased at startup, which I don't want. >I have written FLASH ERASE 1-8 in preload.cmd to exclude the >EEPROM from beeing erased. But sence CW won't know about the >INITEE change which will take place at runtime, it will probably >erase at the default address and clear where I acctually want to >place the EEPROM. > >Is there a better way to map the EEPROM which will make CW >aware of the new location? > >Thanks in advance, >Daniel Lundin > > >-------------------- > >">http://docs.yahoo.com/info/terms/ |
Reply by ●December 12, 20032003-12-12
Thanks for your reply. It seems I've got another problem then, sence the EEPROM is cleared every time I download the program (but not cleared on reset). The program also works fine on DG256 where I don't move the EEPROM at all, so I don't think it has nothing to do with my EEPROM routines. --- In , Gilles Blanquin <gblanquin@m...> wrote: > Hi Daniel. > > I am glad to tell you that the EEPROM driver cares about the INITEE > register value and EEPROM location. So if you move it, and can flash and > erase it where it was moved. > This was a must, as usually the eeprom is partially or totally hidden under > chip registers and onchip ram. > You can try this if you want: > > Execute a WB command from the Command window to set INITEE register. > Then open the NMVC dialog. You will see that the EEPROM location range changes. > > Remind that if the reset the chip after the command is played, the eeprom > turns back to default location. > > Regards, > Gilles > At 03:43 PM 12/11/2003, you wrote: > >Using: Codewarrior 3.0 on HCS12DG128 > > > >How do I map the EEPROM with Codewarrior? > > > >The only way I know of is to set the INITEE register manually. > >If I do that, everything will be fine except that the memory > >will then be erased at startup, which I don't want. > >I have written FLASH ERASE 1-8 in preload.cmd to exclude the > >EEPROM from beeing erased. But sence CW won't know about the > >INITEE change which will take place at runtime, it will probably > >erase at the default address and clear where I acctually want to > >place the EEPROM. > > > >Is there a better way to map the EEPROM which will make CW > >aware of the new location? > > > >Thanks in advance, > >Daniel Lundin > > > > > > > > > >-------------------- > > > > > > > |
|
Reply by ●December 12, 20032003-12-12
Hi Daniel. Here below, I am simply pasting a reply already posted in the mailing list. Also avoid combining "Load Code to onchip Non Volatile Memory" option and FLASH commands in preload/postload files. Use either one or the other solution. If you plan to manipulate individually Non Volatile Memory blocks (flash or eeprom) use commands. If you still want to use the "Load Code to onchip Non Volatile Memory" option (more transparent), you can edit the fpp file (NVM driver) and remove the EEPROM part as described here below. I hope this help. Regards, Gilles Subject:[68HC12] eeprom erasure and also Subject:[68HC12] how to avoid erasing eeprom with Codewarrior 3 Hi Robert. release note extract: " The ICD12 Target Interface provides now a direct application loading and flashing feature within the application Load menu. It is no more required to play flash handling commands from preload and postload command files: The "Load Code to onchip Non Volatile Memory" option plays in background required flash commands. When this option is selected, it is possible to choose an "All Bytes" verification option which will compare (after programming) the original code with the device programmed code (read back). Note that this option performs a device "mass erase". For partial code loading, eeprom data loading, the Flash/NVMC dialog and regular flash commands are still 100% available to specify special/selective Non Volatile Memory operations to perform. " As wrote Bob White, you can still use classic flash commands. You can still disable the "Load Code to onchip Non Volatile Memory" option and use previous commands and commands files. More hints: - There is a manual called "Manual_Flash_Programming.pdf" which should be installed in "CodeWarrior Manuals" folder (when installing with a CodeWarrior CD-ROM). Inside this manual is described FPP files format and structure (flash programming drivers). It won't be a secret if I inform you that you can backup the fpp file matching your derivative and edit this text file to remove the EEPROM section (the eeprom is then unknown from the debugger). Attention: the first "MODULE" listed in the file must always have a section "INFO 6". If you remove the first module, the next one might have a "INFO 0" section, change it to "INFO 6". This is required for bus speed sensing (details in the manual). Also note that modifying fpp files is without guaranty at all, i.e. at your own risk. Regards, Gilles At 08:15 AM 12/12/2003, you wrote: >Thanks for your reply. > >It seems I've got another problem then, sence the EEPROM is cleared >every time I download the program (but not cleared on reset). The >program also works fine on DG256 where I don't move the EEPROM at all, >so I don't think it has nothing to do with my EEPROM routines. > >--- In , Gilles Blanquin <gblanquin@m...> wrote: > > Hi Daniel. > > > > I am glad to tell you that the EEPROM driver cares about the INITEE > > register value and EEPROM location. So if you move it, and can flash >and > > erase it where it was moved. > > This was a must, as usually the eeprom is partially or totally >hidden under > > chip registers and onchip ram. > > > > > > You can try this if you want: > > > > Execute a WB command from the Command window to set INITEE register. > > Then open the NMVC dialog. You will see that the EEPROM location >range changes. > > > > Remind that if the reset the chip after the command is played, the >eeprom > > turns back to default location. > > > > Regards, > > Gilles > > > > > > At 03:43 PM 12/11/2003, you wrote: > > >Using: Codewarrior 3.0 on HCS12DG128 > > > > > >How do I map the EEPROM with Codewarrior? > > > > > >The only way I know of is to set the INITEE register manually. > > >If I do that, everything will be fine except that the memory > > >will then be erased at startup, which I don't want. > > >I have written FLASH ERASE 1-8 in preload.cmd to exclude the > > >EEPROM from beeing erased. But sence CW won't know about the > > >INITEE change which will take place at runtime, it will probably > > >erase at the default address and clear where I acctually want to > > >place the EEPROM. > > > > > >Is there a better way to map the EEPROM which will make CW > > >aware of the new location? > > > > > >Thanks in advance, > > >Daniel Lundin > > > > > > > > > > > > > > >-------------------- > > > > > > > > > > > > >-------------------- > >">http://docs.yahoo.com/info/terms/ |
Reply by ●December 12, 20032003-12-12
You may use the NO_INIT (instead of READ_WRITE) in the linker prm file
for it (otherwise linker will zero out the area). Erich > -----Original Message----- > From: Daniel Lundin [mailto:] > Sent: Freitag, 12. Dezember 2003 08:15 > To: > Subject: [68HC12] Re: EEPROM mapping in Codewarrior > Thanks for your reply. > > It seems I've got another problem then, sence the EEPROM is cleared > every time I download the program (but not cleared on reset). The > program also works fine on DG256 where I don't move the > EEPROM at all, > so I don't think it has nothing to do with my EEPROM routines. > > --- In , Gilles Blanquin <gblanquin@m...> wrote: > > Hi Daniel. > > > > I am glad to tell you that the EEPROM driver cares about the INITEE > > register value and EEPROM location. So if you move it, and > can flash > and > > erase it where it was moved. > > This was a must, as usually the eeprom is partially or totally > hidden under > > chip registers and onchip ram. > > > > > > You can try this if you want: > > > > Execute a WB command from the Command window to set INITEE > register. > > Then open the NMVC dialog. You will see that the EEPROM location > range changes. > > > > Remind that if the reset the chip after the command is played, the > eeprom > > turns back to default location. > > > > Regards, > > Gilles > > > > > > At 03:43 PM 12/11/2003, you wrote: > > >Using: Codewarrior 3.0 on HCS12DG128 > > > > > >How do I map the EEPROM with Codewarrior? > > > > > >The only way I know of is to set the INITEE register > manually. If I > > >do that, everything will be fine except that the memory > will then be > > >erased at startup, which I don't want. I have written > FLASH ERASE 1-8 > > >in preload.cmd to exclude the EEPROM from beeing erased. > But sence CW > > >won't know about the INITEE change which will take place > at runtime, > > >it will probably erase at the default address and clear where I > > >acctually want to place the EEPROM. > > > > > >Is there a better way to map the EEPROM which will make CW > aware of > > >the new location? > > > > > >Thanks in advance, > > >Daniel Lundin > > > > > > > > > > > > > > >-------------------- > > > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > ---------------------~--> Buy Ink Cartridges or Refill Kits > for your HP, Epson, Canon or Lexmark Printer at MyInks.com. > Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cidU11 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/dN_tlB/TM ---------------------------------~-> -------------------- ">http://docs.yahoo.com/info/terms/ |