Shell is a Command Line Interface (CLI) application for the Mk operating system. It supports both built-in commands and externally loaded commands.
Shell is intended as a getting-started example showing how to build, install, and run an external .elf application on top of Mk.
Type help in the shell to display all available commands.
| Command | Description |
|---|---|
ls |
List directory contents |
cd |
Change current directory |
pwd |
Print working directory |
lsdsk |
List mounted disks and partitions |
launch |
Load and run an external .elf application |
install / uninstall |
Install or remove an application |
terminate |
Stop a running application |
getapps |
List installed applications |
For the complete list of commands and their usage, refer to the Shell and Commands wiki page.
Build the application (see Build below), then copy shellRelease.elf and its
icon mk_shell.bmp to the Mk file system at:
mk/apps/shell/
This path corresponds to Mk/Storage/mk/apps/shell/
in the Mk repository. Once installed, Shell appears in the Mk home screen application list.
- GNU Arm Embedded Toolchain 10.3-2021.10 — must be added to your
PATH - GNU Make 4.3
- Mk Includes
- MSYS2 (recommended) — provides
sh,find,rmand other Unix tools required by the Makefile - Git for Windows — Git Bash ships the same Unix tools
The Makefile automatically detects MSYS2 or Git Bash at their default installation paths (
C:/msys64andC:/Program Files/Git). If your installation is elsewhere, updateMSYS2_BINorGITBASH_BINat the top ofShell/Make/Makefile.
-
Clone the repository and make sure the Mk Includes directory is present at
../../Mk/Mk/Includesrelative to theMakedirectory, or updateINCLUDES_API_PATHinPong/Make/Makefileaccordingly. -
Add
arm-none-eabi-gccto yourPATH(verify witharm-none-eabi-gcc --version). -
Build:
make clean
make all # Release build — optimised, strippedThis produces shellRelease.elf, ready to install on the target.
Use the
Debugtarget for a-O0build with full debug symbols:make Debug
The application is compiled as a position-independent shared object (-fPIC -shared) and is relocatable into any 64 KB SDRAM page by the Mk dynamic loader.
| Target | Description |
|---|---|
all |
Alias for Release |
Release |
Optimised build (-Ofast), stripped |
Debug |
Unoptimised build (-O0) with full debug symbols |
clean |
Remove all generated files (.o, .d, .su, .elf, .map) |
| Tool | Version |
|---|---|
arm-none-eabi-gcc |
10.3.1 20210824 (GNU Arm Embedded Toolchain 10.3-2021.10) |
arm-none-eabi-g++ |
10.3.1 20210824 (GNU Arm Embedded Toolchain 10.3-2021.10) |
make |
GNU Make 4.3 |
Every push and pull request is automatically built by GitHub Actions.
The workflow installs the GNU Arm Embedded Toolchain, runs make Release,
and uploads shellRelease.elf as a downloadable build artifact.
The latest successful build artifact is available on the Actions tab of this repository.
Shell is the reference example for the Mk application model. For a step-by-step guide on how to structure your own Mk application — descriptor, entry point, event listeners, memory layout — see the Mk wiki.
Copyright © 2024 Mathieu Renard. All rights reserved.
This project is licensed under the BSD 3-Clause License — see the LICENSE file for details.
