Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
KermM told me that for compiling for the Prizm on Linux, I could compile from source a specialized version of GCC configured for the SH3 and SH4 architecture.

I can't use the PrizmSDK as-is, because all the binaries are compiled for Windows.

So, where's the source of the GCC you use, as well as the source of the libraries for coding for the Prizm (if a rebuild is required for them to work on Linux)?

Sorry if it is just behind my eyes and I can't see it...

Here's Kerm's post I mentioned: http://www.cemetech.net/forum/viewtopic.php?p=169479#169479
You don't need to recompile the prizm libraries but for Binutils and GCC follow http://wiki.osdev.org/GCC_Cross-Compiler#Step_1_-_Bootstrap That is what I used for the binaries I included with the SDK. Just build with the target of sh3eb-elf and install to your path, or add to your path before compiling. Oh and to get floating point support also build and install libgcc.

You will also need to build mkg3a which can be found at https://bitbucket.org/tari/mkg3a

libfxcg shouldn't need to be rebuilt but you can find it at https://github.com/Jonimoose/libfxcg if needed, not sure how recently I've updated the source tree though.
TheStorm wrote:
libfxcg shouldn't need to be rebuilt but you can find it at https://github.com/Jonimoose/libfxcg if needed, not sure how recently I've updated the source tree though.

> Implying you don't commit and push regularly
Evil or Very Mad
Tari wrote:
TheStorm wrote:
libfxcg shouldn't need to be rebuilt but you can find it at https://github.com/Jonimoose/libfxcg if needed, not sure how recently I've updated the source tree though.

> Implying you don't commit and push regularly
Evil or Very Mad


Well its kinda a mess still due to the headers, and I've been thinking of just scrapping almost everything and starting with a clean source tree so I haven't bothered to push my possibly broken local source tree. I have been committing locally of course.
OK thanks for the replies, I will look into a session of git pull, config and make-ing tomorrow, or when I can and when I am in mood for it Smile

EDIT: unfortunately, turns out I don't have enough disk space for this odyssey. GCC source weights only ~450 MB uncompressed and I don't want to fill my 5.1GB of disk left with that. I guess I'll have to do this on another machine or find a compiled binary that happens to work on this system.
There's nothing stopping you from dumping the source tree in a temp directory and removing it once you get everything built. Empty disk space is wasted disk space.

A couple notes for Jonimus, as I'm updating the mkg3a project page:
The linker script and crt0 should be available in source control somewhere, both so they can be updated easily and can be gotten without pulling down the multi-megabyte SDK package. It scares me a bit that they're only available in blobs that (mostly) only exist on your web site.
I'd just throw them in the libfxcg source tree, since in my usage notes for mkg3a I'm noting that users will usually want to build GCC and libfxcg, which gives them a copy of crt0 and the linker script to work with right away.
The crt0.s is now part of and built with libfxcg, but yes I agree I should add the prizm.ld and the makefile rules to the libfxcg source tree.
I'm proud and very happy to announce that I finally took the time to compile GCC with sh3eb-elf as target, compile mkg3a and have some headaches Smile After some hours of work with the console, I finally can compile add-ins by simply doing "make". It will compile and pack in a g3a fine, I just tested on the real calculator.

I compiled GCC, binutils and mkg3a. For the Prizm-specific libraries, I just copied the .a files from the normal PrizmSDK.

Thanks to TheStorm and Tari for pointing me in the right direction Very Happy
Gbl08ma, perhaps I can induce you to write a tutorial or HOWTO of sorts describing the process of putting this together for other people who will want to do the same thing
?
Well, all I did was pretty much following the step 1 of the page TheStorm posted:
http://wiki.osdev.org/GCC_Cross-Compiler#Step_1_-_Bootstrap

Building mkg3a was also a breeze, I'm not sure but I think it was just a matter of make & make install.

The last step is copying the resulting binaries to the right place in relation to the PrizmSDK. You also need to copy the "include", "common" and "lib".
The file tree should look like this:

Code:

+folder where you put the SDK
   +common
      > prizm.ld
      > prizm_rules
   +include
      > all the files and folders under include on PrizmSDK
   +lib
      > libc.a
      > libfxgc.a
      > etc.
   +projects
      +project1
         +build
         +src
            > myprojectcode.c
         > Makefile
         > selected.bmp
         > unselected.bmp
      +project2
         +build
         +src
            > my2ndprojectcode.c
         > Makefile
         > selected.bmp
         > unselected.bmp
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement