new gcc and binutils source code
ersmith
Posts: 6,053
I have some git repos available for more recent versions of gcc and binutils ported to the Propeller. They are at:
https://github.com/totalspectrum/binutils-propeller
https://github.com/totalspectrum/gcc-propeller
There's also a git repo for the Propeller C library at
https://github.com/totalspectrum/proplib
Only source code is provided for now -- these are not stable and tested versions. They (mostly) work for me, but your mileage may vary. (By "mostly" I mean that the C stuff works; libstdc++ has not been ported yet, but as that's too big to be of practical use on the Propeller it's not much of a loss.)
If you want to build these from source, I suggest checking out the PropGCC tree and then replacing the binutils, gcc, and lib directories with the git repositories checked out from above. Eventually I hope to use git submodules to automate all of this.
The gcc (version 5) has support for new ISO C11 and C++14 features. The Propeller environment is largely unchanged from PropGCC, except that the LMM kernel is now overlaid with the bss and heap, which means that we gain back about 1K of effectively usable memory. There are a few minor improvements in floating point performance as well. On the minus side the code generator seems to be slightly worse than the old PropGCC (it hasn't been tuned yet for gcc 5 changes), although again your mileage may vary -- some benchmarks perform a bit better, some perform a bit worse.
Eric
https://github.com/totalspectrum/binutils-propeller
https://github.com/totalspectrum/gcc-propeller
There's also a git repo for the Propeller C library at
https://github.com/totalspectrum/proplib
Only source code is provided for now -- these are not stable and tested versions. They (mostly) work for me, but your mileage may vary. (By "mostly" I mean that the C stuff works; libstdc++ has not been ported yet, but as that's too big to be of practical use on the Propeller it's not much of a loss.)
If you want to build these from source, I suggest checking out the PropGCC tree and then replacing the binutils, gcc, and lib directories with the git repositories checked out from above. Eventually I hope to use git submodules to automate all of this.
The gcc (version 5) has support for new ISO C11 and C++14 features. The Propeller environment is largely unchanged from PropGCC, except that the LMM kernel is now overlaid with the bss and heap, which means that we gain back about 1K of effectively usable memory. There are a few minor improvements in floating point performance as well. On the minus side the code generator seems to be slightly worse than the old PropGCC (it hasn't been tuned yet for gcc 5 changes), although again your mileage may vary -- some benchmarks perform a bit better, some perform a bit worse.
Eric
Comments
No, as David mentioned the cogs can be cloned at run time (the code for the cog is copied out of COG memory back to hub in order to start a new COG). This does require that about 2K of hub memory be free at the time you want to start a new COG.
EDIT: I see that Eric answered my question while I was making my post. Thanks.
I like your "use a small loader and copy from COG to COG" idea -- it would remove the requirement for a large buffer at run time. Unfortunately it does mean larger changes to the library. We should look at it, though, it would be nice not to have to worry about the 2K buffer at thread startup time.