From: Peter K. <pe...@pk...> - 2009-09-17 14:22:21
|
Hi, Currently by default the CONST area is at the end of the program memory, after the code. Is is possible to move the CONST area to beginning of program memory? I need this so I can access this constants as XDATA ( CC2430 pamps lower part of code memory to xdata ) since __xdata pointer access is faster than generic access. Cheers, Peter |
From: David L. <yak...@ya...> - 2009-09-17 16:59:44
|
Maybe you should get the used crt.s and make one yourself changing the const area from end to the beggining and then tell sdcc to use your own crt. --- El jue, 17/9/09, Peter Kuhar <pe...@pk...> escribió: > De: Peter Kuhar <pe...@pk...> > Asunto: [Sdcc-user] Moving const area to begining of program memory > Para: sdc...@li... > Fecha: jueves, 17 septiembre, 2009 4:21 > Hi, > Currently by default the CONST area is at the > end of the program memory, after the code. Is is > possible to move the CONST area to beginning of program > memory? > I need this so I can access this constants as > XDATA ( CC2430 pamps lower part of code memory to xdata ) > since __xdata pointer access is faster than generic > access. > > Cheers,Peter > > -----Adjunto en línea a continuación----- > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer > Conference in SF, CA > is the only developer event you need to attend this year. > Jumpstart your > developing skills, take BlackBerry mobile applications to > market and stay > ahead of the curve. Join us from November 9-12, 2009. > Register now! > http://p.sf.net/sfu/devconf > -----Adjunto en línea a continuación----- > > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > |
From: Peter K. - M. d.o.o. <pe...@mo...> - 2009-09-17 18:22:50
|
How do I do that? I've looked at all crtxxx.asm files and there doesn't seem to be any const area defined there. Or is it there by different name? This is what is in the .map file now. And i'd like to move this area lower than 0xC000. Target is mcs51 Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ CONST E688 04DD = 1245. bytes (REL,CON,CODE) Value Global -------- -------------------------------- 0C:E688 FhaDeviceDescription$__haDeviceDescription$0$0 0C:E6A6 FhaNames$_str_0$0$0 0C:E6B1 FhaNames$_str_1$0$0 On Thu, Sep 17, 2009 at 6:59 PM, David Lucena <yak...@ya...> wrote: > Maybe you should get the used crt.s and make one yourself changing the > const area from end to the beggining and then tell sdcc to use your own crt. > > |
From: Peter K. <pe...@mo...> - 2009-09-17 18:58:17
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> How do I do that? I've looked at all crtxxx.asm files and there doesn't seem to be any const area defined there. Or is it there by different name? <div><br> </div> <div>This is what is in the .map file now. And i'd like to move this area lower than 0xC000.</div> <div>Target is mcs51</div> <div><br> </div> <div> <div><br> </div> <div>Area Addr Size Decimal Bytes (Attributes)</div> <div>-------------------------------- ---- ---- ------- ----- ------------</div> <div>CONST E688 04DD = 1245. bytes (REL,CON,CODE)</div> <div><br> </div> <div> Value Global</div> <div> -------- --------------------------------</div> <div> 0C:E688 FhaDeviceDescription$__haDeviceDescription$0$0</div> <div> 0C:E6A6 FhaNames$_str_0$0$0</div> <div> 0C:E6B1 FhaNames$_str_1$0$0</div> <div><br> </div> <div><br> </div> <br> <div class="gmail_quote">On Thu, Sep 17, 2009 at 6:59 PM, David Lucena <span dir="ltr"><<a href="mailto:yak...@ya...">yak...@ya...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Maybe you should get the used crt.s and make one yourself changing the const area from end to the beggining and then tell sdcc to use your own crt.<br> <br> </blockquote> </div> </div> </body> </html> |
From: Maarten B. <sou...@ds...> - 2009-09-19 19:07:10
|
Hello Peter, This method only works for z80 I think. For mcs51 the best option is to absolutely locate the CONST area while linking. Remember that the lowest address is used by the reset and interrupt vectors, so stay above them. Example: sdcc main.rel others.rel -Wl-bCONST=0x0400 HTH, Maarten > How do I do that? I've looked at all crtxxx.asm files and there doesn't seem > to be any const area defined there. Or is it there by different name? > This is what is in the .map file now. And i'd like to move this area lower > than 0xC000. > Target is mcs51 > > > Area Addr Size Decimal Bytes (Attributes) > -------------------------------- ---- ---- ------- ----- ------------ > CONST E688 04DD = 1245. bytes > (REL,CON,CODE) > > Value Global > -------- -------------------------------- > 0C:E688 FhaDeviceDescription$__haDeviceDescription$0$0 > 0C:E6A6 FhaNames$_str_0$0$0 > 0C:E6B1 FhaNames$_str_1$0$0 > > > > On Thu, Sep 17, 2009 at 6:59 PM, David Lucena <yak...@ya...> wrote: > > > Maybe you should get the used crt.s and make one yourself changing the > > const area from end to the beggining and then tell sdcc to use your own crt. > > > > > |
From: Peter K. <pe...@pk...> - 2009-09-19 20:34:44
|
Hi, I did it with -Wl-bCONST=0x0800 Interrupt vectors are also at that address(I use a bootloader, so vectors are repositioned), Now the location of const after this switch is not 0x0800 but it made the linker put const on lower area than before. Now it's at around 0x7xxx. Which is great. Thanks. Peter On Sat, Sep 19, 2009 at 9:06 PM, Maarten Brock <sou...@ds...>wrote: > Hello Peter, > > This method only works for z80 I think. For mcs51 the > best option is to absolutely locate the CONST area while > linking. Remember that the lowest address is used by the > reset and interrupt vectors, so stay above them. > Example: > > sdcc main.rel others.rel -Wl-bCONST=0x0400 > > HTH, > Maarten > > > How do I do that? I've looked at all crtxxx.asm files and there doesn't > seem > > to be any const area defined there. Or is it there by different name? > > This is what is in the .map file now. And i'd like to move this area > lower > > than 0xC000. > > Target is mcs51 > > > > > > Area Addr Size Decimal Bytes > (Attributes) > > -------------------------------- ---- ---- ------- ----- > ------------ > > CONST E688 04DD = 1245. bytes > > (REL,CON,CODE) > > > > Value Global > > -------- -------------------------------- > > 0C:E688 FhaDeviceDescription$__haDeviceDescription$0$0 > > 0C:E6A6 FhaNames$_str_0$0$0 > > 0C:E6B1 FhaNames$_str_1$0$0 > > > > > > > > On Thu, Sep 17, 2009 at 6:59 PM, David Lucena <yak...@ya...> > wrote: > > > > > Maybe you should get the used crt.s and make one yourself changing the > > > const area from end to the beggining and then tell sdcc to use your own > crt. > > > > > > > > > > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > |