Jump to content



Photo
- - - - -

Compiling For 9860 Using Gcc

gcc programming 9860gau plus

  • Please log in to reply
1 reply to this topic

#1 RunasSudo

RunasSudo

    Newbie

  • Members
  • Pip
  • 1 posts

  • Calculators:
    Casio FX-9860G AU PLUS
    Casio FX-82 AU PLUS

Posted 09 May 2013 - 08:05 AM

(I apologise if this has been asked before - I searched Google for information but couldn't find any)
I've followed the instructions from the UsingGCC page on the fxSDK Wiki, and have successfully compiled a toolchain (using MinGW). However, I am having trouble getting a simple example program to compile.

My code is (based on the official SDK example):
#include "fxlib.h"
int main()
{
unsigned int key;
Bdisp_AllClr_DDVRAM();
locate(1,1);
Print((unsigned char*) "Hello!");
while(1){
	 GetKey(&key);
}
return 1;
}

The command I am using to compile is:
toolchain\bin\sh3eb-elf-gcc -m3 -mb -O9 -nostdlib -T"addin.ld" crt0.s main.c -o app.elf -Itoolchain/include

When I try to run the above command, I get:
*snip*/toolchain/bin/../lib/gcc/sh3eb-elf/4.6.4/../../../../sh3eb-elf/bin/ld.exe: warning: section `.bss' type changed to PROGBITS
*temp folder*\ccmcj6Qw.o: In function `main':
main.c:(.text.startup+0x24): undefined reference to `Bdisp_AllClr_DDVRAM'
main.c:(.text.startup+0x28): undefined reference to `locate'
main.c:(.text.startup+0x2c): undefined reference to `Print'
main.c:(.text.startup+0x30): undefined reference to `GetKey'
collect2: ld returned 1 exit status

Inside my toolchain/include directory are my fxlib.h files, etc (copied from the official SDK's OS\FX\include directory).

I believe the problem is that I do not have the libraries for fxlib.h. I have attempted to use fx9860G_library.lib, but this appears to be some sort of crazy non-standard file which I can't use.

EDIT: After a bit more Googling and trial-and-error, it would appear that the object files inside fx9860G_library.lib aren't even the right format... Is there any way I can use my locate()s and Print()s without using the official SDK?

Edited by RunasSudo, 09 May 2013 - 10:24 AM.


#2 Casimo

Casimo

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 641 posts
  • Gender:Not Telling

Posted 10 May 2013 - 10:35 AM

You should ask Anonymouse or visit casiopeia and ask Simon Lothar there.





Also tagged with one or more of these keywords: gcc, programming, 9860gau plus

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users