Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
|
I am using Metrowerks suite for generating .abs (ELF/DWARF) and SREC files for my project using MCS9S12DP256. I have defined EEPROM sections in the prm file and the MAP file have reference to the respective sessions as well. .prm file MY_NODEADDR_EEPROM_SEG = NO_INIT 0x3001 TO 0x3002; MY_EEPROM_SEG = NO_INIT 0x3F95 TO 0x3FEE ; But my srec file doesn't show up any address for the EEPROM sections.So with BDM I am able to flash the code with the generated srec file ,but when I select the EEPROM program option it is not accepting with the generated srec file. Can anyone help me in finding out answers to these questions a. Does it mean that the S-record for the target flash and EEPROM will be different?. b. How can I gernerate a file that has EEPROM data so that I can program my target EEPROM with the BDMPgmr12.? c. Can I generte in S-record format?.Will the BDMPgmr12 will accept the srec file for EEPROM programming? d. Can the single S-record file can have both the EEPROM and Flash data? Any help is greatly appreciated. |
|
|
|
Hi. Define the eeprom like a rom section in your prm file. In the prm file: ---------------- SEGMENTS ... EEPROM = READ_ONLY 0x0400 TO 0x0FFF; ... END PLACEMENT ... DataForcedToEeprom INTO EEPROM ; ... END ENTRIES myConst /* to avoid unused constant cleaning by linker */ END in your C source file, forcing to a specific segment: ----------------------------------------------------- #pragma CONST_SEG DataForcedToEeprom const unsigned int myConst[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; #pragma CONST_SEG DEFAULT If you want, you can even make it easier, specifying directly the address of the constant block (at 0x0600 below): const unsigned int myConst2[]@0x0600 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; In this case, it is not necessary to declare it in ENTRIES/END section. Regards, Gilles At 01:18 PM 7/19/2003, you wrote: >I am using Metrowerks suite for generating .abs (ELF/DWARF) and SREC >files for my project using MCS9S12DP256. I have defined EEPROM >sections in the prm file and the MAP file have reference to the >respective sessions as well. > >.prm file > >MY_NODEADDR_EEPROM_SEG = NO_INIT 0x3001 TO 0x3002; >MY_EEPROM_SEG = NO_INIT 0x3F95 TO 0x3FEE ; > >But my srec file doesn't show up any address for the EEPROM >sections.So with BDM I am able to flash the code with the generated >srec file ,but when I select the EEPROM program option it is not >accepting with the generated srec file. Can anyone help me in finding >out answers to these questions > >a. Does it mean that the S-record for the target flash and EEPROM >will be different?. > >b. How can I gernerate a file that has EEPROM data so that I can >program my target EEPROM with the BDMPgmr12.? > >c. Can I generte in S-record format?.Will the BDMPgmr12 will accept >the srec file for EEPROM programming? > >d. Can the single S-record file can have both the EEPROM and Flash >data? > >Any help is greatly appreciated. >-------------------------------------------------------- >To unsubscribe from this group, send an email to: >To learn more about Motorola Microcontrollers, please visit >http://www.motorola.com/mcu |