Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Sponsor

controlSUITE™ software
Comprehensive.
Intuitive.
Optimized.

Real-world software for real-time control. Details Here!

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | Programming EEPROM Issue

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Programming EEPROM Issue - vvibin2003 - Jul 19 6:18:00 2003

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.






(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: Programming EEPROM Issue - Gilles Blanquin - Jul 21 4:48:00 2003


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




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )