Steve, I used my own linker file (you can see a part of it in my previous post) to put data in a specific area of flash. I must keep this data with other code (a few C functions) since I move this entire block (.downloader) during field upgrading software. It works very well when I put only code in this block. When I try to add the data array in it, the linker send me an error of “section type conflict” which I don't understand.
Regards, Fred ------------------------------- Frederic Beaulieu, M.Sc. Research and Development NewTrax Technologies Inc. http://www.newtraxtech.com/ -----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of Steve Underwood Sent: Monday, May 09, 2005 9:27 AM To: mspgcc-users@lists.sourceforge.net Subject: Re: [Mspgcc-users] Put code and const in a same memory section Hi Frederic, If you declare data with the const attribute it goes in the same place as the code. Is that what you want to know, or are you looking to force the const data into a very specific area of flash? That is also possible by using an attribute, and modifying the default linker file to define another segment in the required area. For example, I have a 16K device, in which I put a data table. I want this to be in its own flash page, so it ca be altered at calibration time. I have this in the .x file for the linker: erasabletext (rx) : ORIGIN = 0xc000, LENGTH = 0x200 text (rx) : ORIGIN = 0xc200, LENGTH = 0x3fe0 In a C header file I have this: #define __erasablemem__ __attribute__ ((section(".erasabletext"))) And then in my code I have things like: __erasablemem__ const int a_variable; Regards, Steve Frederic Beaulieu wrote: > No one has an idea about this topics? > > > > ------------------------------- > > Frederic Beaulieu, M.Sc. > > Research and Development > > NewTrax Technologies Inc. > > http://www.newtraxtech.com/ > > -----Original Message----- > *From:* mspgcc-users-ad...@lists.sourceforge.net > [mailto:mspgcc-users-ad...@lists.sourceforge.net] *On Behalf Of > *Frederic Beaulieu > *Sent:* Wednesday, May 04, 2005 11:27 AM > *To:* mspgcc-users@lists.sourceforge.net > *Subject:* RE: [Mspgcc-users] Put code and const in a same memory section > > > > How I can specified for a memory section which type of data will be > put in there? > > > > -----Original Message----- > *From:* mspgcc-users-ad...@lists.sourceforge.net > [mailto:mspgcc-users-ad...@lists.sourceforge.net] *On Behalf Of > *Frederic Beaulieu > *Sent:* Wednesday, May 04, 2005 11:06 AM > *To:* MSP430 mspgcc Groups > *Subject:* [Mspgcc-users] Put code and const in a same memory section > > > > Hi all, > > I try to put a const array in a self-defined memory section (see > hereafter) used originally to put code but I obtained a “section type > conflict”. > > I can’t understand why. > > Any help will be appreciated > > Fred > > > > ----------------------------------------------------------------- > > Code: > > *#define* __downloader_area__ __attribute__ ((section(".downloader"))) > > *const* Byte1_t __downloader_area__ gb1PdaMessageLength[29]; > > > > Linker: > > MEMORY > > { > > … > > downloader (rx) : ORIGIN = 0x2500, LENGTH = 0x0b00 > > … > > } > > SECTIONS > > { > > … > > .downloader : > > { > > . = ALIGN(2); > > PROVIDE (__downloader_start = .) ; > > *(.downloader) > > PROVIDE (__downloader_end = .) ; > > } > downloader > > … > > } > > ----------------------------------------------------------------- > > > > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005 > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005 > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005 > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005 > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.11.6 - Release Date: 5/6/2005 > ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.6 - Release Date: 5/6/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.6 - Release Date: 5/6/2005