2Fermer4
JonimooseLe 25/11/2011 à 03:00
Hey Erik

As Lionel said You aren't the first person to suggest this, me being one of the others and I agree there would be much to gain by starting fresh with a new tool-chain.

I had thought of this project myself and after recently building a simple tool chain for the Casio Prizm based on GCC I realized a lot more how feasible this would be while at the same time where the most work would be. These are the steps I would take in order to achieve the goal of a clean GCC based TI Tool-chain.

1. Build binutils and gcc targeting m68k, http://wiki.osdev.org/GCC_Cross-Compiler#Step_1_-_Bootstrap is a good tutorial on that and it will work with both *nix and mingw

2. Write a _start function/crt0.s and ld scripts for the calculators, for the ld script just have it target binary, the _start/crt0.s would need to be written in m68k asm by someone who is familiar with writing ASM programs for the calculators. The _start function is responsible for setting up the ram and flash data sections and making sure they are in the correct locations, with the LD script specifying where those locations are. Again you have to be familiar with how the AMS works, where programs are located in memory when ran and other such things.

3. Write a tool to take the outputted binary and wrap it in an 89p or w/e format it should be. Starting with http://www.ticalc.org/archives/files/fileinfo/399/39967.html might be a good idea, and it may even be possible to use unmodified. Currently tigcc uses a custom linker that is just a mess and uses the COFF format making it totally unusable for with newer GCC's as Lionel said. It may also be worth writing a tool not based on libtifiles as to avoid the glib dependency though I'm not sure how big a deal this really is.

4. Get the libraries in order, much of libtigcc may be reusable here such as sprite and AMS specific routines, I would avoid any that use SMC as if we want to support Applications in the future they will be unusable. Newlib may also be worth looking into for libc, libm and such, though I'm not sure what AMS provides for stdc functions.

5. Distribute it nicely as I suggested to Lionel and he mentioned in his post DevKitPro, which is a set of GCC based cross-platform tools-chains for the NDS, WII and PSP, do this wonderfully in a manor that allows for minimal platform specific work, though toolchains on Windows are always a bit of a pain no matter how you do it.

6. Add Flash Application support if you didn't already handle it with 2. I know nothing about the 68k calcs flash application formats and what is involved there but I'm sure Lionel and others would be of help.

If you have questions or wish to discuss this further you can find me and many others who may be willing to help in the #ti IRC channel on Efnet. I am not a regular member here, as you can tell from my post count but I will try to check back for replys as well. I usually frequent the English speaking forums, specifically http://cemetech.net where I host much of my Casio Prizm tool-chain work and am one of the Sites admins. (This wasn't intended as advertising, just informing the OP of ways to reach me)