Uartix Programming Language

/wor·tiks/

Strange dynamic programming and scripting language that performs mathematical computations on a connected Raspberry Pi Pico (RP2040) through UART connectivity.




Getting Started

Before installing Uartix, make sure you have JDK 22 (or OpenJDK) installed on your system. Follow the steps below to get started on different operating systems and to build various components from the source.


Installing Uartix
Linux
  1. Download the .deb File: Go to the release page and download the latest *.deb file for Uartix.
  2. Install Uartix: Open your terminal and navigate to the directory where the .deb file is located. Run the following command to install Uartix:

    Terminal

    sudo dpkg -i uartix_*.deb
  3. Running Uartix: After successfully install the .deb package, you can now run the command uartix on your terminal.

Windows
  1. Download the .zip File: Go to the release page and download the latest .zip file for Windows.
  2. Extract the File: Extract the contents of the .zip file to C:\uartix.
  3. Set Environment Path Add C:\uartix\bin to your Environment Path variables to ensure you can run Uartix from any command prompt.

Firmware Installation

To install the Uartix firmware on your Raspberry Pi Pico, follow these steps:

  1. Enter Flash Mode: Connect your Raspberry Pi Pico to your system while holding the BOOTSEL button to enter flash mode.
  2. Download the UF2 Binary: Download the UF2 binary of the Uartix firmware from the release page.
  3. Install the Firmware: Drag and drop the downloaded UF2 file into the Raspberry Pi Pico storage that appears on your computer.

Building from Source
Interpreter

To build the interpreter:

  1. Open in IntelliJ: Open the Uartix repository in IntelliJ IDEA.
  2. Build Artifacts: From the menu, go to Build menu item and select Build Artifacts > Build.

Launcher

On Ubuntu, to build the Uartix launcher, ensure you have Rust and cargo installed on your system. Follow these steps:

  1. Install Dependencies:

    Terminal

    sudo apt-get install mingw-w64
    rustup target add x86_64-pc-windows-gnu
  2. Build the Launcher: Run the following commands to build the launcher:

    Terminal

    cargo build --release
    cargo build --release --target x86_64-pc-windows-gnu

Firmware

To build the Uartix firmware from source, simply follow the steps below.

  1. Installing Raspberry Pi Pico on Arduino IDE: Install the Raspberry Pi Pico boards on your Arduino IDE by following the steps here.
  2. Open in Arduino IDE: Open the file picoware/picoware.ino in your Arduino IDE.
  3. Build & Upload: Connect your Raspberry Pi Pico board on flash mode then upload and build the Picoware on your Arduino IDE.

Running from CLI

After successfully installing Uartix, you can interact with it via the command-line interface. The following guide outlines the basic usage and options available when running Uartix scripts from the CLI.

$ uartix -h

usage: uartix [-h] [-p {ttyACM0}] [-t] [files [files ...]]
 
Execute Uartix script files.
 
positional arguments:
  files                  List of files to execute.
 
named arguments:
  -h, --help             show this help message and exit
  -p {ttyACM0}, --port {ttyACM0}
                         Serial port device of the co-processor. (default: ttyACM0)
  -t, --test             Run test units. (default: false)
Position Arguments
  • files — A list of Uartix script files to be executed. This argument can accept multiple file paths, allowing you to run several scripts sequentially.


Named Arguments
  • help — Displays the help message, providing an overview of available commands and options. Use this option if you need quick guidance on how to use the CLI.

  • port — Specifies the serial port device connected to the co-processor. This option is useful if your co-processor is connected to a different serial port or if you have multiple devices connected.

  • test — Runs test units within the provided script files. This is useful for verifying the functionality of your scripts or modules. By default, this option is set to false, meaning test units are not executed unless explicitly requested.


Examples
  • To run a Uartix script file named example.utx, you can use the following command:
  • $ uartix example.utx
  • If your co-processor is connected to a different port, specify the port using the -p or --port option:
  • $ uartix -p /dev/ttyUSB0 example.utx
  • To execute test units defined in your script, use the -t option:
  • $ uartix -t example.utx



Copyright 2024 © Nathanne Isip