Gentle Denizens: I am using CodeWarrior for the HC12 w/ the Processor Expert package, and my target is the MC9S12A64. I am using the BDM MultiLink to flash program with. This is a completely newbie question (I am, in fact, a newbie to all of the items noted above), but I have noticed that when I flash program my target, each byte of the EEPROM gets initialized to 0xFF. I tried to use PE's CPU bean to declare a section called EEPROM and to have it not initialized. The resultant .prm file output looks like this: SECTIONS /* List of all sections specified on the "Build options" tab */ RAM = READ_WRITE 0x00000800 SIZE 0x0800; ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; EEPROM = NO_INIT 0x00001800 SIZE 0x0400; END This application requires calibration, which I store into EEPROM. Every time I flash program my target, I blow away my calibration values, and this forces me to re-calibrate; not an entirely lengthy process, but a repetetive one right smack dab in the middle of my development efforts. I'd sure like to not have to reprogram EEPROM every stinking time that I change a line of code, recompile and reprogram. I am sure that I have missed something essential. Can anyone point it out for me? Any help will be greatly appreciated. Thanks in advance, -Mike |
|
Flashing Over EEPROM: A Newbie Question
Started by ●July 29, 2003
Reply by ●July 29, 20032003-07-29
To avoid reprogramming your flash you will need to run your code in ram. That's what I intend doing. I have an Axiom development board with external ram, and my draft hardware also has a large block of ram. There are surely more questions to answer such as dealing with interrupt vector table, which I intend using a jump table copy in ram. Andrew Lohmann AIIE Design Engineer Bellingham + Stanley Ltd. Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England. Tel: +44 (0) 1892 500400 Fax: +44 (0) 1892 543115 Website: www.bs-ltd.com ----- Original Message ----- From: "thunderweasel71" <> To: <> Sent: Tuesday, July 29, 2003 3:23 PM Subject: [68HC12] Flashing Over EEPROM: A Newbie Question > Gentle Denizens: > > I am using CodeWarrior for the HC12 w/ the Processor Expert package, > and my target is the MC9S12A64. I am using the BDM MultiLink to flash > program with. > > This is a completely newbie question (I am, in fact, a newbie to all > of the items noted above), but I have noticed that when I flash > program my target, each byte of the EEPROM gets initialized to 0xFF. > > I tried to use PE's CPU bean to declare a section called EEPROM and to > have it not initialized. The resultant .prm file output looks like > this: > > SECTIONS > /* List of all sections specified on the "Build options" tab */ > RAM = READ_WRITE 0x00000800 SIZE 0x0800; > ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; > ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; > ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; > ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; > EEPROM = NO_INIT 0x00001800 SIZE 0x0400; > END > > This application requires calibration, which I store into EEPROM. > Every time I flash program my target, I blow away my calibration > values, and this forces me to re-calibrate; not an entirely lengthy > process, but a repetetive one right smack dab in the middle of my > development efforts. > > I'd sure like to not have to reprogram EEPROM every stinking time that > I change a line of code, recompile and reprogram. I am sure that I > have missed something essential. Can anyone point it out for me? Any > help will be greatly appreciated. > > Thanks in advance, > -Mike > > > -------------------- > > ">http://docs.yahoo.com/info/terms/ > > --- Email Disclaimer --- > > Internet communications are not secure and therefore Bellingham + Stanley Ltd does > not accept legal responsibility for the contents of this message. Any views > or opinions presented are solely those of the author and do not necessarily > represent those of Bellingham + Stanley Ltd unless otherwise specifically stated. > If this message is received by anyone other than the addressee, please > notify the sender and then delete the message and any attachments from your > computer. > > --- End --- > --- Email Disclaimer --- Internet communications are not secure and therefore Bellingham + Stanley Ltd does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of Bellingham + Stanley Ltd unless otherwise specifically stated. If this message is received by anyone other than the addressee, please notify the sender and then delete the message and any attachments from your computer. --- End --- |
|
Reply by ●July 29, 20032003-07-29
I have the same problem and don't want my EEPROM to be erased at every
entry to the debugger. My code won't fit in RAM, so that solution doesn't work for me. I suspect that the "command files" might allow this to be achieved, but I haven't been able to figure out how to do it. Below is a copy of a method for not loading Flash, as gleaned from support_europe. I'm not sure if this worked for me as written, I recall editing some command files by commenting out some directives. It was more trouble than it was worth because I usually want to re-load the program, but an EEPROM erase fix would be worth it. Good luck, and as you're a newbie, I feel your pain. Sad to say that the pain isn't unique to newbies. Bob White ------------ begin quote In order to start the debugger and load symbolic information without loading flash follows these steps: - Start the debugger - In the Target menu (ICD12 or SDI depending how you connect to the board), select "Command Files ...". - In the Preload tab, uncheck the "Enable Command File" check box. - In the Postload tab, uncheck the "Enable Command File" check box. - Click the OK button to close the dialog box. Next time you will start the debugger, the flash will not be programmed automatically. I hope this helps. Best Reagards Catherine Bezy Director of Customer Support EMEA ============================== end quote ----- Original Message ----- From: "Andrew Lohmann's New Email Server" <> To: <> Sent: Tuesday, July 29, 2003 7:36 AM Subject: Re: [68HC12] Flashing Over EEPROM: A Newbie Question > To avoid reprogramming your flash you will need to run your code in ram. > That's what I intend doing. I have an Axiom development board with external > ram, and my draft hardware also has a large block of ram. > > There are surely more questions to answer such as dealing with interrupt > vector table, which I intend using a jump table copy in ram. > Andrew Lohmann AIIE > Design Engineer > > Bellingham + Stanley Ltd. > Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England. > Tel: +44 (0) 1892 500400 > Fax: +44 (0) 1892 543115 > Website: www.bs-ltd.com > ----- Original Message ----- > From: "thunderweasel71" <> > To: <> > Sent: Tuesday, July 29, 2003 3:23 PM > Subject: [68HC12] Flashing Over EEPROM: A Newbie Question > > Gentle Denizens: > > > > I am using CodeWarrior for the HC12 w/ the Processor Expert package, > > and my target is the MC9S12A64. I am using the BDM MultiLink to flash > > program with. > > > > This is a completely newbie question (I am, in fact, a newbie to all > > of the items noted above), but I have noticed that when I flash > > program my target, each byte of the EEPROM gets initialized to 0xFF. > > > > I tried to use PE's CPU bean to declare a section called EEPROM and to > > have it not initialized. The resultant .prm file output looks like > > this: > > > > SECTIONS > > /* List of all sections specified on the "Build options" tab */ > > RAM = READ_WRITE 0x00000800 SIZE 0x0800; > > ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; > > ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; > > ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; > > ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; > > EEPROM = NO_INIT 0x00001800 SIZE 0x0400; > > END > > > > This application requires calibration, which I store into EEPROM. > > Every time I flash program my target, I blow away my calibration > > values, and this forces me to re-calibrate; not an entirely lengthy > > process, but a repetetive one right smack dab in the middle of my > > development efforts. > > > > I'd sure like to not have to reprogram EEPROM every stinking time that > > I change a line of code, recompile and reprogram. I am sure that I > > have missed something essential. Can anyone point it out for me? Any > > help will be greatly appreciated. > > > > Thanks in advance, > > -Mike > > > > > > > > > > -------------------- > > > > > > > > ">http://docs.yahoo.com/info/terms/ > > > > > > > > --- Email Disclaimer --- > > > > Internet communications are not secure and therefore Bellingham + Stanley > Ltd does > > not accept legal responsibility for the contents of this message. Any > views > > or opinions presented are solely those of the author and do not > necessarily > > represent those of Bellingham + Stanley Ltd unless otherwise specifically > stated. > > If this message is received by anyone other than the addressee, please > > notify the sender and then delete the message and any attachments from > your > > computer. > > > > --- End --- > > --- Email Disclaimer --- > > Internet communications are not secure and therefore Bellingham + Stanley Ltd does > not accept legal responsibility for the contents of this message. Any views > or opinions presented are solely those of the author and do not necessarily > represent those of Bellingham + Stanley Ltd unless otherwise specifically stated. > If this message is received by anyone other than the addressee, please > notify the sender and then delete the message and any attachments from your > computer. > > --- End --- > > -------------------- > > ">http://docs.yahoo.com/info/terms/ > |
|
Reply by ●July 29, 20032003-07-29
Bob, Mike and all, I am amazed to find out you are putting up with such inconvenience of having to re-calibrate your EEPROM every time you reprogram the Flash. My advice to you is the following: First try to inquire with your tool vendor whether there is a straight forward way to do this, that you may not be aware of. If there is one - great. If there isn't one, just ship back the debugger and get another one from a different vendor instead. As a designer of emulator and BDM for the HCS12 family, I know our tools include this basic option in the programmer window allowing either the Flash, or the EEPROM or both to be re-programmed. I know other tool vendors also include this basic option. So, instead of sharing the pain, know that there are better alternatives and use them in if it turns out it is needed. Hope this helps, Doron Nohau Corporation HC12 In-Circuit Emulators www.nohau.com/emul12pc.html At 09:35 AM 7/29/2003 -0700, you wrote: >I have the same problem and don't want my EEPROM to be erased at every entry >to the debugger. My code won't fit in RAM, so that solution doesn't work >for me. > >I suspect that the "command files" might allow this to be achieved, but I >haven't been able to figure out how to do it. > >Below is a copy of a method for not loading Flash, as gleaned from >support_europe. I'm not sure if this worked for me as written, I recall >editing some command files by commenting out some directives. It was more >trouble than it was worth because I usually want to re-load the program, but >an EEPROM erase fix would be worth it. > >Good luck, and as you're a newbie, I feel your pain. Sad to say that the >pain isn't unique to newbies. > >Bob White > >------------ begin quote > In order to start the debugger and load symbolic > information without loading flash follows these steps: > - Start the debugger > - In the Target menu (ICD12 or SDI depending how > you connect to the board), select "Command Files ...". > - In the Preload tab, uncheck the "Enable Command File" > check box. > - In the Postload tab, uncheck the "Enable Command File" > check box. > - Click the OK button to close the dialog box. > Next time you will start the debugger, the flash will not > be programmed automatically. > I hope this helps. > >Best Reagards > >Catherine Bezy >Director of Customer Support EMEA >============================== end quote >----- Original Message ----- >From: "Andrew Lohmann's New Email Server" <> >To: <> >Sent: Tuesday, July 29, 2003 7:36 AM >Subject: Re: [68HC12] Flashing Over EEPROM: A Newbie Question > > To avoid reprogramming your flash you will need to run your code in ram. > > That's what I intend doing. I have an Axiom development board with >external > > ram, and my draft hardware also has a large block of ram. > > > > There are surely more questions to answer such as dealing with interrupt > > vector table, which I intend using a jump table copy in ram. > > > > > > Andrew Lohmann AIIE > > Design Engineer > > > > Bellingham + Stanley Ltd. > > Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England. > > Tel: +44 (0) 1892 500400 > > Fax: +44 (0) 1892 543115 > > Website: www.bs-ltd.com > > > > > > ----- Original Message ----- > > From: "thunderweasel71" <> > > To: <> > > Sent: Tuesday, July 29, 2003 3:23 PM > > Subject: [68HC12] Flashing Over EEPROM: A Newbie Question > > > > > > > Gentle Denizens: > > > > > > I am using CodeWarrior for the HC12 w/ the Processor Expert package, > > > and my target is the MC9S12A64. I am using the BDM MultiLink to flash > > > program with. > > > > > > This is a completely newbie question (I am, in fact, a newbie to all > > > of the items noted above), but I have noticed that when I flash > > > program my target, each byte of the EEPROM gets initialized to 0xFF. > > > > > > I tried to use PE's CPU bean to declare a section called EEPROM and to > > > have it not initialized. The resultant .prm file output looks like > > > this: > > > > > > SECTIONS > > > /* List of all sections specified on the "Build options" tab */ > > > RAM = READ_WRITE 0x00000800 SIZE 0x0800; > > > ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; > > > ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; > > > ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; > > > ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; > > > EEPROM = NO_INIT 0x00001800 SIZE 0x0400; > > > END > > > > > > This application requires calibration, which I store into EEPROM. > > > Every time I flash program my target, I blow away my calibration > > > values, and this forces me to re-calibrate; not an entirely lengthy > > > process, but a repetetive one right smack dab in the middle of my > > > development efforts. > > > > > > I'd sure like to not have to reprogram EEPROM every stinking time that > > > I change a line of code, recompile and reprogram. I am sure that I > > > have missed something essential. Can anyone point it out for me? Any > > > help will be greatly appreciated. > > > > > > Thanks in advance, > > > -Mike > > > |
|
Reply by ●July 29, 20032003-07-29
Hi All, I'm not sure if this applies to the MC9S12A64 (or processor expert, for that matter) but on a MC9S12DP256, D64, DJ64, or H256, using BDM Multilink and CodeWorrier 1.2 (except for the compiler, which is 2.0) there is a file in "Debugger Cmd Files" called "erase_unsecure_dp256.cmd". There is a section of the file that looks like: //mass erase eeprom wb 0x12 0x01 // set EEPROM at 0-$1000 in INITEE wb 0x110 0x49 // set ECLKDV clock divider for a 16 MHz oscillator wb 0x114 0x88 // EPROT all protection disabled wb 0x115 0x30 // clear PVIOL and ACCERR in ESTAT register ww 0x800 0xFFFF // (dummy) write to eeprom array to buffer address and data wb 0x116 0x41 // write MASS ERASE command in ECMD register wb 0x115 0xC0 // clear CBEIF in ESTAT register to execute the command wait 10 We just comment this section out and, shazam, no more EEPROM erasing on Flash loading. Seems to work fine for us. Maybe you have a similar file? good luck, Pat thunderweasel71 wrote: > Gentle Denizens: > > I am using CodeWarrior for the HC12 w/ the Processor Expert package, > and my target is the MC9S12A64. I am using the BDM MultiLink to flash > program with. > > This is a completely newbie question (I am, in fact, a newbie to all > of the items noted above), but I have noticed that when I flash > program my target, each byte of the EEPROM gets initialized to 0xFF. > > I tried to use PE's CPU bean to declare a section called EEPROM and to > have it not initialized. The resultant .prm file output looks like > this: > > SECTIONS > /* List of all sections specified on the "Build options" tab */ > RAM = READ_WRITE 0x00000800 SIZE 0x0800; > ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; > ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; > ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; > ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; > EEPROM = NO_INIT 0x00001800 SIZE 0x0400; > END > > This application requires calibration, which I store into EEPROM. > Every time I flash program my target, I blow away my calibration > values, and this forces me to re-calibrate; not an entirely lengthy > process, but a repetetive one right smack dab in the middle of my > development efforts. > > I'd sure like to not have to reprogram EEPROM every stinking time that > I change a line of code, recompile and reprogram. I am sure that I > have missed something essential. Can anyone point it out for me? Any > help will be greatly appreciated. > > Thanks in advance, > -Mike > -------------------- > > ">http://docs.yahoo.com/info/terms/ |
Reply by ●July 29, 20032003-07-29
I had the same problem for the same reasons. The solution is very easy (easier than anyone else has given). One of the modules loaded when starting the debugger is p&e_preload.cmd (located in ./cmd). By default, it erases the universe (flash and eeprom). To have it not erase the eeprom, modify the line that currently reads "FLASH ERASE" so it reads "FLASH ERASE 1 2 3 4 5 6" Sections 1 through 6 are flash, section 0 is eeprom. For more information on this file (and how to modify the intialization of the DP256 when starting the debugger), see "Manual Flash Programming.pdf" Thanks to Support Europe for pointing me in the correct direction. Bob Harris ----- Original Message ----- From: "thunderweasel71" <> To: <> Sent: Tuesday, July 29, 2003 10:23 AM Subject: [68HC12] Flashing Over EEPROM: A Newbie Question > Gentle Denizens: > > I am using CodeWarrior for the HC12 w/ the Processor Expert package, > and my target is the MC9S12A64. I am using the BDM MultiLink to flash > program with. > > This is a completely newbie question (I am, in fact, a newbie to all > of the items noted above), but I have noticed that when I flash > program my target, each byte of the EEPROM gets initialized to 0xFF. > > I tried to use PE's CPU bean to declare a section called EEPROM and to > have it not initialized. The resultant .prm file output looks like > this: > > SECTIONS > /* List of all sections specified on the "Build options" tab */ > RAM = READ_WRITE 0x00000800 SIZE 0x0800; > ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; > ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; > ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; > ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; > EEPROM = NO_INIT 0x00001800 SIZE 0x0400; > END > > This application requires calibration, which I store into EEPROM. > Every time I flash program my target, I blow away my calibration > values, and this forces me to re-calibrate; not an entirely lengthy > process, but a repetetive one right smack dab in the middle of my > development efforts. > > I'd sure like to not have to reprogram EEPROM every stinking time that > I change a line of code, recompile and reprogram. I am sure that I > have missed something essential. Can anyone point it out for me? Any > help will be greatly appreciated. > > Thanks in advance, > -Mike > > > -------------------- > > ">http://docs.yahoo.com/info/terms/ |
Reply by ●July 29, 20032003-07-29
You have a set of command files that is executed whenever you start a debuging session. The one that erases all sections of your MCU is p&e_preload.cmd. You find it in your 'Debuger Cmd Files' folder in the project window. This file looks like this when you first create your project: ---------------- // Before load the commands written below will be executed // The following commands must be enabled to load in flash with the ICD12. // reset the device to get default settings RESET // initialize flash programming process FLASH // select the flash modules FLASH SELECT // erase the flash modules FLASH ERASE // arm the flash for programming FLASH ARM ---------------- The line that erases all blocks of memory, including the EEPROM is FLASH ERASE. As default this command doesn't have any parameters which means that all blocks will be erased. Instead you can change the parameters to the blocks you want erased. How do You know what block numbers corresponds to what memory then? Well I am not entirely sure about this but this has worked for me: When you have started a debug session you can open up a dialog called 'Non volitale memory control' with the menu selection ICD- 12->Flash... This dialog shows what blocks are assigned for this project. It starts with block number 0 at the top and then number 1 and so on. In my project, the EEPROM is block number 0 so I have changed the FLASH ERASE to FLASH ERASE 1,2,3. This doesn't erase the EEPROM every time the debugger is invoked. I have also added an EEPROM segment in the .PRM file and set it to NO_INIT. I use the MC9S12A128B processor. Hope this helps. Regards / Ruben > Gentle Denizens: > > I am using CodeWarrior for the HC12 w/ the Processor Expert package, > and my target is the MC9S12A64. I am using the BDM MultiLink to flash > program with. > > This is a completely newbie question (I am, in fact, a newbie to all > of the items noted above), but I have noticed that when I flash > program my target, each byte of the EEPROM gets initialized to 0xFF. > > I tried to use PE's CPU bean to declare a section called EEPROM and to > have it not initialized. The resultant .prm file output looks like > this: > > SECTIONS > /* List of all sections specified on the "Build options" tab */ > RAM = READ_WRITE 0x00000800 SIZE 0x0800; > ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; > ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; > ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; > ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; EEPROM > = NO_INIT 0x00001800 SIZE 0x0400; > END > > This application requires calibration, which I store into EEPROM. > Every time I flash program my target, I blow away my calibration > values, and this forces me to re-calibrate; not an entirely lengthy > process, but a repetetive one right smack dab in the middle of my > development efforts. > > I'd sure like to not have to reprogram EEPROM every stinking time that > I change a line of code, recompile and reprogram. I am sure that I > have missed something essential. Can anyone point it out for me? Any > help will be greatly appreciated. > > Thanks in advance, > -Mike ============================== Ruben Jsson AB Liros Elektronik Box 9124, 200 39 Malm Sweden TEL INT +46 40142078 FAX INT +46 40947388 ============================== |
Reply by ●July 29, 20032003-07-29
Hi Doron, Following the links I would like to get clarified with you regarding the programming of Flash and eeprom with the EMUL12 PC/BDM. I am using the MC9S12H256,Mako and I am unable to program the EEPROM with the EMUL12PC.But flash programming works fine for me.So I am currently makeing use of Flash Gourdan to program my EEPROM which works fine for me. Please let me know whether programming EEPROM using EMUL12 BDM is supported for Mako family. Thanks in Advance. Vibin --- In , Doron Fael <doronf@n...> wrote: > Bob, Mike and all, > > I am amazed to find out you are putting up with such inconvenience of > having to re-calibrate your EEPROM every time you reprogram the Flash. > > My advice to you is the following: > > First try to inquire with your tool vendor whether there is a straight > forward way to do this, that you may not be aware of. > > If there is one - great. If there isn't one, just ship back the debugger > and get another one from a different vendor instead. > > As a designer of emulator and BDM for the HCS12 family, I know our tools > include this basic option in the programmer window allowing either the > Flash, or the EEPROM or both to be re-programmed. I know other tool vendors > also include this basic option. > > So, instead of sharing the pain, know that there are better alternatives > and use them in if it turns out it is needed. > > Hope this helps, > Doron > Nohau Corporation > HC12 In-Circuit Emulators > www.nohau.com/emul12pc.html > At 09:35 AM 7/29/2003 -0700, you wrote: > >I have the same problem and don't want my EEPROM to be erased at every entry > >to the debugger. My code won't fit in RAM, so that solution doesn't work > >for me. > > > >I suspect that the "command files" might allow this to be achieved, but I > >haven't been able to figure out how to do it. > > > >Below is a copy of a method for not loading Flash, as gleaned from > >support_europe. I'm not sure if this worked for me as written, I recall > >editing some command files by commenting out some directives. It was more > >trouble than it was worth because I usually want to re-load the program, but > >an EEPROM erase fix would be worth it. > > > >Good luck, and as you're a newbie, I feel your pain. Sad to say that the > >pain isn't unique to newbies. > > > >Bob White > > > >------------ begin quote > > In order to start the debugger and load symbolic > > information without loading flash follows these steps: > > - Start the debugger > > - In the Target menu (ICD12 or SDI depending how > > you connect to the board), select "Command Files ...". > > - In the Preload tab, uncheck the "Enable Command File" > > check box. > > - In the Postload tab, uncheck the "Enable Command File" > > check box. > > - Click the OK button to close the dialog box. > > Next time you will start the debugger, the flash will not > > be programmed automatically. > > I hope this helps. > > > >Best Reagards > > > >Catherine Bezy > >Director of Customer Support EMEA > >============================== end quote > > > > > >----- Original Message ----- > >From: "Andrew Lohmann's New Email Server" <andrew-lohmann@b...> > >To: <> > >Sent: Tuesday, July 29, 2003 7:36 AM > >Subject: Re: [68HC12] Flashing Over EEPROM: A Newbie Question > > > > > > > To avoid reprogramming your flash you will need to run your code in ram. > > > That's what I intend doing. I have an Axiom development board with > >external > > > ram, and my draft hardware also has a large block of ram. > > > > > > There are surely more questions to answer such as dealing with interrupt > > > vector table, which I intend using a jump table copy in ram. > > > > > > > > > Andrew Lohmann AIIE > > > Design Engineer > > > > > > Bellingham + Stanley Ltd. > > > Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England. > > > Tel: +44 (0) 1892 500400 > > > Fax: +44 (0) 1892 543115 > > > Website: www.bs-ltd.com > > > > > > > > > ----- Original Message ----- > > > From: "thunderweasel71" <thunderweasel71@y...> > > > To: <> > > > Sent: Tuesday, July 29, 2003 3:23 PM > > > Subject: [68HC12] Flashing Over EEPROM: A Newbie Question > > > > > > > > > > Gentle Denizens: > > > > > > > > I am using CodeWarrior for the HC12 w/ the Processor Expert package, > > > > and my target is the MC9S12A64. I am using the BDM MultiLink to flash > > > > program with. > > > > > > > > This is a completely newbie question (I am, in fact, a newbie to all > > > > of the items noted above), but I have noticed that when I flash > > > > program my target, each byte of the EEPROM gets initialized to 0xFF. > > > > > > > > I tried to use PE's CPU bean to declare a section called EEPROM and to > > > > have it not initialized. The resultant .prm file output looks like > > > > this: > > > > > > > > SECTIONS > > > > /* List of all sections specified on the "Build options" tab */ > > > > RAM = READ_WRITE 0x00000800 SIZE 0x0800; > > > > ROM_C000 = READ_ONLY 0x0000C000 SIZE 0x4000; > > > > ROM_4000 = READ_ONLY 0x00004000 SIZE 0x4000; > > > > ROM_PAGE3C = READ_ONLY 0x003C8000 SIZE 0x4000; > > > > ROM_PAGE3D = READ_ONLY 0x003D8000 SIZE 0x4000; > > > > EEPROM = NO_INIT 0x00001800 SIZE 0x0400; > > > > END > > > > > > > > This application requires calibration, which I store into EEPROM. > > > > Every time I flash program my target, I blow away my calibration > > > > values, and this forces me to re-calibrate; not an entirely lengthy > > > > process, but a repetetive one right smack dab in the middle of my > > > > development efforts. > > > > > > > > I'd sure like to not have to reprogram EEPROM every stinking time that > > > > I change a line of code, recompile and reprogram. I am sure that I > > > > have missed something essential. Can anyone point it out for me? Any > > > > help will be greatly appreciated. > > > > > > > > Thanks in advance, > > > > -Mike > > > > > |
|
Reply by ●July 30, 20032003-07-30
Hi Vibin, I have just verified that the S-REC text that you have supplied works well on the H256 with the latest Seehau software available on the web. The result I get when programming the EEPROM at 3000 is: Addresses 3000 - 3003 are programmed to 50, 60, D2 and E1. An information message also shows up to inform that the S-REC file attempts to program address 3FF8 (with data F8), which is defined as reserved in the Motorola 4K EEPROM documents. The EEPROM programming utility therefore does not program this byte, in order to protect your application and keep this byte reserved and un-programmed as specified in the Motorola documents. Please also note the Seehau version you use is dated 12/17/2001 and is over a year and a half old, and indeed did not have H256 EEPROM programming implemented. Seehau versions for over a year now, and including the newest version on the Nohau web-site have EEPROM programming for the H256 implemented. Please download the latest version from the following link and try it out: http://www.nohau.com/downloads_current_software.html It should resolve your issue. Please let us know if indeed this resolves your problem. Hope this helps, Doron Nohau Corporation HC12 In-Circuit Emulators www.nohau.com/emul12pc.html At 05:26 AM 7/31/2003 +0000, you wrote: >Hi Doron, > Thanks for your feeback. Let me furnish you some details whcih >could help to sort out this issue.The Nohau s/w i am using is >providing both the check boxes for FLASH and EEPROM in the tools|PROM >Programming window. > > And the version of the tool i am having is > Seehaau for EMUL12-PC Version: 3.1217B.Built on 12/17/2001. >I hope this will not be so old version as you hinted. > >And I have checked out the option to Program the EEPROM and selected >the start addres as 0x3000. > > I have ensured that my .sx file has the right address and data >and its look something like > >S0530000433A5C70726F6A656374735C45736974655C436F64655C303645534954455F >5235365F4B45585C73313264703235365C45534954455F4B45585C436F64655C656570 >726F6D5C6E766D6465662E70726DC9 >S10730005060D2E165 >S1043FF8F8CC >S9030000FC > >But when i selected the program option I am getting the following >waring > >Attempt to load outside valid flash memory range. > >Attempt to load from address 0x3000 to address 0x3003, >which are outside of the valid address range of >0x4000 to 0xFFFFFF. >This attempt was ignored. Loading of data inside >the flash memory range will be done. >Cmd: Event_Message > >And upon selecting the continue option i am finally a waring like >Warning >EEPROM programming not yet working here. > >This warning was detected >in file: "c:\nc12\hh12_32\HH_FLASH.C" >at line 1512. >Cmd: Cfg_FlashExecute >Date: 7/31/2003 Time: 10:48:29 AM > >This made me believe that this version of my s/w is not supporting >the eeprom download.We are using the licensed version and I have >to see the option of using a trial version.I think with this you >would be able to trace the problem. >Thanks in Advance >Regards >Vibin > >Date: 7/31/2003 Time: 10:47:26 AM > >--- In , Doron Fael <doronf@n...> wrote: > > Hi Vibin, > > > > I think you must be using a very old version of our software. > > EEPROM programming for the 9S12H256 is implemented in Seehau for a >few > > years now. The option to program only the EEPROM, only the Flash, >or both > > exists for all HCS12 parts including the H256, right in the >programming > > utility window within Seehau. > > > > Please download the latest Seehau version at the following link: > > http://www.nohau.com/downloads_current_software.html > > and you should have what you are looking for. > > > > If you still have problems getting EEPROM programming to work, send >me an > > email and I will be happy to help you out, or fix the problem if it >turns > > out we have one. > > > > Hope this helps, > > Doron > > Nohau Corporation > > HC12 In-Circuit Emulators > > www.nohau.com/emul12pc.html > > > > At 03:35 AM 7/30/2003 +0000, you wrote: > > >Hi Doron, > > > Following the links I would like to get clarified with you > > >regarding the programming of Flash and eeprom with the EMUL12 >PC/BDM. > > >I am using the MC9S12H256,Mako and I am unable to program the >EEPROM > > >with the EMUL12PC.But flash programming works fine for me.So I am > > >currently makeing use of Flash Gourdan to program my EEPROM which > > >works fine for me. Please let me know whether programming EEPROM > > >using EMUL12 BDM is supported for Mako family. > > > > > >Thanks in Advance. > > >Vibin > > > > > > > > > > > >--- In , Doron Fael <doronf@n...> wrote: > > > > Bob, Mike and all, > > > > > > > > I am amazed to find out you are putting up with such >inconvenience of > > > > having to re-calibrate your EEPROM every time you reprogram >the Flash. > > > > > > > > My advice to you is the following: > > > > > > > > First try to inquire with your tool vendor whether there is a >straight > > > > forward way to do this, that you may not be aware of. > > > > > > > > If there is one - great. If there isn't one, just ship back the >debugger > > > > and get another one from a different vendor instead. > > > > > > > > As a designer of emulator and BDM for the HCS12 family, I know >our tools > > > > include this basic option in the programmer window allowing >either the > > > > Flash, or the EEPROM or both to be re-programmed. I know other >tool > > > vendors > > > > also include this basic option. > > > > > > > > So, instead of sharing the pain, know that there are better >alternatives > > > > and use them in if it turns out it is needed. > > > > > > > > Hope this helps, > > > > Doron > > > > Nohau Corporation > > > > HC12 In-Circuit Emulators > > > > www.nohau.com/emul12pc.html > > > > > > > > > > > > At 09:35 AM 7/29/2003 -0700, you wrote: > > > > >I have the same problem and don't want my EEPROM to be erased >at every > > > entry > > > > >to the debugger. My code won't fit in RAM, so that solution >doesn't work > > > > >for me. > > > > > > > > > >I suspect that the "command files" might allow this to be >achieved, but I > > > > >haven't been able to figure out how to do it. > > > > > > > > > >Below is a copy of a method for not loading Flash, as gleaned >from > > > > >support_europe. I'm not sure if this worked for me as >written, I recall > > > > >editing some command files by commenting out some directives. >It was more > > > > >trouble than it was worth because I usually want to re-load >the > > > program, but > > > > >an EEPROM erase fix would be worth it. > > > > > > > > > >Good luck, and as you're a newbie, I feel your pain. Sad to >say that the > > > > >pain isn't unique to newbies. > > > > > > > > > >Bob White > > > > > > > > > >------------ begin quote > > > > > In order to start the debugger and load symbolic > > > > > information without loading flash follows these steps: > > > > > - Start the debugger > > > > > - In the Target menu (ICD12 or SDI depending how > > > > > you connect to the board), select "Command Files ...". > > > > > - In the Preload tab, uncheck the "Enable Command File" > > > > > check box. > > > > > - In the Postload tab, uncheck the "Enable Command File" > > > > > check box. > > > > > - Click the OK button to close the dialog box. > > > > > Next time you will start the debugger, the flash will not > > > > > be programmed automatically. > > > > > I hope this helps. > > > > > > > > > >Best Reagards > > > > > > > > > >Catherine Bezy > > > > >Director of Customer Support EMEA > > > > >============================== end quote > > > > > |
|
Reply by ●July 30, 20032003-07-30
Hi Vibin, I think you must be using a very old version of our software. EEPROM programming for the 9S12H256 is implemented in Seehau for a few years now. The option to program only the EEPROM, only the Flash, or both exists for all HCS12 parts including the H256, right in the programming utility window within Seehau. Please download the latest Seehau version at the following link: http://www.nohau.com/downloads_current_software.html and you should have what you are looking for. If you still have problems getting EEPROM programming to work, send me an email and I will be happy to help you out, or fix the problem if it turns out we have one. Hope this helps, Doron Nohau Corporation HC12 In-Circuit Emulators www.nohau.com/emul12pc.html At 03:35 AM 7/30/2003 +0000, you wrote: >Hi Doron, > Following the links I would like to get clarified with you >regarding the programming of Flash and eeprom with the EMUL12 PC/BDM. >I am using the MC9S12H256,Mako and I am unable to program the EEPROM >with the EMUL12PC.But flash programming works fine for me.So I am >currently makeing use of Flash Gourdan to program my EEPROM which >works fine for me. Please let me know whether programming EEPROM >using EMUL12 BDM is supported for Mako family. > >Thanks in Advance. >Vibin > >--- In , Doron Fael <doronf@n...> wrote: > > Bob, Mike and all, > > > > I am amazed to find out you are putting up with such inconvenience of > > having to re-calibrate your EEPROM every time you reprogram the Flash. > > > > My advice to you is the following: > > > > First try to inquire with your tool vendor whether there is a straight > > forward way to do this, that you may not be aware of. > > > > If there is one - great. If there isn't one, just ship back the debugger > > and get another one from a different vendor instead. > > > > As a designer of emulator and BDM for the HCS12 family, I know our tools > > include this basic option in the programmer window allowing either the > > Flash, or the EEPROM or both to be re-programmed. I know other tool > vendors > > also include this basic option. > > > > So, instead of sharing the pain, know that there are better alternatives > > and use them in if it turns out it is needed. > > > > Hope this helps, > > Doron > > Nohau Corporation > > HC12 In-Circuit Emulators > > www.nohau.com/emul12pc.html > > > > > > At 09:35 AM 7/29/2003 -0700, you wrote: > > >I have the same problem and don't want my EEPROM to be erased at every > entry > > >to the debugger. My code won't fit in RAM, so that solution doesn't work > > >for me. > > > > > >I suspect that the "command files" might allow this to be achieved, but I > > >haven't been able to figure out how to do it. > > > > > >Below is a copy of a method for not loading Flash, as gleaned from > > >support_europe. I'm not sure if this worked for me as written, I recall > > >editing some command files by commenting out some directives. It was more > > >trouble than it was worth because I usually want to re-load the > program, but > > >an EEPROM erase fix would be worth it. > > > > > >Good luck, and as you're a newbie, I feel your pain. Sad to say that the > > >pain isn't unique to newbies. > > > > > >Bob White > > > > > >------------ begin quote > > > In order to start the debugger and load symbolic > > > information without loading flash follows these steps: > > > - Start the debugger > > > - In the Target menu (ICD12 or SDI depending how > > > you connect to the board), select "Command Files ...". > > > - In the Preload tab, uncheck the "Enable Command File" > > > check box. > > > - In the Postload tab, uncheck the "Enable Command File" > > > check box. > > > - Click the OK button to close the dialog box. > > > Next time you will start the debugger, the flash will not > > > be programmed automatically. > > > I hope this helps. > > > > > >Best Reagards > > > > > >Catherine Bezy > > >Director of Customer Support EMEA > > >============================== end quote > > > |
|