It is a limitation of the current dwarf-2 support in Astudio. It only loads ".text" segments and ignores all others. It will be very nice when dwarf-2 support is fully fleshed out and working (particularly for >64k memory).
You can put named segments anywhere, but, as noted above, astudio won't load them. You can put your PROGMEM stuff into it's own C file and then arrange the link list ($OBJ) to locate your flash data, but that just allows you to specify the order, not a particular location. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gaël Rossignol Sent: Thursday, May 26, 2005 6:51 AM To: 'avr-gcc-list@nongnu.org' Subject: RE: [avr-gcc-list] initialized progmem data at fix address Hi, When I use the method under, to declare somme objets in the flash program memory, I can see the object in the .hex file whith AVR STUDIO 4.11 SP3, but it dont work whith the .elf file. Is that a bug of AVR STUDIO? If I use PROGMEM of the pgmspace.h header that is all correct but the memory object is placed before program code. Can I put this anywhere? Thank to answer. -----Message d'origine----- De : Eivind Sivertsen [mailto:[EMAIL PROTECTED] Envoyé : jeudi 14 avril 2005 10:15 A : Martin Bammer Cc : avr-gcc-list@nongnu.org Objet : Re: [avr-gcc-list] initialized progmem data at fix address Hi, I dont know if the #pragma option works, but I know you can do this (e.g. in your main .c file): // 1) Define the segment. #define FLASHDATA __attribute__ ((section (".flashdata"))) // 2) Declare the data array. const unsigned char data_array[] FLASHDATA = {0xd9, 0xce, 0xe3, ..., ...etc, etc}; Then add this linker command under the others in the makefile: LDFLAGS += -Wl,--section-start=.flashdata=0x1E800 Cheers, Eivind >Hi, > >use: #pragma yoursection="ANYNAME" > >then in your makefile write: >ANYNAME_ADDRESS = 8000 >LDFLAGS += -Wl,--section-start=.text=$(ANYNAME_ADDRESS) > >Attention: gcc understands 8000 as BYTE address! > > > >>hi, >> >>how can i create an initialized progmem data at fix address in program >>flash in C? >> >> ie.: bootloader version number: >> uint16_t version; // at address 0x1E800 >> >>thanks: Andras >> >> >> >>_______________________________________________ >>AVR-GCC-list mailing list >>AVR-GCC-list@nongnu.org >>http://lists.nongnu.org/mailman/listinfo/avr-gcc-list >> >> > > >_______________________________________________ >AVR-GCC-list mailing list >AVR-GCC-list@nongnu.org >http://lists.nongnu.org/mailman/listinfo/avr-gcc-list > > > _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list