A little UNIX-inspired terminal application for the Numworks Calculator (not using escher).

L.E. Terminal (Lightweight Emulated Terminal)

Logo

L.E. Terminal (let for short) is a little UNIX-inspired terminal for the Numworks Calculator.

Screenshot

It does not use escher (Numworks' GUI Library).

Features

Bare bones multi-user system

Each user have an username, a UID (universal id), and an execution level (low to root)

Let introduces four default user accounts, each assigned to a specific execution level :

  • root is, obviously, the root user : it have the highest execution level (well, named root)
  • boat, who takes the lowest execution level (low)
  • cacahuete, who takes the normal execution level (normal)
  • coconut, who takes the high (right below root) execution level.

Users can also be added dynamically using the useradd command.

Filesystem

The standard UNIX filesystem commands that are implemented currently interfaces with a virtual file system (VFS). The Numworks' Ion Storage is mounted by default in /ram/

A text editor is actually in development, called kilo (inspired from nano)

Commands

Here are the implemented commands :

  • uname : same command as UNIX : displays kernel info such as Epsilon's version, etc...

  • echo : print the passed arguments to the screen

  • clear : clear the terminal

  • history : displays the commands history

  • whoami: displays the current user name

  • ion : interfaces with Ion (Numworks low level library)

    Arguments :

    • -s : put the calculator in sleep mode (like the power button)
    • -D : enter DFU mode (needs root privileges)
    • -S : shutdown the calculator
    • -r : reboot the calculator (not working for the moment)
    • -b : shows the battery level as a nice bar
    • -u : shows USB infos
  • rm, touch, cp, cat : same as UNIX

  • ls : list all files in the Numworks' storage (because of a limitation within Ion, ls needs a file extension to list files, default is set to py)

  • pyscr : creates the default samples Python scripts in Epsilon (i.e. squares.py, etc...)

  • args : displays every arguments on screen, including the command

  • chars : displays every char in the range 0-255 (for debug purposes)

  • poincare : an interactive poincare shell (for calculation) (Warning : it crashes if you throw it letters in input)

  • su : means here switch user, who switches to root if no arguments passed, or the user who is passed in arguments (user name)

  • useradd : add an user to the user repository

  • users : list available users, use -d as argument for detailed output

Building instructions

Note : the terminal does not support the simulator

As a "subfirmware"

If you want to use let as a "subfirmware" (kind of a firmware in a firmware), follow these steps :

  • Clone the source of the firmware you want to use (ex: Epsilon)
  • Clone this repository in the apps/terminal folder of the firmware source (the terminal folder needs to be created, of course)
  • Add the following line to the makefile apps/Makefile at the top :
include apps/terminal/Makefile
  • Go to the main.cpp file and add this line to the top :
#include "terminal/startup.h"
  • In the same file, call the terminal's main function right below Poincare::Init(); :
void ion_main(int argc, const char * const argv[]) {
  // Initialize Poincare::TreePool::sharedPool
  Poincare::Init();

  terminal_startup_check(argc, argv);

And done ! You will be able to launch the terminal at startup when pressing the HOME key !

Owner
Cacahuète Sans Sel
A passionate french developer
Cacahuète Sans Sel
Comments
  • Building errors [bug]

    Building errors [bug]

    Your project seems awesome, but I can't build it (I tried with let in the apps folder, but there's a lot of .h missing and other errors), so if you could put some building instructions (I saw a todo in the readme, but nobody can test it without these) I'd love to contribute, so thanks in advance ^^

  • error: 'class Ion::Events::Event' has no member named 'id'

    error: 'class Ion::Events::Event' has no member named 'id'

    I have this error when compiling with make binpack -j8 with Omega on the omega-dev branch :

    apps/terminal/external/extapp_api.cpp: In function 'int extapp_getKey(bool, bool*)':
    apps/terminal/external/extapp_api.cpp:300:19: error: 'class Ion::Events::Event' has no member named 'id'; did you mean 'uint8_t Ion::Events::Event::m_id'? (not accessible from this context)
      300 |       key = event.id();
          |                   ^~
    In file included from ion/include/ion.h:9,
                     from apps/terminal/external/extapp_api.cpp:1:
    ion/include/ion/events.h:41:11: note: declared private here
       41 |   uint8_t m_id;
          |           ^~~~
    

    When changing event.id() to event.m_id(), I have this error :

    apps/terminal/external/extapp_api.cpp: In function 'int extapp_getKey(bool, bool*)':
    apps/terminal/external/extapp_api.cpp:300:19: error: 'uint8_t Ion::Events::Event::m_id' is private within this context
      300 |       key = event.m_id();
          |                   ^~~~
    In file included from ion/include/ion.h:9,
                     from apps/terminal/external/extapp_api.cpp:1:
    ion/include/ion/events.h:41:11: note: declared private here
       41 |   uint8_t m_id;
          |           ^~~~
    apps/terminal/external/extapp_api.cpp:300:24: error: expression cannot be used as a function
      300 |       key = event.m_id();
          |                        ^
    

    What should I do ?

  • undefined reference to `Code::ScriptTemplate::[ScriptName]()' (Epsilon 15)

    undefined reference to `Code::ScriptTemplate::[ScriptName]()' (Epsilon 15)

    Tried with Epsilon 15.3.1 (to avoid Omega-related errors), but I have this error :

    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /var/folders/w2/sy9f6ygx2935d8xnqqgj5pt80000gn/T//epsilon.elf.8MWz63.ltrans0.ltrans.o: in function `terminal_main(int, char const* const*) [clone .constprop.0]':
    /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:300: undefined reference to `Code::ScriptTemplate::Squares()'
    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:301: undefined reference to `Code::ScriptTemplate::Parabola()'
    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:302: undefined reference to `Code::ScriptTemplate::Mandelbrot()'
    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:303: undefined reference to `Code::ScriptTemplate::Polynomial()'
    collect2: error: ld returned 1 exit status
    make: *** [output/release/device/n0110/epsilon.elf] Error 1
    
  • Switching to root user after using a command

    Switching to root user after using a command

    ~~Using history makes the user switch to root automatically~~ Using any command makes the user switch to root automatically That's all x)

    (Got this error with Epsilon 15.3.2)

  • Crash with LeT

    Crash with LeT

    Hi, I'm having troubles with LET, every time I enter a command the calculator just resets itself, I believe that it's due to a parser error but i(m not sure. I'm going to search in the code but i'm not sure that i will be able to find the issue. Thanks by advance, Bzyli

Related tags
Simple Unix Terminal Football Manager-like game.

Superleage 2020/2021 It is a "work in progress" simple game based on some mechanics of Football Manager. The game is in a very early stage of Developm

Oct 14, 2021
A terminal emulator that runs in your terminal. Powered by Turbo Vision.
A terminal emulator that runs in your terminal. Powered by Turbo Vision.

tvterm A terminal emulator that runs in your terminal. Powered by Turbo Vision. tvterm is an experimental terminal emulator widget and application bas

Aug 8, 2022
Spitfire is a basic terminal language that can exicute code via the terminal.

Spitfire is a basic terminal language that can exicute code via the terminal. It is easy to learn and runs fast, considering that its just a 300 line c++ file.

Nov 18, 2021
httpserve - Spin up a little http server from the commandline.

httpserve - Spin up a little http server from the commandline.

Aug 22, 2021
This is a terminal made using C language.
This is a terminal made using C language.

CommandConsole As the name suggests this is a terminal like software. Like a normal terminal in linux or command prompt in windows, it also works like

Nov 11, 2022
Rizin - UNIX-like reverse engineering framework and command-line toolset.
Rizin - UNIX-like reverse engineering framework and command-line toolset.

Rizin - UNIX-like reverse engineering framework and command-line toolset.

Dec 30, 2022
SimPle SHell - minimalist Unix interactive shell written in a single C file

SimPle SHell - minimalist Unix interactive shell written in a single C file. The shell does not support scripting yet and is in an early stage of development. If you notice any bug, please open an issue on github.

Oct 24, 2021
This C program imitates what an 'ls' command does in UNIX like operating systems.

This C program imitates what an 'ls' command does in UNIX like operating systems. Arguments can be passed to the program to modify and filter the results from the command

Nov 22, 2021
A tiny UNIX shell.

Tiny SHell - TSH Description This project is a tiny UNIX shell supports only job control. It's the 5th lab of 15-213: Introduction to Computer Systems

Dec 17, 2022
A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).

args Note that this library is essentially in maintenance mode. I haven't had the time to work on it or give it the love that it deserves. I'm not add

Jan 4, 2023
A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).

args Note that this library is essentially in maintenance mode. I haven't had the time to work on it or give it the love that it deserves. I'm not add

Aug 31, 2021
CLI Application that provides the Freedesktop Secret Service using Pass as its backend!

pass-secrets CLI Application that provides the Freedesktop Secret Service using Pass as its backend! Status Currently working to store secrets with pr

Sep 13, 2022
Small header only C++ library for writing multiplatform terminal applications

Terminal Terminal is small header only library for writing terminal applications. It works on Linux, macOS and Windows (in the native cmd.exe console)

Jan 2, 2023
:computer: C++ Functional Terminal User Interface. :heart:
:computer: C++ Functional Terminal User Interface. :heart:

FTXUI Functional Terminal (X) User interface A simple C++ library for terminal based user interface. Demo: Feature Functional style. Inspired by [1] a

Jan 3, 2023
Draw sequence diagram in text from terminal.

sequence-diagram-cli Draw seqence diagram from terminal.

Dec 20, 2022
X terminal emulator rendering through OpenGL ES Compute Shaders

Zutty is a terminal emulator for the X Window System, functionally similar to several other X terminal emulators such as xterm, rxvt and countless others

Dec 24, 2022
The new Windows Terminal and the original Windows console host, all in the same place!

The new Windows Terminal and the original Windows console host, all in the same place!

Dec 29, 2022
n³ The unorthodox terminal file manager
n³ The unorthodox terminal file manager

n³ The unorthodox terminal file manager

Jan 1, 2023
Graphs the activity of a chia harvester in a linux terminal.
Graphs the activity of a chia harvester in a linux terminal.

Chia Harvest Graph Monitor for Chia Harvesting Introduction The chiaharvestgraph tool will graph Chia Harvesting activity in a linux terminal. Use a 2

Dec 11, 2022