If you want to use your own linker script, your best reference is the
ld manual at http://sourceware.org/binutils/docs-2.21/ld/Scripts.html#Scripts

You will probably need to define a new linker section, put it in
REGION_TEXT, and make sure it's aligned to a flash block boundary.  So
you need to modify one or more of the msp430*.x scripts, and probably
not the memory.x script.  I believe you can use -L to provide an
alternative path to custom linker scripts outside the mspgcc
installation area.

Preventing your flash programmer from wiping that section will
probably be a challenge.

Alternatively, use the information memory sections on your chip, if
they're large enough and not reserved for something else.  I think
there are some examples in the old mspgcc manual that aren't
completely out of date: in essence, define the data structure with
__attribute__((section(".infomem"))).

Peter

On Thu, Sep 1, 2011 at 7:06 PM, Sergio Campamá <scamp...@ing.puc.cl> wrote:
> Hello,
>
> I'm sorry to bother you again, but I really don't know where to look. This 
> sort of stuff is not taught anywhere I know.
>
> I am designing an app that has to store data in the msp430's flash. Looking 
> at the following post:
>
> http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/18663.aspx
>
> I realized that I can customize the memory mapping when compiling, so I 
> thought I could customize it to leave a segment of 512 bytes just for storing 
> our user data. The post says something about a cmd file, but I think that it 
> translates to the memory.x file for mspgcc.
>
> The specific questions are: how can I reserve a flash memory segment for 
> storing these values? How can I load the custom memory.x without modifying 
> the original in the mspgcc folder? Is there a way to save that segment from 
> being erased when programming a new firmware? Is there a similar syntax to 
> the #pragma DATA_* in the previous post?
>
> Thanks for any help I can get, I am truly lost.
> ---------------------------------------
> Sergio Campamá
> sergiocamp...@gmail.com
>
>
>
>
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to