From 7dc4cd81a37301b5c45d636fb1897405290b6d35 Mon Sep 17 00:00:00 2001 From: Victor Mignot Date: Thu, 24 Jul 2025 09:49:56 +0200 Subject: add build instructions and license to the README --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 3e394cb..9ee6690 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,45 @@ # nanji An experimental OS for the PineTime. + +nanji aims to be dependency-free project, handling everything from bootstraping the hardware to the UX. +Thus, it will not rely on any third party bootloader or external RTOS. + +This is a hobby project to play around OS development. +As such, it is by no way intended to be daily-driven by anyone. + +Moreover, I don't even recommend to flash it on any other hardware than the PineTime dev kit wired to a STLink-V2 interface. + +nanji is written in C23. +However, at the time I write this, GCC does not fully support the C23 standard (and as such, can't rely on all new features). + +## Building and flashing + +Build-time dependencies: +- GCC cross-compiler (>= 15) and binutils for the `arm-none-eabi` target +- Make +- OpenOCD to flash to the PineTime. + +To build nanji, you can just run `make` at the project root. +The resulting binary will be found at `build/nanji`. + +Connect your PineTime to your machine through a STLink-V2 interface. +If you don't know how to do so, please read the [PineTime Devkit Wiring](https://wiki.pine64.org/wiki/PineTime_Devkit_Wiring) guide on the Pine64 wiki. + +Once your pinetime is plugged to your PC through STLink-V2, start OpenOCD with: + +```sh +openocd -f /usr/share/openocd/scripts/interface/stlink.cfg -f /usr/share/openocd/scripts/target/nrf52.cfg +``` + +You can then connect to the OpenOCD console through telnet or tcl on another shell, and run: +``` +halt +nrf5 mass_erase +program +``` + +## License + +This project is licensed under the GPLv3. +See the `LICENSE` file. -- cgit v1.2.3