Shop OBEX P1 Docs P2 Docs Learn Events
Couple of items I've encounterd — Parallax Forums

Couple of items I've encounterd

photomankcphotomankc Posts: 943
edited 2012-08-17 15:41 in Propeller 1
1.) in the IDE after you start a new project and then later go to save a new file the file dialog defaults to the old project directory. Not a serious problem but an annoyance.

2.) I was porting over some Arduino classes today and noticed that one seemed to cause the code size to explode. Even after I removed all the implementation it was still bloated to over 75KB. Finally tracked tit down to a pure virtual function declaration. Changed that to an inline "return 0;" things went back to normal. Not sure if that is a known issue or not but thought I would bring it up.

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-08-16 23:55
    photomankc wrote: »
    1.) in the IDE after you start a new project and then later go to save a new file the file dialog defaults to the old project directory. Not a serious problem but an annoyance.

    Yes, I still have some work to do in remembering the last used folder.
    photomankc wrote: »
    2.) I was porting over some Arduino classes today and noticed that one seemed to cause the code size to explode. Even after I removed all the implementation it was still bloated to over 75KB. Finally tracked tit down to a pure virtual function declaration. Changed that to an inline "return 0;" things went back to normal. Not sure if that is a known issue or not but thought I would bring it up.

    Glad you mentioned it. This was a virtual function used as part of an "abstract" class? Guess we need to do more *real* C++ testing.

    Thanks.
  • ersmithersmith Posts: 6,054
    edited 2012-08-17 03:37
    [QUOTE=photomankc;1118864
    2.) I was porting over some Arduino classes today and noticed that one seemed to cause the code size to explode. Even after I removed all the implementation it was still bloated to over 75KB. Finally tracked tit down to a pure virtual function declaration. Changed that to an inline "return 0;" things went back to normal. Not sure if that is a known issue or not but thought I would bring it up.[/QUOTE]

    Try using the -fno-rtti compiler option in your C++ code. This turns off run time type information (rtti) which will prevent certain obscure C++ features from working, but will save a huge amount of run time space.

    Eric
  • photomankcphotomankc Posts: 943
    edited 2012-08-17 06:30
    @ersmith: In SimpleIDE that appears to be set by default so it's already doing that.


    @Jazzed: This was from Print.h and Print.cpp from the Arduino cores folder. I do believe that Print was not ever meant to be instantiated since it has no knowledge of how to print() or println() anything on it's own. It's supposed to be inherited and then the write() functions are overridden to do whatever needs to be done to display characters on something. I gave it a function body of
    {return 0; }
    
    and that stopped it from generating 50K or extra code but means that you could create a useless Print object. Not sure I care that much, but I'm sure there is a lot of that in other libraries.
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2012-08-17 07:28
    photomankc - just wanted to thank you for putting the compiler to the test. Your work at this stage is important and also appreciated.
  • photomankcphotomankc Posts: 943
    edited 2012-08-17 15:41
    Ken,

    Glad my efforts, meager as they are, can help you guys out! I'm really enjoying being on the front of this train.
Sign In or Register to comment.