Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 528

OCaml interpeter on the nintendo 3DS [closed]

$
0
0

In the last few days I was trying to create an interpreter for the nintendo 3DS, yet I was unable to. I do not think it is impossible, but it is certainly a not an easy project.My idea was to compile C code (since the most of ocaml library is written using c, and I can use c to compile 3DS apps), but I struggled to compile a basic example.

The concept is as follows, the program is booted up, it has no previous memory.The user inputs a string, the c code gives it to the "ocaml" interpreter (which is C code as well), the ocaml interpreter evaluates it and returns back the output.

Known limitations:

  • Not all libraries/functionality are probably portable to the 3DS
  • It must be a version of ocaml before version 5. The 3DS has a 32bit arm processor, and the version 5 can be only ran on a 64bit machine.
  • Code has to be compiled with the 3DS library with devkitpro
export HOST=arm-none-eabiexport TARGET=arm-none-eabiexport PATH=/mnt/c/devkitPro/devkitARM/bin:$PATHwget https://github.com/ocaml/ocaml/archive/refs/tags/4.14.0.tar.gztar xzf 4.14.0.tar.gzcd ocaml-4.14.0./configure --host=$HOST --target=$TARGETmake worldmake install

This is my try at a script to create the libraries needed for compilation, but I am afraid that it will never compile since the arm-none-eabi option is not present.

I have tried different options, but so far, none of them succeeded.I think the next step would be probably trying to replace the runtime functions of ocaml's code with the 3DS ones, but that would take considerable effort to do so.


Viewing all articles
Browse latest Browse all 528

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>