Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

The SmolPhone repository is where you can find the SmolPhone source code and open issues.

This is a monorepo that includes several subprojects:

  • os/ contains the SmolPhone libraries and drivers for the devices we support. It also contains some examples that can be run on your machine.
  • device/ contains demonstrations that can be compiled then flashed on the SmolPhone Device.
  • picocalc/ contains demonstrations that can be compiled then flashed on the PicoCalc
  • docs/ contains the markdown book you are currently reading.
  • assets/ contains ressources used by the demonstrations.

os/, device/, and picocalc/ are Cargo workspaces. They are kept separate because they don’t target the same hardware. Cargo doesn’t yet support crates targeting different hardware within the same workspace.

Clone the repository

First, clone the repository:

git clone git@gitlab.inria.fr:smolphone/smolphone.git

If you don’t have an account on the forge, use the HTTPS URI instead:

git clone https://gitlab.inria.fr/smolphone/smolphone.git

Install the toolchain

We use rustup for installing the Rust toolchain. Execute the following command in each Cargo workspaces to install the required toolchain.

rustup toolchain install

Install a C compiler for the arm-none-eabi architecture. It is required by the os/smolphone_wren/build.rs script. For example, you can install arm-none-eabi-gcc using your system package manager. Some versions of arm-none-eabi-gcc don’t include header files such as stdlib.h and string.h. To add them, you can install newlib (arm-none-eabi-newlib or newlib-arm-none-eabi).

Execute an example

The os/ workspace contains some demonstrations of the SmolPhone OS that can be run on your desktop computer. These examples are linked dynamically to SDL 2.0.26 or newer. For example, you can try our dictionary demo:

cd os/
cargo run --release --bin dictionary

List the available demos using the following command:

cargo run --bin

These binaries are defined in the smolphone_examples crate.