summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/MemoryAnalysis.md4
-rw-r--r--doc/NavigationService.md2
-rw-r--r--doc/PinetimeStubWithNrf52DK.md2
-rw-r--r--doc/ble.md4
-rw-r--r--doc/ble/connection_sequence.puml2
-rw-r--r--doc/branches.md2
-rw-r--r--doc/buildAndProgram.md6
-rw-r--r--doc/buildWithDocker.md56
8 files changed, 36 insertions, 42 deletions
diff --git a/doc/MemoryAnalysis.md b/doc/MemoryAnalysis.md
index 376f98f..9afca4e 100644
--- a/doc/MemoryAnalysis.md
+++ b/doc/MemoryAnalysis.md
@@ -60,7 +60,7 @@ Puncover is really easy to install:
- Launch a browser at http://localhost:5000/
### Analysis
-Using the MAP file and tools, we can easily see what symbols are using most of the flash memory. In this case, unsuprisingly, fonts and graphics are the largest use of flash memory.
+Using the MAP file and tools, we can easily see what symbols are using most of the flash memory. In this case, unsurprisingly, fonts and graphics are the largest use of flash memory.
![Puncover](./memoryAnalysis/puncover-all-symbols.png)
@@ -150,7 +150,7 @@ You can then display the file using objdump:
hexdump ram.bin -v | less
```
-The stack is positionned at the end of the RAM -> 0xFFFF. Its size is 8192 bytes, so the end of the stack is at 0xE000.
+The stack is positioned at the end of the RAM -> 0xFFFF. Its size is 8192 bytes, so the end of the stack is at 0xE000.
On the following dump, the maximum stack usage is 520 bytes (0xFFFF - 0xFDF8):
```
diff --git a/doc/NavigationService.md b/doc/NavigationService.md
index 5a4f69e..d890cb2 100644
--- a/doc/NavigationService.md
+++ b/doc/NavigationService.md
@@ -13,7 +13,7 @@ The service UUID is 00010000-78fc-48fe-8e23-433b3a1942d0
## Characteristics
## Flags (UUID 00010001-78fc-48fe-8e23-433b3a1942d0)
-All included icons are from pure-maps, which provides the actual routing from the client. The icon names ultimately come from the mapbox project "direction-icons", See https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation See the end of this document for the full lsit of supported icon names.
+All included icons are from pure-maps, which provides the actual routing from the client. The icon names ultimately come from the mapbox project "direction-icons", See https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation See the end of this document for the full list of supported icon names.
## Narrative (UUID 00010002-78fc-48fe-8e23-433b3a1942d0)
This is a client supplied string describing the upcoming instruction such as "At the roundabout take the first exit".
diff --git a/doc/PinetimeStubWithNrf52DK.md b/doc/PinetimeStubWithNrf52DK.md
index dcaad69..afa8a74 100644
--- a/doc/PinetimeStubWithNrf52DK.md
+++ b/doc/PinetimeStubWithNrf52DK.md
@@ -1,5 +1,5 @@
# Build a stub for PineTime using NRF52-DK
-[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official developpment kit for the NRF52832 SoC from Nordic Semiconductor used in the PineTime.
+[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official development kit for the NRF52832 SoC from Nordic Semiconductor used in the PineTime.
This development kit can be very useful for PineTime development:
* You can use its embedded JLink SWD programmer/debugger to program and debug your code on the PineTime
diff --git a/doc/ble.md b/doc/ble.md
index d250263..7e3c873 100644
--- a/doc/ble.md
+++ b/doc/ble.md
@@ -146,14 +146,14 @@ The new alert characteristic allows sending new notifications to InfiniTime. It
For example, here is what a normal notification looks like in Golang (language of `itd`):
```go
-// \x00 is the category for simple alert, and there is one new notifcation, hence \x01.
+// \x00 is the category for simple alert, and there is one new notification, hence \x01.
"\x00\x01\x00Test Title\x00Test Body"
```
A call notification looks like so:
```go
-// \x03 is the category for calls, and there is one new call notifcation, hence \x01.
+// \x03 is the category for calls, and there is one new call notification, hence \x01.
"\x03\x01\x00Mary"
```
diff --git a/doc/ble/connection_sequence.puml b/doc/ble/connection_sequence.puml
index 5553182..b71a341 100644
--- a/doc/ble/connection_sequence.puml
+++ b/doc/ble/connection_sequence.puml
@@ -3,7 +3,7 @@ Pinetime --> CompanionApp: Start advertising
group BLE Connection
CompanionApp -> Pinetime: Connection request
-CompanionApp <-> Pinetime: Connection parameters negociation, security procedure,...
+CompanionApp <-> Pinetime: Connection parameters negotiation, security procedure,...
end
group Service Discovery
diff --git a/doc/branches.md b/doc/branches.md
index 3c86375..c12c764 100644
--- a/doc/branches.md
+++ b/doc/branches.md
@@ -5,7 +5,7 @@ The project is based on 2 main branches:
- **master** : this branch is always ready to be deployed. It means that at any time, we should be able to build the branch and release a new version of the application.
- **develop** : this branch contains the latest development that will be integrated in the next release once it's considered as stable.
-New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is succesfully reviewed and accepted.
+New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is successfully reviewed and accepted.
To release a new version of the application, when develop is considered stable, a **release** branch is created from **develop**. This can be considered as a *release candidate* branch. When everything is OK, this release branch is merged into **master** and the release is generated (a tag is applied to git, the release note is finalized, binaries are built,...) from **master**.
diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md
index feef9f6..6362235 100644
--- a/doc/buildAndProgram.md
+++ b/doc/buildAndProgram.md
@@ -12,6 +12,10 @@ To build this project, you'll need:
python -m pip install -r tools/mcuboot/requirements.txt
```
- A reasonably recent version of CMake (I use 3.16.5)
+ - lv_font_conv, to generate the font .c files
+ - see [lv_font_conv](https://github.com/lvgl/lv_font_conv#install-the-script)
+ - install npm (commonly done via the package manager, ensure node's version is at least 12)
+ - install lv_font_conv: `npm install lv_font_conv`
## Build steps
### Clone the repo
@@ -43,7 +47,7 @@ By default, this variable is set to *Release*. It compiles the code with size an
The *Debug* mode disables all optimizations, which makes the code easier to debug. However, the binary size will likely be too big to fit in the internal flash memory. If you want to build and debug a *Debug* binary, you'll need to disable some parts of the code. For example, the icons for the **Navigation** app use a lot of memory space. You can comment the content of `m_iconMap` in the [Navigation](https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/src/displayapp/screens/Navigation.h#L148) application to free some memory.
####(**) Note about **BUILD_DFU**:
-DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mecanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option.
+DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mechanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option.
#### CMake command line for JLink
```
diff --git a/doc/buildWithDocker.md b/doc/buildWithDocker.md
index a57893c..1bea838 100644
--- a/doc/buildWithDocker.md
+++ b/doc/buildWithDocker.md
@@ -1,62 +1,58 @@
# Build the project using Docker
-A [Docker image (Dockerfile)](../docker) containing all the build environment is available for X86_64 and AMD64 architectures. These images make the build of the firmware and the generation of the DFU file for OTA quite easy, as well as preventing clashes with any other toolchains or development environments you may have installed.
+A [Docker image (Dockerfile)](../docker) containing all the build environment is available for X86_64 and AMD64 architectures.
+These images make the build of the firmware and the generation of the DFU file for OTA quite easy, as well as preventing clashes with any other toolchains or development environments you may have installed.
-Based on Ubuntu 18.04 with the following build dependencies:
+Based on Ubuntu 22.04 with the following build dependencies:
* ARM GCC Toolchain
* nRF SDK
* MCUBoot
* adafruit-nrfutil
+* lv_font_conv
## Run a container to build the project
-The `infinitime-build` image contains all the dependencies you need. The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
+The `infinitime-build` image contains all the dependencies you need.
+The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
Before continuing, make sure you first build the image as indicated in the [Build the image](#build-the-image) section, or check the [Using the image from Docker Hub](#using-the-image-from-docker-hub) section if you prefer to use a pre-made image.
-This example will build the firmware, generate the MCUBoot image and generate the DFU file. For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
+This example will build the firmware, generate the MCUBoot image and generate the DFU file.
+For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
```bash
cd <project_root> # e.g. cd ./work/Pinetime
-docker run --rm -it -v $(pwd):/sources infinitime-build
+docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build
```
-If you only want to build a single CMake target, you can pass it in as the first parameter to the build script. This means calling the script explicitly as it will override the `CMD`. Here's an example For `pinetime-app`:
+By default, the container runs as `root`, which is not convenient as all the files generated by the build will also belong to `root`.
+The parameter `--user` overrides that default behavior.
+The command above will run as your current user.
-```bash
-docker run --rm -it -v $(pwd):/sources infinitime-build /opt/build.sh pinetime-app
-```
-
-The image is built using 1000:1000 for the user id and group id. If this is different to your user or group ids (run `id -u` and `id -g` to find out what your id values are if you are unsure), you will need to override them via the `--user` parameter in order to prevent permission errors with the output files (and the cmake build cache).
-
-Running with this image is the same as above, you just specify the ids to `docker run`:
+If you only want to build a single CMake target, you can pass it in as the first parameter to the build script.
+This means calling the script explicitly as it will override the `CMD`.
+Here's an example for `pinetime-app`:
```bash
-docker run --rm -it -v $(pwd):/sources --user $(id -u):$(id -g) infinitime-build
-```
-
-Or you can specify your user id and group id (by number, not by name) directly:
-
-```bash
-docker run --rm -it -v $(pwd):/sources --user 1234:1234 infinitime-build
+docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build /opt/build.sh pinetime-app
```
## Using the image from Docker Hub
-The image is available via Docker Hub for both the amd64 and arm64v8 architectures at [pfeerick/infinitime-build](https://hub.docker.com/r/pfeerick/infinitime-build).
+The image is available via Docker Hub for both the amd64 and arm64v8 architectures at [infinitime/infinitime-build](https://hub.docker.com/repository/docker/infinitime/infinitime-build).
-It can be pulled (downloaded) using the following command:
+You can run it using the following command:
```bash
-docker pull pfeerick/infinitime-build
+docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime/infinitime-build
```
The default `latest` tag *should* automatically identify the correct image architecture, but if for some reason Docker does not, you can specify it manually:
-* For AMD64 (x86_64) systems: `docker pull pfeerick/infinitime-build:amd64`
+* For AMD64 (x86_64) systems: `docker pull --platform linux/amd64 infinitime/infinitime-build`
-* For ARM64v8 (ARM64/aarch64) systems: `docker pull pfeerick/infinitime-build:arm64v8`
+* For ARM64v8 (ARM64/aarch64) systems: `docker pull --platform linux/arm64 infinitime/infinitime-build`
## Build the image
@@ -65,11 +61,5 @@ You can build the image yourself if you like!
The following commands must be run from the root of the project. This operation will take some time but, when done, a new image named *infinitime-build* is available.
```bash
-docker image build -t infinitime-build ./docker
-```
-
-The `PUID` and `PGID` build arguments are used to set the user and group ids used in the container, meaning you will not need to specify it later unless they change for some reason. Specifying them is not mandatory, as this can be over-ridden at build time via the `--user` flag, but doing so will make the command you need to run later a bit shorter. In the below examples, they are set to your current user id and group id automatically. You can specify them manually, but they must be specified by number, not by name.
-
-```bash
-docker image build -t infinitime-build --build-arg PUID=$(id -u) --build-arg PGID=$(id -g) ./docker
-```
+docker build -t infinitime-build ./docker
+``` \ No newline at end of file