Skip to content

An experimental C app for the NumWorks graphing calculator, using object code compiled from a tiny OCaml program

License

Notifications You must be signed in to change notification settings

Naereen/epsilon-sample-app-c-with-ocaml-object-code

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An experimental C app for the NumWorks graphing calculator, using object code compiled from a tiny OCaml program

TODO: finish writing documentation, when the project will be "finished".

Build

This is a sample C app to use on a NumWorks calculator.

#include <eadk.h>

int main(int argc, char * argv[]) {
  eadk_display_draw_string("Hello, world!", (eadk_point_t){0, 0}, true, eadk_color_black, eadk_color_white);
  eadk_timing_msleep(3000);
}

My first goal

I want to write a tiny src/fact.ml file, defining in OCaml a fact : int -> int function, and I would like to prove that from the C code, one can then call the int fact(int) function transparently. So far, I'm gonna try that with my fork of omicrob.


Build the app

To build this sample app, you will need to install the embedded ARM toolchain and Node.js. The C SDK for Epsilon apps is shipped as an npm module called nwlink that will automatically be installed at compile time.

brew install numworks/tap/arm-none-eabi-gcc node # Or equivalent on your OS
make clean && make build

You should now have a output/app.nwa file that you can distribute! Anyone can now install it on their calculator from the NumWorks online uploader.

BROKEN -- Run the app locally

THIS IS BROKEN: see numworks#2 To run the app on your development machine, you can use the following command

# Now connect your NumWorks calculator to your computer using the USB cable
make run

License

This sample app is distributed under the terms of the BSD License. See LICENSE for details.

Trademarks

NumWorks is a registered trademark.

About

An experimental C app for the NumWorks graphing calculator, using object code compiled from a tiny OCaml program

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 69.3%
  • C 19.4%
  • OCaml 11.3%