RE: Re: PB555 and C++
"Liechty Ronald-RAT109" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <A100FEB1DF38CC4C9D0B6BFBDC134426022F1BA9@az33exm21.fsl.freescale.net> |
Lei, What parts of C++ are you using? C++ I/O is very memory heavy because it does so much exception testing if you wrote the same safety items in C it would take just as much space. Are you using rtti, or virtual classes those also can add a bit of code bloat, exception handling is something you can turn off. Memory allocation is heavy, again because of the code bloat. It isn't C++ that has code bloat it is what you use and how you use it that can cause the bloat. Also remember that most of the library is going to be stripped out and not linked into your code. Look at the MAP files for that. I hope this helps, Ron -- Ron Liechty Ombudsman Freescale Developer Technology [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of coles555 Sent: Saturday, October 29, 2005 11:59 PM To: [email protected] Subject: [MPC500] Re: PB555 and C++ Allan, The whole purpose of my project is to transfer some code from the Axiom CME555 board to the Axiom PB555 board. The PB555 doesn't have any external memory like the CME555. I understand that C programs doesn't take much memory. It's only the C++ libraries that takes up the most space. For instance, the MSL C++ library alone takes up 38 Kbytes but my code only takes up 3 Kbytes. As you can see, almost all of the space is taken up by the C++ library and if I do need to compile larger projects, the code itself wouldn't take much space. Please let me know if you have had any experience in this area and feel free to share some advice. Thanks, Lei --- In [email protected], "Dobbin Allan-r11834" <Allan.Dobbin@f...> wrote: > > I regularly use the stabdard CW libraries running from internal SRAM, so > they can fit but right now I don't have access to my data base to > determine if I use any specific settings, althought I don't think I done > anyting special. > > I'm not familiar with the board you're using - doesn't it have external > memory? Even if you do fit the standard CW libraries into 26K, you'll > soon run out of space once you start compiling larger projects. > > Regards, > Allan > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of coles555 > Sent: Thursday, October 27, 2005 10:18 PM > To: [email protected] > Subject: [MPC500] Re: PB555 and C++ > > > --- In [email protected], "Liechty Ronald-RAT109" <mwron@m...> > wrote: > Hi Ron, > Thank you so much for taking the time to answer my question. Please > correct me if I am wrong but I believe only the MPC556 supports code > compression. Also, there are two files (MSL_C++.PPCEABI.BARE.H.a and > MSL_C.PPCEABI.BARE.H.a) for MSL library. Is it okay for me to take > out MSL_C.PPCEABI.BARE.H.a file since it is only the C library? I > guess what I am trying to ask is if both MSL library files are needed? > > Thanks! > Lei > > > > Hello Lei, > > > > One of our engineers said there are 3 possibilities. > > > > > > 1) There are some variants of the 5xx chips that support code > > compression which if you enable it (please see the documentation) > there > > is a post link phase using a tool called Squeezard which will > compress > > the code and the chip has the ability to read the compressed code. > If > > you don't have one of those chips or if your copy of CW doesn't > support > > it, then it won't work for you. > > > > > > 2) Starting about a year or 2 ago, CW EPPC started shipping size > reduced > > versions of the C libs. These libs have SZ in the name and we only > ship > > them prebuilt for certain processors such as e500 for which the lib > is > > called MSL_C.PPCEABI.bare.SZ.E.a. You can rebuild the H MSL C lib > with > > the prefix file ansi_prefix.PPCEABI.bare.SZ.h. You also need to use > > ansi_prefix.PPCEABI.bare.SZ.h to build your project. Again if your > copy > > of CW doesn't have ansi_prefix.PPCEABI.bare.SZ.h, then it won't > work for > > you. > > > > > > 3) Change the floating point support to none assuming you do not > need it > > and use N libs. If you are using cout or printf, those functions can > > cause some bloat and you can hack at their implementation to only > > support the format characters you need. > > > > Ron > > > > -- > > Ron Liechty > > Ombudsman Freescale Developer Technology > > ron.liechty@f... > > > > coles555 Wrote: > > > > Hi there, > > I am working with a PB555 board using Codewarrior for development > > purposes. Now all the code that I am using are written in C++ and > the > > Metrowerks Standard C++ Library (MSL_C++.PPCEABI.BARE.H.a and > > MSL_C.PPCEABI.BARE.H.a) takes up 38 Kbytes of data space. However, > the > > PB555 board has only a mere 26 Kbytes of SRAM. My question is > whether > > or not it is possible to implement C++ code in the PB555 board? If > so, > > how can those C++ Library data fit within SRAM? > > > > > > > > > > ----------------------------------------------------------- > To learn more about Freescale Microcontrollers, please visit > http://www.freescale.com/mcu > > > > Yahoo! Groups Links > ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/dN_tlB/TM --------------------------------------------------------------------~-> ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/MPC500/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/