Skip to content

An extension library that adds new c programming functions to customize the NumWorks calculator.

License

Notifications You must be signed in to change notification settings

SaltyMold/Function-Library-for-Numworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Function Library for the Numworks Calculator

Version Stars Forks License
Maintained Written In

This repo is a C Function Library for the Numworks Calculator. I added some basic and useful functions to facilitate programming C apps.

How to use the function library

Download the source code and modify the main.c file to create your own app.

Build the app

Requirements:

  • arm-none-eabi-gcc
  • nodejs 18.20.7 (install n for 18.20.7 version)
  • nwlink (with npm)
  • make 4.3
  • git (optional)

To build this sample app, you will need to install the embedded ARM toolchain and Node.js 18. The C SDK for Epsilon apps is shipped as an npm module called nwlink v0.0.16.

Debian

sudo apt install -y build-essential git gcc-arm-none-eabi binutils-arm-none-eabi nodejs npm && npm install -g n && sudo n 18 && npm install -g [email protected]
git clone https://github.com/SaltyMold/Function-Library-for-Numworks.git
cd Crash-my-Numworks
make clean && make build

Windows

You can install MSYS2 with all dependencies preinstalled from my C-App-Guide-for-Numworks or install all manually with the instructions bellow.

Install msys2 from the MSYS2 Github and open the msys2.exe file. Download the .zip from the Node Github, and extract it.

#MSYS2

pacman -Syu

#Replace with the reel node path
echo 'export PATH="/c/Users/UserName/AppData/Local/Programs/node-18.20.7-win32-x64:$PATH"' >> ~/.bashrc
source ~/.bashrc

npm install -g [email protected]
nwlink --version
#PowerShell

#You can chose a diferent path
$env:ChocolateyInstall = "$env:LOCALAPPDATA\Programs\choco"
[System.Environment]::SetEnvironmentVariable("ChocolateyInstall", $env:ChocolateyInstall, "User")

Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

$env:Path += ";$env:ChocolateyInstall\bin"
[System.Environment]::SetEnvironmentVariable("Path", $env:Path, "User")
choco --version

choco install make --version=4.3 -y --force
make --version
#MSYS2

#Replace with the reel make path
echo 'export PATH="/c/Users/UserName/AppData/Local/Programs/choco/make/bin:$PATH"' >> ~/.bashrc 
source ~/.bashrc

pacman -S --noconfirm mingw-w64-x86_64-arm-none-eabi-gcc
arm-none-eabi-gcc --version

pacman -S --noconfirm git
git --version
git clone https://github.com/SaltyMold/Function-Library-for-Numworks.git

cd Crash-my-Numworks
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.

Build your own app

To build your own app, start by cloning the repository:

git clone https://github.com/SaltyMold/Function-Library-for-Numworks.git

Inside the project, you'll find eadk.h, which provides essential functions for interacting with the calculator. Modify main.c to implement your own code. Additionally, make sure to include an icon.png with dimensions 55×56 pixels to serve as your app’s icon. Once your modifications are done, link the app with nwlink and enjoy your app!

Special thanks

I followed the guide from epsilon-sample-app-c to build this app.