An automated NdlessSDK installer for linux.
Find a file
Sylvain PILLOT 0ca56b092d Set up PATH for fish and ignore the Ndless clone
fish does not read ~/.bashrc, so also write
~/.config/fish/conf.d/ndless.fish when ~/.config/fish exists.
Ignore the Ndless/ clone created when running from the repo folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:41:50 +01:00
.gitignore Set up PATH for fish and ignore the Ndless clone 2026-10-28 18:41:50 +01:00
NdlessSDK_AutoInstall.py Set up PATH for fish and ignore the Ndless clone 2026-10-28 18:41:50 +01:00
README.md Set up PATH for fish and ignore the Ndless clone 2026-10-28 18:41:50 +01:00

Ndless SDK Automated Installer

A Python script that installs the Ndless SDK on Debian or Ubuntu. It builds everything you need to write C/C++ programs for the TI-Nspire.

By default, it installs Ndless r2023.

What the script does

  1. Installs the build dependencies with apt.
  2. Clones Ndless at the chosen version, with its git submodules.
  3. Builds the ARM toolchain (binutils, gcc, newlib, gdb) with build_toolchain.sh.
  4. Adds the toolchain and SDK to your PATH in ~/.bashrc, and in ~/.config/fish/conf.d/ndless.fish if you use fish.
  5. Builds the SDK and Ndless.
  6. Checks that nspire-gcc, genzehn and make-prg work.

The toolchain build can take from several minutes to a few hours, depending on your machine.

Requirements

  • Debian, Ubuntu or another distribution based on them (tested package names: Ubuntu 26.04).
  • Python 3.
  • sudo rights.
  • Several GB of free disk space for the toolchain build.
  • A path without spaces.

Usage

Go to the folder where you want the Ndless/ folder to be created, then run:

sudo python3 NdlessSDK_AutoInstall.py

Run it with sudo from your normal user account, not from a root shell. Only apt runs as root. The clone and the build belong to your user.

Options

Option Description Default
--version VERSION Ndless git tag or branch to install, for example r2022 or master r2023
--dir DIR Folder where Ndless/ is cloned current folder
-j N, --jobs N Number of parallel build jobs number of CPU cores
-y, --yes Do not ask for confirmation off

Examples:

# Install r2023 in ~/dev with 8 build jobs, without confirmation
sudo python3 NdlessSDK_AutoInstall.py --dir ~/dev -j 8 -y

# Install the latest development code
sudo python3 NdlessSDK_AutoInstall.py --version master

Running it again

You can run the script again on an existing install. It reuses the Ndless/ folder, switches it to the chosen version, and only rebuilds what changed. It does not add the PATH line to ~/.bashrc twice.

After the installation

Open a new terminal, or reload your shell config:

source ~/.bashrc                            # bash
source ~/.config/fish/conf.d/ndless.fish    # fish

fish cannot read ~/.bashrc. The script writes the fish file only if ~/.config/fish exists.

Check the compiler:

nspire-gcc --version

To start a project, copy a sample from Ndless/ndless-sdk/samples, or create one in an empty folder:

nspire-tools new myproject   # creates a Makefile that builds myproject.tns
nspire-tools main            # creates an empty main.c
make

The files to send to the calculator (ndless_installer_*.tns, ndless_resources.tns) are in Ndless/ndless/calcbin. See the Ndless README to pick the right installer for your OS version.

Troubleshooting

  • "this script must run as root": start it with sudo.
  • "run this script through sudo from your normal user account": you started it from a root shell. Exit the root shell and use sudo from your user.
  • "your path contains blank characters": the Ndless build does not support spaces in paths. Use --dir to choose another folder.
  • The toolchain build fails: read the output above the error. It is often a missing package or a network problem while downloading the sources. Run the script again: the steps that already finished are skipped.
  • Out of memory during the build: lower the number of jobs, for example -j 4.

Credits

  • Original script by trueToastedCode.
  • Ndless by the Ndless team.