OCaml on the 3DS?

  • Thread starter Thread starter Ventuaer
  • Start date Start date
  • Views Views 646
  • Replies Replies 0
  • Likes Likes 1

Ventuaer

Well-Known Member
Newcomer
Joined
Aug 2, 2024
Messages
50
Reaction score
12
Trophies
0
Age
26
XP
251
Country
Czech Republic
Hey! For some time, I have been trying to implement at the very least some small portion of OCaml - interpreter into a .3dsx app.
So far I have only succeeded in building very primitive apps that do not even use OCaml (eg. from the devtoolsPro, just messing with the demos).
My goal is that the user can type some string, which will be sent to be evaluated by OCaml and it's output printed using printf. OCaml does not have to be the latest, flashiest version (in fact, as of now, the version 5 is not going to be compatible, as it is only for 64 bit systems, 3DS is a 32 bit).

I can use both linux and windows compilers, but so far I have not been successful with compiling the runtime.

I think the closest I've gotten to making it work is running this code (will run in shell as a .sh file):
export HOST=arm-none-eabi
export TARGET=arm-none-eabi
export PATH=/mnt/c/devkitPro/devkitARM/bin:$PATH

wget # github link to ocaml - 4.14.0.tar.gz
tar xzf 4.14.0.tar.gz
cd ocaml-4.14.0

./configure --host=$HOST --target=$TARGET

make world
make install
Unfortunately, this does not compile. It might be possible if I were to rewrite most of the code (eg. rewriting the headers/used functions so they use native 3DS library) but that seemed like too much for a "fun" project.

If this code were to compile, it would generate some libraries, which I could link to the existing 3DS code and be happy.
 
Last edited by Ventuaer,
  • Like
Reactions: ber71

Site & Scene News

Popular threads in this forum