Jump to content



Photo
- - - - -

Producing add-ins using GCC (yay!)


  • Please log in to reply
3 replies to this topic

#1 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 28 December 2007 - 02:29 AM

Hi again,

I'll try to write in a way that is easier to understand for most people :P.
For you who don't know what GCC is - google it. In short, GCC and binutils provide a toolchain we can use to compile code for the fx-9860G. It is free and open source, and would be the best choice for a community SDK. Casio's SDK works, but it does not allow us as tight control over the process as we might want. Kucalc made an attempt earlier with GCCRevFX (not available anymore), but it did not really work as it should (old gcc version?).

Now, I've been digging through add~ins for the past two nights, looking for how they are structured. What basically separates default GCC output from the stuff generated by Casio's SDK, is the initialization code. It runs before the users code, and is THE important part needed to have a stable application (OS calls don't crash the app).

If you head over to http://fxsdk.sourcef... ... naryFormat you can find my reverse engineered initialization cod and also some copies of functions (OS calls). You can find an example of how to invoke gcc on the bottom of the article. Remeber that we still need C-library for stuff like division :o and math functions.

I decided to start fxsdk.sf.net as the main place for developing an SDK and developer tools for the fx-9860G. Have a look at the wiki for information. If you want to contribute, just let me know ;)

Andreas.

#2 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 29 December 2007 - 06:02 AM

Hey, this is actually great news! :D

I don't know if you still remember addheader, but it's a open source utility for adding the proper headers to addins. It can handle and import monochromic bitmaps for the addin icon. http://revolution-fx...ddheader/trunk/

#3 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 29 December 2007 - 01:54 PM

Ah, I remember.
It is poorly written though (no offence), but it works. What I said about requiring a Clib for division and simple math is not correct, I had not compiled my GCC with big endian target support, so libgcc.a was only available in little endian format and was therefore not linkable :P.
sh3eb-unknown-<{GNULINUX}>-gnu is the correct 'name' for the platform, and -lgcc is a required option :)

#4 SebHoll

SebHoll

    Newbie

  • Members
  • Pip
  • 19 posts
  • Gender:Male

  • Calculators:
    FX-9860G

Posted 29 December 2007 - 10:39 PM

Ah, I remember.
It is poorly written though (no offence), but it works. What I said about requiring a Clib for division and simple math is not correct, I had not compiled my GCC with big endian target support, so libgcc.a was only available in little endian format and was therefore not linkable :P.
sh3eb-unknown-<{GNULINUX}>-gnu is the correct 'name' for the platform, and -lgcc is a required option :)

Hey! This is looking very nice! I don't have much time at the moment, but I will be checking this thread regularly. We must have two of the best programmers in the world on this site... 8-)


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users