Open hexiangdong2017 opened 5 years ago
The mentionned port is in progress on #25
Hi there, Do you think this port to ARM micro:bit could work (without too much efforts) for Numworks calculators? They run a ARMv7 Cortex-M 32bit processor, with 256 kb of Ram.
OMicroB seems to be my last hope in trying to cross-compile OCaml code to their bare-metal architecture... See https://discuss.ocaml.org/t/could-we-add-a-tiny-ocaml-interpreter-to-numworks-graphical-calculators/7652/11 for the ongoing discussion.
Thanks in advance! @Naereen
Hi @Naereen, this is an interesting questions. I think porting OMicroB itself to numworks calculator would not be too difficult, as long as you can write and load an arbitrary C program on numworks calculator, which I gather is possible ?
However, this might not give you exactly what you're looking for: from looking at the discuss post, it seems that you want an embedded interpreter à-la MicroPython. OMicroB is not that, its a runtime environment for OCaml bytecode (embedded in the program). To get what you want, you would need to add a parser and compiler for OCaml expressions, and connect the virtual machine to its output. Since the OCaml compiler is itself written in OCaml, you could probably execute it (or a simplified version of it) using OMicroB. Then, the remaining question is "is 256kb of RAM enough to run the OCaml compiler in OMicroB" ? Since 256kb is way more than what we had to work with until now, I would say this is worth a try.
Overall, I think this would require a bit of effort, but would be quite a fun project, which I would like to participate in, so let me know if you want to go further with it :)
Hi @Vertmo and thanks for your quick reply. I'll open a separate issue and continue the discussion there.
Yeah its a work in progress for BBC Micro:bit (which is based on ARM Cortex-M0)!