Shop OBEX P1 Docs P2 Docs Learn Events
Optimizing binary size in PropellerTool — Parallax Forums

Optimizing binary size in PropellerTool

MagIO2MagIO2 Posts: 2,243
edited 2021-04-18 15:23 in Propeller 2

Somehow I really believed, that the propeller tool already did that, but recently I found out, that it does not.

@cgracey
Wouldn't it be possible to have the compiler optimize the binary in size, by simply not compiling not used functions into it? Maybe with a flag in propeller tool settings, so that low level programmers tweaking with function pointers can disable this optimization.

With P1 it happened that people were fighting for each byte, which would be much easier then - and without the need to manually strip down sourcecode to the bare minimum resulting in different versions scattered across several projects. From my point of view a big win with some one time afford.

Not so problematic in the beginning for P2 code with 512kB at hand, but I bet that the projects will get bigger there as well.

Only static analysis of the code needed there. Create some call & reference tree and all functions with a link to the root node (the main function) need to go in the binary.

Comments

  • cgraceycgracey Posts: 14,151

    Yes, this would be ideal, of course, and happen as a last step in compilation. There are things I need to do before I get to that, though.

Sign In or Register to comment.