Sign in

username:

password:



Not a member?

Search msp430



Search tips

Subscribe to msp430



Ads

Discussion Groups

Discussion Groups | MSP430 | Erasing INFO Memory

The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.

Erasing INFO Memory - marlfox0415 - Aug 18 11:13:16 2008

Hi all,

I'm having some trouble erasing SegmentA and B of the INFO section of
Flash memory on an MSP4301232. I'm using IAR to program it, if that
matters at all. The erase itself appears to be successful when I'm
debugging but then my program seems to hang and IAR starts getting
really slow. I'm following the instructions in the user-guide (page
340) so I'm not sure what could be wrong. Here's my code:

void eraseFlash(){
char *flash_ptrA = (char *) 0x1080; // SegmentA
char *flash_ptrB = (char *) 0x1000; // SegmentB
FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
FCTL3 = FWKEY; // Clear LOCK
FCTL1 = FWKEY + ERASE; // Enable erase

*flash_ptrA = 0; // Dummy write
*flash_ptrB = 0; // Dummy write

FCTL3 = FWKEY + LOCK; // Set Lock bit
}

Any insight would be greatly appreciated. Thank you!

-John
------------------------------------



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


Re: Erasing INFO Memory - Hugh Molesworth - Aug 18 12:33:45 2008

Try only erasing a single segment at a time, instead of trying to
erase two segments. Additionally ensure interrupts are disabled prior
to initiating the erase, and you might want to clear the write bit
after the erase.

FCTL1 = FWKEY; // Clear WRT bit

Hugh

At 08:13 AM 8/18/2008, you wrote:
Hi all,

I'm having some trouble erasing SegmentA and B of the INFO section of
Flash memory on an MSP4301232. I'm using IAR to program it, if that
matters at all. The erase itself appears to be successful when I'm
debugging but then my program seems to hang and IAR starts getting
really slow. I'm following the instructions in the user-guide (page
340) so I'm not sure what could be wrong. Here's my code:

void eraseFlash(){
char *flash_ptrA = (char *) 0x1080; // SegmentA
char *flash_ptrB = (char *) 0x1000; // SegmentB
FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
FCTL3 = FWKEY; // Clear LOCK
FCTL1 = FWKEY + ERASE; // Enable erase

*flash_ptrA = 0; // Dummy write
*flash_ptrB = 0; // Dummy write

FCTL3 = FWKEY + LOCK; // Set Lock bit
}

Any insight would be greatly appreciated. Thank you!

-John

------------------------------------



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

Re: Erasing INFO Memory - Hugh Molesworth - Aug 18 12:49:39 2008

Note "Erase individual segment only" below (taken from manual):

FCTL1 MERAS ERASE Erase Cycle
0 0 No erase
0 1 Erase individual segment only
1 0 Erase all main memory segments
1 1 Erase all main and information memory segments

Hugh

===

Try only erasing a single segment at a time, instead of trying to
erase two segments. Additionally ensure interrupts are disabled prior
to initiating the erase, and you might want to clear the write bit
after the erase.

FCTL1 = FWKEY; // Clear WRT bit

Hugh

At 08:13 AM 8/18/2008, you wrote:
Hi all,

I'm having some trouble erasing SegmentA and B of the INFO section of
Flash memory on an MSP4301232. I'm using IAR to program it, if that
matters at all. The erase itself appears to be successful when I'm
debugging but then my program seems to hang and IAR starts getting
really slow. I'm following the instructions in the user-guide (page
340) so I'm not sure what could be wrong. Here's my code:

void eraseFlash(){
char *flash_ptrA = (char *) 0x1080; // SegmentA
char *flash_ptrB = (char *) 0x1000; // SegmentB
FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
FCTL3 = FWKEY; // Clear LOCK
FCTL1 = FWKEY + ERASE; // Enable erase

*flash_ptrA = 0; // Dummy write
*flash_ptrB = 0; // Dummy write

FCTL3 = FWKEY + LOCK; // Set Lock bit
}

Any insight would be greatly appreciated. Thank you!

-John

------------------------------------



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

Re: Erasing INFO Memory - baxtercodeworks - Aug 18 13:42:48 2008

The following may not be efficient or good code, but it seems to work
for me:
----
void EraseFlash(const unsigned char * pMemAddr)
{
int i;
unsigned char * dest; // = (unsigned char*)pidStr;
dest = (unsigned char *) pMemAddr;

_DINT();
FCTL2 = FWKEY + FSSEL_1 + FN0 + FN1; // Select MCLK/3 (1.04MHz / 3)
FCTL3 = FWKEY; // Unlock flash memory
FCTL1 = FWKEY + ERASE; // Set erase mode
for (i=0; i<64; ++i) {
*dest = 0xff; // dummy write
while((FCTL3 & WAIT) != WAIT); // Wait for write to complete
++dest;
}
FCTL1 = FWKEY;
FCTL3 = FWKEY + LOCK; // Lock flash memory
_EINT();
}

Note the write of 0xff to memory (not 0). Experts feel free to critique.
--- In m...@yahoogroups.com, "marlfox0415" wrote:
>
> Hi all,
>
> I'm having some trouble erasing SegmentA and B of the INFO section of
> Flash memory on an MSP4301232. I'm using IAR to program it, if that
> matters at all. The erase itself appears to be successful when I'm
> debugging but then my program seems to hang and IAR starts getting
> really slow. I'm following the instructions in the user-guide (page
> 340) so I'm not sure what could be wrong. Here's my code:
>
> void eraseFlash(){
> char *flash_ptrA = (char *) 0x1080; // SegmentA
> char *flash_ptrB = (char *) 0x1000; // SegmentB
> FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
> FCTL3 = FWKEY; // Clear LOCK
> FCTL1 = FWKEY + ERASE; // Enable erase
>
> *flash_ptrA = 0; // Dummy write
> *flash_ptrB = 0; // Dummy write
>
> FCTL3 = FWKEY + LOCK; // Set Lock bit
> }
>
> Any insight would be greatly appreciated. Thank you!
>
> -John
>

------------------------------------



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

Re: Erasing INFO Memory - old_cow_yellow - Aug 18 14:50:38 2008

When you erase a sector, the entire sector is erased to 0xFF. It does
not matter if the dummy write writes 0xFF or 0x00 (or anything else).
And you only need to do it once per sector.

--- In m...@yahoogroups.com, "baxtercodeworks" wrote:
>
> The following may not be efficient or good code, but it seems to work
> for me:
> ----
> void EraseFlash(const unsigned char * pMemAddr)
> {
> int i;
> unsigned char * dest; // = (unsigned char*)pidStr;
> dest = (unsigned char *) pMemAddr;
>
> _DINT();
> FCTL2 = FWKEY + FSSEL_1 + FN0 + FN1; // Select MCLK/3 (1.04MHz / 3)
> FCTL3 = FWKEY; // Unlock flash memory
> FCTL1 = FWKEY + ERASE; // Set erase mode
> for (i=0; i<64; ++i) {
> *dest = 0xff; // dummy write
> while((FCTL3 & WAIT) != WAIT); // Wait for write to complete
> ++dest;
> }
> FCTL1 = FWKEY;
> FCTL3 = FWKEY + LOCK; // Lock flash memory
> _EINT();
> }
>
> Note the write of 0xff to memory (not 0). Experts feel free to
critique.
> --- In m...@yahoogroups.com, "marlfox0415" wrote:
> >
> > Hi all,
> >
> > I'm having some trouble erasing SegmentA and B of the INFO section of
> > Flash memory on an MSP4301232. I'm using IAR to program it, if that
> > matters at all. The erase itself appears to be successful when I'm
> > debugging but then my program seems to hang and IAR starts getting
> > really slow. I'm following the instructions in the user-guide (page
> > 340) so I'm not sure what could be wrong. Here's my code:
> >
> > void eraseFlash(){
> > char *flash_ptrA = (char *) 0x1080; // SegmentA
> > char *flash_ptrB = (char *) 0x1000; // SegmentB
> > FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
> > FCTL3 = FWKEY; // Clear LOCK
> > FCTL1 = FWKEY + ERASE; // Enable erase
> >
> > *flash_ptrA = 0; // Dummy write
> > *flash_ptrB = 0; // Dummy write
> >
> > FCTL3 = FWKEY + LOCK; // Set Lock bit
> > }
> >
> > Any insight would be greatly appreciated. Thank you!
> >
> > -John
>
------------------------------------



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

Re: Erasing INFO Memory - "e.tury" - Aug 19 7:09:11 2008


I had a similar problem. the following code erased two segments:
void Erase_Cal_Constants(void)
{

WDTCTL = WDT_ARST_1000; // reset Watch Dog
// Reset clocks for flash writes
BCSCTL1 = CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;
FCTL2 = FWKEY + FSSEL0 + FN1;

unsigned int *Flash_ptr_C = (unsigned int*) 0x1040; // Ptr to INFO
segment C
unsigned int *Flash_ptr_B = (unsigned int*) 0x1080; // Ptr to segment D

FCTL3 = FWKEY; // Clear LOCK bit
FCTL1 = FWKEY + ERASE; // Set ERASE bit

*Flash_ptr_C = 0; // Dummy write to erase seg
C

FCTL1 = FWKEY; // Clear WRT bit
FCTL3 = FWKEY + LOCK; // Set LOCK bit

// Two dummy writes in a row didn't erase the second segment
FCTL3 = FWKEY; // Clear LOCK bit
FCTL1 = FWKEY + ERASE; // Set ERASE bit

*Flash_ptr_B = 0; // Erase seg D

FCTL1 = FWKEY; // Clear WRT bit
FCTL3 = FWKEY + LOCK; // Set LOCK bit
// reset clock
BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8MHz
DCOCTL = CALDCO_8MHZ;
BCSCTL3 = LFXT1S_2; // Use VLOCLK for ACLK ~ 12
Khz--actually ~ 10.3 Khz

}

Edd

>
> Try only erasing a single segment at a time, instead of trying to
> erase two segments. Additionally ensure interrupts are disabled prior
> to initiating the erase, and you might want to clear the write bit
> after the erase.
>
> FCTL1 = FWKEY; // Clear WRT bit
>
> Hugh
>
> At 08:13 AM 8/18/2008, you wrote:
> Hi all,
>
> I'm having some trouble erasing SegmentA and B of the INFO section of
> Flash memory on an MSP4301232. I'm using IAR to program it, if that
> matters at all. The erase itself appears to be successful when I'm
> debugging but then my program seems to hang and IAR starts getting
> really slow. I'm following the instructions in the user-guide (page
> 340) so I'm not sure what could be wrong. Here's my code:
>
> void eraseFlash(){
> char *flash_ptrA = (char *) 0x1080; // SegmentA
> char *flash_ptrB = (char *) 0x1000; // SegmentB
> FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
> FCTL3 = FWKEY; // Clear LOCK
> FCTL1 = FWKEY + ERASE; // Enable erase
>
> *flash_ptrA = 0; // Dummy write
> *flash_ptrB = 0; // Dummy write
>
> FCTL3 = FWKEY + LOCK; // Set Lock bit
> }
>
> Any insight would be greatly appreciated. Thank you!
>
> -John
>

------------------------------------



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

Re: Erasing INFO Memory - Hugh Molesworth - Aug 19 12:08:21 2008

Here's a tip that will save someone some time (& a company money).
Avoid magic numbers, such as these:
char *flash_ptrA = (char *) 0x1080; // SegmentA
char *flash_ptrB = (char *) 0x1000; // SegmentB

All the compilers allow some mechanism to allocate the memory map for
each variant of MSP430 using the pre-defined segment names such as
"INFO A", which means the linker takes care of memory allocation and
detects errors such as segment overlap or using a non-existent
segment by mistake (some MSP variants don't have an INFOB, for example).
#define INFO_FLASH_SIZE 128
byte SegmentA[INFO_FLASH_SIZE] @ "INFO A";
byte SegmentB[INFO_FLASH_SIZE] @ "INFO B";

char *flash_ptrA = SegmentA;
char *flash_ptrB = SegmentB;

Using this mechanism the memory layout is defined in just one place,
typically an xml file (or other linker directive file), unique to
each MSP variant. The syntax varies a little from compiler to compiler.

Hugh

At 04:09 AM 8/19/2008, you wrote:

I had a similar problem. the following code erased two segments:

void Erase_Cal_Constants(void)
{
WDTCTL = WDT_ARST_1000; // reset Watch Dog
// Reset clocks for flash writes
BCSCTL1 = CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;
FCTL2 = FWKEY + FSSEL0 + FN1;

unsigned int *Flash_ptr_C = (unsigned int*) 0x1040; // Ptr to INFO
segment C
unsigned int *Flash_ptr_B = (unsigned int*) 0x1080; // Ptr to segment D

FCTL3 = FWKEY; // Clear LOCK bit
FCTL1 = FWKEY + ERASE; // Set ERASE bit

*Flash_ptr_C = 0; // Dummy write to erase seg
C

FCTL1 = FWKEY; // Clear WRT bit
FCTL3 = FWKEY + LOCK; // Set LOCK bit

// Two dummy writes in a row didn't erase the second segment
FCTL3 = FWKEY; // Clear LOCK bit
FCTL1 = FWKEY + ERASE; // Set ERASE bit

*Flash_ptr_B = 0; // Erase seg D

FCTL1 = FWKEY; // Clear WRT bit
FCTL3 = FWKEY + LOCK; // Set LOCK bit
// reset clock
BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8MHz
DCOCTL = CALDCO_8MHZ;
BCSCTL3 = LFXT1S_2; // Use VLOCLK for ACLK ~ 12
Khz--actually ~ 10.3 Khz

}

Edd

>
> Try only erasing a single segment at a time, instead of trying to
> erase two segments. Additionally ensure interrupts are disabled prior
> to initiating the erase, and you might want to clear the write bit
> after the erase.
>
> FCTL1 = FWKEY; // Clear WRT bit
>
> Hugh
>
> At 08:13 AM 8/18/2008, you wrote:
> Hi all,
>
> I'm having some trouble erasing SegmentA and B of the INFO section of
> Flash memory on an MSP4301232. I'm using IAR to program it, if that
> matters at all. The erase itself appears to be successful when I'm
> debugging but then my program seems to hang and IAR starts getting
> really slow. I'm following the instructions in the user-guide (page
> 340) so I'm not sure what could be wrong. Here's my code:
>
> void eraseFlash(){
> char *flash_ptrA = (char *) 0x1080; // SegmentA
> char *flash_ptrB = (char *) 0x1000; // SegmentB
> FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
> FCTL3 = FWKEY; // Clear LOCK
> FCTL1 = FWKEY + ERASE; // Enable erase
>
> *flash_ptrA = 0; // Dummy write
> *flash_ptrB = 0; // Dummy write
>
> FCTL3 = FWKEY + LOCK; // Set Lock bit
> }
>
> Any insight would be greatly appreciated. Thank you!
>
> -John
>

------------------------------------



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

Re: Erasing INFO Memory - "e.tury" - Aug 19 15:04:06 2008


Thanks for the tip. I'm a newbie and rely too much on TI's code
examples.

But we're getting there.

Edd

>
> Here's a tip that will save someone some time (& a company money).
> Avoid magic numbers, such as these:
> char *flash_ptrA = (char *) 0x1080; // SegmentA
> char *flash_ptrB = (char *) 0x1000; // SegmentB
>
> All the compilers allow some mechanism to allocate the memory map for
> each variant of MSP430 using the pre-defined segment names such as
> "INFO A", which means the linker takes care of memory allocation and
> detects errors such as segment overlap or using a non-existent
> segment by mistake (some MSP variants don't have an INFOB, for
example).
> #define INFO_FLASH_SIZE 128
> byte SegmentA[INFO_FLASH_SIZE] @ "INFO A";
> byte SegmentB[INFO_FLASH_SIZE] @ "INFO B";
>
> char *flash_ptrA = SegmentA;
> char *flash_ptrB = SegmentB;
>
> Using this mechanism the memory layout is defined in just one place,
> typically an xml file (or other linker directive file), unique to
> each MSP variant. The syntax varies a little from compiler to
compiler.
>
> Hugh
>
> At 04:09 AM 8/19/2008, you wrote:
>
> I had a similar problem. the following code erased two segments:
>
> void Erase_Cal_Constants(void)
> {
> WDTCTL = WDT_ARST_1000; // reset Watch Dog
> // Reset clocks for flash writes
> BCSCTL1 = CALBC1_1MHZ;
> DCOCTL = CALDCO_1MHZ;
> FCTL2 = FWKEY + FSSEL0 + FN1;
>
> unsigned int *Flash_ptr_C = (unsigned int*) 0x1040; // Ptr to INFO
> segment C
> unsigned int *Flash_ptr_B = (unsigned int*) 0x1080; // Ptr to segment
D
>
> FCTL3 = FWKEY; // Clear LOCK bit
> FCTL1 = FWKEY + ERASE; // Set ERASE bit
>
> *Flash_ptr_C = 0; // Dummy write to erase seg
> C
>
> FCTL1 = FWKEY; // Clear WRT bit
> FCTL3 = FWKEY + LOCK; // Set LOCK bit
>
> // Two dummy writes in a row didn't erase the second segment
> FCTL3 = FWKEY; // Clear LOCK bit
> FCTL1 = FWKEY + ERASE; // Set ERASE bit
>
> *Flash_ptr_B = 0; // Erase seg D
>
> FCTL1 = FWKEY; // Clear WRT bit
> FCTL3 = FWKEY + LOCK; // Set LOCK bit
> // reset clock
> BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8MHz
> DCOCTL = CALDCO_8MHZ;
> BCSCTL3 = LFXT1S_2; // Use VLOCLK for ACLK ~ 12
> Khz--actually ~ 10.3 Khz
>
> }
>
> Edd
>
> >
> > Try only erasing a single segment at a time, instead of trying to
> > erase two segments. Additionally ensure interrupts are disabled
prior
> > to initiating the erase, and you might want to clear the write bit
> > after the erase.
> >
> > FCTL1 = FWKEY; // Clear WRT bit
> >
> > Hugh
> >
> > At 08:13 AM 8/18/2008, you wrote:
> > Hi all,
> >
> > I'm having some trouble erasing SegmentA and B of the INFO section
of
> > Flash memory on an MSP4301232. I'm using IAR to program it, if that
> > matters at all. The erase itself appears to be successful when I'm
> > debugging but then my program seems to hang and IAR starts getting
> > really slow. I'm following the instructions in the user-guide (page
> > 340) so I'm not sure what could be wrong. Here's my code:
> >
> > void eraseFlash(){
> > char *flash_ptrA = (char *) 0x1080; // SegmentA
> > char *flash_ptrB = (char *) 0x1000; // SegmentB
> > FCTL2 = FWKEY + FSSEL1 + FN0; // SMCLK/2
> > FCTL3 = FWKEY; // Clear LOCK
> > FCTL1 = FWKEY + ERASE; // Enable erase
> >
> > *flash_ptrA = 0; // Dummy write
> > *flash_ptrB = 0; // Dummy write
> >
> > FCTL3 = FWKEY + LOCK; // Set Lock bit
> > }
> >
> > Any insight would be greatly appreciated. Thank you!
> >
> > -John
>

------------------------------------



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

Re: Erasing INFO Memory - Matthias Weingart - Aug 22 4:34:32 2008

Hugh Molesworth :

> #define INFO_FLASH_SIZE 128
> byte SegmentA[INFO_FLASH_SIZE] @ "INFO A";
> byte SegmentB[INFO_FLASH_SIZE] @ "INFO B";

You can also use sizeof("INFO A").

int FlashA[sizeof("INFO A")] @ "INFO A";

However, I still missing something like startof("INFO A") to assign
a pointer the start address of the flash segment.

foo()
{
int * p;
p = startof("INFO A");
}

Any ideas?

Matthias
------------------------------------



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

RE: Re: Erasing INFO Memory - Paul Curtis - Aug 22 4:43:51 2008

Hugh,

> Hugh Molesworth :
>
> > #define INFO_FLASH_SIZE 128
> > byte SegmentA[INFO_FLASH_SIZE] @ "INFO A";
> > byte SegmentB[INFO_FLASH_SIZE] @ "INFO B";
>
> You can also use sizeof("INFO A").
>
> int FlashA[sizeof("INFO A")] @ "INFO A";

sizeof("INFO A") == 7. You're sizing the string. CrossWorks does have a
SIZEOF operator at the assembly level that will return the size of a
section.

> However, I still missing something like startof("INFO A") to assign
> a pointer the start address of the flash segment.

If you use CrossWorks you can set section start and size symbols in the
section placement file, IIRC. In V1 and V2 section start and end addresses
are automatically generated for you, but if your section name is INFO A then
you have problems accessing those symbols from C (they get spaces put in
them).

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

------------------------------------



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

Re: Erasing INFO Memory - Hugh Molesworth - Aug 22 11:29:04 2008

Hey Paul, I didn't write that bit about sizeof("INFO A")!

Matthias, doesn't the snippet I previously posted do what you are
looking for? Here it is again:

byte SegmentA[INFO_FLASH_SIZE] @ "INFO A";
byte SegmentB[INFO_FLASH_SIZE] @ "INFO B";

char *flash_ptrA = SegmentA;
char *flash_ptrB = SegmentB;

I do like Paul's suggestion of using the section placement xml file,
and most of the other compilers have something similar.

Hugh

At 01:43 AM 8/22/2008, you wrote:
Hugh,

> Hugh Molesworth :
>
> > #define INFO_FLASH_SIZE 128
> > byte SegmentA[INFO_FLASH_SIZE] @ "INFO A";
> > byte SegmentB[INFO_FLASH_SIZE] @ "INFO B";
>
> You can also use sizeof("INFO A").
>
> int FlashA[sizeof("INFO A")] @ "INFO A";

sizeof("INFO A") == 7. You're sizing the string. CrossWorks does have a
SIZEOF operator at the assembly level that will return the size of a
section.

> However, I still missing something like startof("INFO A") to assign
> a pointer the start address of the flash segment.

If you use CrossWorks you can set section start and size symbols in the
section placement file, IIRC. In V1 and V2 section start and end addresses
are automatically generated for you, but if your section name is INFO A then
you have problems accessing those symbols from C (they get spaces put in
them).

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

------------------------------------



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

Re: Erasing INFO Memory - Matthias Weingart - Aug 23 7:53:58 2008

Hugh Molesworth :

> Hey Paul, I didn't write that bit about sizeof("INFO A")!
>
> Matthias, doesn't the snippet I previously posted do what you are
> looking for? Here it is again:
>
> byte SegmentA[INFO_FLASH_SIZE] @ "INFO A";
> byte SegmentB[INFO_FLASH_SIZE] @ "INFO B";
>
> char *flash_ptrA = SegmentA;
> char *flash_ptrB = SegmentB;
>
> I do like Paul's suggestion of using the section placement xml file,
> and most of the other compilers have something similar.

Hugh,

you only used the address part of the definition in the xml-file, not the
size part. What Paul is meaning is, that you can do the following:
- open memory map file and open the properties of "INFO A"
- write into the field "Size symbol": INFOA_SIZE
- write into the field "Start adress symbol": INFOA_ADR

Your definition can the written as:
byte SegmentA[INFOA_SIZE] @ INFOA_ADR;
Both symbols are defined using the XML-File.

And you do not need this global definition, you can use the symbols directly:
char *flash_ptrA = INFOA_ADR;
for (i=0; i This is what I was looking for.

M.
------------------------------------



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