Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I am trying to compile code for Casio CG50 and getting errors for the ELF file on ubuntu.

I used the shell script provided in this thread and then cloned and compiled libfxcg. In that same thread, this Makefile was recommeded. So, I used the hello world example and tried compiling it.

This is the error I get
Running xxd on the test.elf file

Does anyone know how to compile this code to run on the CG50?
Thanks in advance.
The makefile you're using isn't compatible with the stock linker script. prizm.x emits a binary, not an ELF which I can tell from your hexdump because there isn't a "ELF" at the beginning of the file.
Tari wrote:
The makefile you're using isn't compatible with the stock linker script. prizm.x emits a binary, not an ELF which I can tell from your hexdump because there isn't a "ELF" at the beginning of the file.


Thank you for the reply. I am not too familiar with Makefiles. What's the minimal makefile that I could use to compile my C code?
You have already compiled your C code, and it's already a binary. What is the question?
MateoConLechuga wrote:
You have already compiled your C code, and it's already a binary. What is the question?


Do I run mkg3a on the binary to get the .g3a file?
This should probably work:

mkg3a -n :mandelbrot -i uns:unselected.png -i sel:selected.png test.elf OUTPUT_NAME
MateoConLechuga wrote:
This should probably work:

mkg3a -n :mandelbrot -i uns:unselected.png -i sel:selected.png test.elf OUTPUT_NAME


Thank you it worked. The output file works on the CG50.
  
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