Re: [Fx2lib-devel] View program size
Status: Beta
Brought to you by:
mulicheng
From: Maarten B. <sou...@ds...> - 2012-04-23 21:08:35
|
Hello Andronic, > Could you explain me why XRAM end CODE pages have the same start address > (0x0000) without creating conflict? No, I cannot, because on an FX2 they DO create a conflict. But SDCC was not written for the FX2, but for the Intel 8051 instead. And the original 8051 has separate XRAM and separate CODE memory. So YOU must split the memory using the --code-loc and --xdata-loc command line switches. And while you're at it also supply SDCC with --code-size and --xdata-size so it will warn of memory overflows. Apart from reading the FX2 datsheets and the SDCC manual I advise you to also read the original 8051 datasheet, a.k.a. the 8051 bible, to get familiar with the architecture. Google it you will find it. And please do not reply to me personally, but to the whole list so everyone can benefit. If you want my personal guidance I expect you to pay my salary. Maarten > Other memory: >> Name Start End Size Max >> ---------------- -------- -------- -------- -------- >> PAGED EXT. RAM 0 256 >> EXTERNAL RAM 0x0000 0x0030 49 65536 >> ROM/EPROM/FLASH 0x0000 0x3fb7 5711 65536 >> > > > > On Sun, Apr 15, 2012 at 11:40 AM, ANDRONIC BOANARIJESY > <and...@gm...>wrote: > >> Thank you very much Maarten :) >> >> >> On Sun, Apr 15, 2012 at 10:29 AM, Maarten Brock >> <sou...@ds...>wrote: >> >>> Hi, >>> >>> > I can't see where are the code, xram sizes in my .mem file. >>> > Could you show me? >>> >>> Yes: >>> >>> > ################################################ >>> > firmware.mem >>> > ################################################ >>> > Internal RAM layout: >>> > 0 1 2 3 4 5 6 7 8 9 A B C D E F >>> > 0x00:|0|0|0|0|0|0|0|0|a|a|a|a|a|a|a|Q| >>> > 0x10:|Q|Q| | | | | | | | | | | | | | | >>> > 0x20:|B|T|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0x30:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0x40:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0x50:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0x60:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0x70:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0x80:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0x90:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0xa0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0xb0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0xc0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0xd0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0xe0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0xf0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| >>> > 0-3:Reg Banks, T:Bit regs, a-z:Data, B:Bits, Q:Overlay, I:iData, >>> S:Stack, >>> > A:Absolute >>> > >>> > Stack starts at: 0x22 (sp set to 0x21) with 222 bytes available. >>> > >>> > Other memory: >>> > Name Start End Size Max >>> > ---------------- -------- -------- -------- -------- >>> > PAGED EXT. RAM 0 256 >>> >>> Here is the XRAM (aka external ram): >>> >>> > EXTERNAL RAM 0 512 >>> >>> And here is the code: >>> >>> > ROM/EPROM/FLASH 0x0000 0x3fb7 2637 15360 >>> >>> > ############################################################# >>> > >>> > The last line ( EXTERNAL RAM) means that I don't use a Xram? >>> >>> Indeed, no paged or non-paged xram was used. >>> >>> > >>> > >>> > On Sun, Apr 15, 2012 at 9:06 AM, Maarten Brock < >>> sou...@ds...>wrote: >>> > >>> > > Hi, >>> > > >>> > > Just open the .mem file. >>> > > >>> > > Maarten >>> > > >>> > > > Hi everyone, >>> > > > >>> > > > How can I see the program size (xram, code, data) on SDCC after >>> > > compiling? >>> > > > >>> > > > with Keil, we could see: >>> > > > Program Size: data=90.0 xdata=4492 code=5455 >>> > > > >>> > > > Build target 'RAM' >>> > > > assembling dscr.a51... >>> > > > compiling fw.c... >>> > > > Source\fw.c(34): warning C317: attempt to redefine macro '_IFREQ' >>> > > > compiling device.c... >>> > > > linking... >>> > > > Program Size: data=90.0 xdata=4492 code=5455 >>> > > > [...] >>> > > > >>> > > > >>> > > > -- >>> > > > Mr. Andronic BOANARIJESY >>> > > > Software Engineer >>> > > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> ------------------------------------------------------------------------------ >>> > > For Developers, A Lot Can Happen In A Second. >>> > > Boundary is the first to Know...and Tell You. >>> > > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>> > > http://p.sf.net/sfu/Boundary-d2dvs2 >>> > > _______________________________________________ >>> > > Fx2lib-devel mailing list >>> > > Fx2...@li... >>> > > https://lists.sourceforge.net/lists/listinfo/fx2lib-devel >>> > > >>> > >>> > >>> > >>> > -- >>> > Mr. Andronic BOANARIJESY >>> > Software Engineer >>> > Tel : +212 6 38 88 28 37 >>> > Morocco >>> > >>> >>> >>> >> >> >> -- >> Mr. Andronic BOANARIJESY >> Software Engineer >> Tel : +212 6 38 88 28 37 >> Morocco >> >> > > > -- > Mr. Andronic BOANARIJESY > Software Engineer > Tel : +212 6 38 88 28 37 > Morocco > |