summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/buildAndProgram.md3
-rw-r--r--doc/contribute.md24
-rw-r--r--doc/gettingStarted/appmenu-071.jpgbin109376 -> 0 bytes
-rw-r--r--doc/gettingStarted/appmenu.jpgbin120674 -> 0 bytes
-rw-r--r--doc/gettingStarted/bootloader-1.0.jpgbin160275 -> 0 bytes
-rw-r--r--doc/gettingStarted/gettingStarted-1.0.md112
-rw-r--r--doc/gettingStarted/oldbootloaderlogo.jpgbin116236 -> 0 bytes
-rw-r--r--doc/gettingStarted/ota-gadgetbridge-nrfconnect.md101
-rw-r--r--doc/gettingStarted/quickactions.jpgbin114900 -> 0 bytes
-rw-r--r--doc/gettingStarted/settings.jpgbin130022 -> 0 bytes
-rw-r--r--doc/gettingStarted/version-071.jpgbin111556 -> 0 bytes
-rw-r--r--doc/gettingStarted/version-1.0.jpgbin116881 -> 0 bytes
12 files changed, 13 insertions, 227 deletions
diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md
index afd526e0..b70bdfc0 100644
--- a/doc/buildAndProgram.md
+++ b/doc/buildAndProgram.md
@@ -3,7 +3,6 @@
To build this project, you'll need:
- A cross-compiler : [ARM-GCC (9-2020-q2-update)](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update)
- The NRF52 SDK 15.3.0 : [nRF-SDK v15.3.0](https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip)
- - The `cbor` and `intelhex` modules for Python 3
- A reasonably recent version of CMake (I use 3.16.5)
## Build steps
@@ -222,4 +221,4 @@ Loading section .sec6, size 0x10000 lma 0x30000
Loading section .sec7, size 0xdf08 lma 0x40000
Start address 0x0, load size 314200
Transfer rate: 45 KB/sec, 969 bytes/write.
-```
+``` \ No newline at end of file
diff --git a/doc/contribute.md b/doc/contribute.md
index 09d20774..7958eea1 100644
--- a/doc/contribute.md
+++ b/doc/contribute.md
@@ -2,13 +2,13 @@
## Report bugs
You use your Pinetime and find a bug in the firmware? [Create an issue on Github](https://github.com/JF002/InfiniTime/issues) explaining the bug, how to reproduce it, the version of the firmware you use...
## Write and improve documentation
-Documentation might be incomplete, or not clear enough, and it is always possible to improve it with better wording, pictures, photo, video,...
+Documentation might be incomplete, or not clear enough, and it is always possible to improve it with better wording, pictures, photo, video,...
As the documentation is part of the source code, you can submit your improvements to the documentation by submitting a pull request (see below).
## Fix bugs, add functionalities and improve the code
You want to fix a bug, add a cool new functionality or improve the code? See *How to submit a pull request below*.
## Spread the word
-The Pinetime is a cool open source project that deserves to be known. Talk about it around you, on social networks, on your blog,... and let people know that we are working on an open-source firmware for a smartwatch!
+Pinetime is a cool open source project that deserves to be know. Talk about it around you, on social networks, on your blog,... and let people know that we are working on an open-source firmware for a smartwatch!
# How to submit a pull request ?
@@ -21,28 +21,28 @@ The Pinetime is a cool open source project that deserves to be known. Talk about
- Write documentation related to your new feature is applicable;
- Create the pull-request and write a great description about it : what does your PR do, why, how,... Add pictures and video if possible;
- Wait for someone to review your PR and take part in the review process;
- - Your PR will eventually be merged :)
+ - You PR will eventually be merged :)
-Your contribution is more than welcome!
+Your contribution is more than welcome!
If you want to fix a bug, add a functionality or improve the code, you'll first need to create a branch from the **develop** branch (see [this page about the branching model](./branches.md)). This branch is called a feature branch, and you should choose a name that explains what you are working on (ex: "add-doc-about-contributions"). In this branch, **focus on only one topic, bug or feature**. For example, if you created this branch to work on the UI of a specific application, do not commit modifications about the SPI driver. If you want to work on multiple topics, create one branch per topic.
When your feature branch is ready, **make sure it actually works** and **do not forget to write documentation** about it if it's relevant.
-I **strongly discourage to create a PR containing modifications that haven't been tested**. If, for any reason, you cannot test your modifications but want to publish them anyway, **please mention it in the description**. This way, other contributors might be willing to test it and provide feedback about your code.
+I **strongly discourage to create a PR containing modifications that haven't been tested**. If, for any reason, you cannot test your modifications but want to publish them anyway, **please mention it in the description**. This way, other contributors might be willing to test it and provide feedbacks about your code.
Also, before submitting your PR, check the coding style of your code against the **coding conventions** detailed below. This project also provides [clang-format](../.clang-format) and [clang-tidy](../.clang-tidy) configuration files. You can use them to ensure correct formatting of your code.
Do not forget to check the files you are going to commit and remove those who are not necessary (config files from your IDE, for example). Remove old comments, commented code,...
-Then, you can submit a pull-request for review. Try to **describe your pull request as much as possible**: what did you do in this branch, how does it work, how is it designed, are there any limitations,... This will help the contributors to understand and review your code easily. You can add pictures and video to the description so that contributors will have a quick overview of your work.
+Then, you can submit a pull-request for review. Try to **describe your pull request as much as possible**: what did you do in this branch, how does it work, how is it designed, are there any limitations,... This will help the contributors to understand and review your code easily. You can add pictures and video to the description so that contributors will have a quick overview of you work.
-Other contributors can post comments about the pull request, maybe ask for more info or adjustments in the code.
+Other contributors can post comments about the pull request, maybe ask for more info or adjustements in the code.
-Once the pull request is reviewed and accepted, it'll be merge in **develop** and will be released in the next release version of the firmware.
+Once the pull request is reviewed an accepted, it'll be merge in **develop** and will be released in the next release version of the firmware.
## Why all these rules?
-Reviewing pull-requests is a **very time consuming task** for the creator of this project ([JF002](https://github.com/JF002)) and for other contributors who take the time to review them. Every little thing you do to make their lives easier will **increase the chances your PR will be merge quickly**.
+Reviewing pull-requests is a **very time consuming task** for the creator of this project ([JF002](https://github.com/JF002)) and for other contributors who take the time to review them. Every little thing you do to make their lifes easier will **increase the chances your PR will be merge quickly**.
When reviewing PR, the author and contributors will first look at the **description**. If it's easy to understand what the PR does, why the modification is needed or interesting and how it's done, a good part of the work is already done : we understand the PR and its context.
@@ -58,12 +58,12 @@ It's totally normal for a PR to need some more work even after it was created, t
## Language
The language of this project is **C++**, and all new code must be written in C++. (Modern) C++ provides a lot of useful tools and functionalities that are beneficial for embedded software development like `constexpr`, `template` and anything that provides zero-cost abstraction.
-It's OK to include C code if this code comes from another library like FreeRTOS, NimBLE, LVGL or the NRF-SDK.
+It's OK to include C code if this code comes from another library like FreeRTOS, NimBLE, LVGL or the NRF-SDK.
## Coding style
-The most important rule to follow is to try to keep the code as easy to read and maintain as possible.
+The most important rule to follow is to try to keep the code as easy to read and maintain as possible.
- - **Indentation** : 2 spaces, no tabulation
+ - **Identation** : 2 spaces, no tabulation
- **Opening brace** at the end of the line
- **Naming** : Choose self-describing variable name
- **class** : PascalCase
diff --git a/doc/gettingStarted/appmenu-071.jpg b/doc/gettingStarted/appmenu-071.jpg
deleted file mode 100644
index dee7c8f6..00000000
--- a/doc/gettingStarted/appmenu-071.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/gettingStarted/appmenu.jpg b/doc/gettingStarted/appmenu.jpg
deleted file mode 100644
index 1e52fe78..00000000
--- a/doc/gettingStarted/appmenu.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/gettingStarted/bootloader-1.0.jpg b/doc/gettingStarted/bootloader-1.0.jpg
deleted file mode 100644
index 7b639184..00000000
--- a/doc/gettingStarted/bootloader-1.0.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/gettingStarted/gettingStarted-1.0.md b/doc/gettingStarted/gettingStarted-1.0.md
deleted file mode 100644
index 2ac22b97..00000000
--- a/doc/gettingStarted/gettingStarted-1.0.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# Getting started with InfiniTime 1.0
-On April 22 2021, InfiniTime and Pine64 [announced the release of InfiniTime 1.0](https://www.pine64.org/2021/04/22/its-time-infinitime-1-0/) and the availability of PineTime smartwatches as *enthusiast grade end-user product*. This page aims to guide you with your first step with your new PineTime.
-
-## Firmware, InfiniTime, Bootloader, Recovery firmware, OTA, DFU... What is it?
-You might have already seen these words by reading the announcement, release notes, or [the wiki guide](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0) and, you may find them misleading if you're not familiar with the project.
-
-Basically, a **firmware** is just a software running on the embedded hardware of a device, the PineTime in this case.
-**InfiniTime** is based on 3 distinct **firmwares**:
- - **[InfiniTime](https://github.com/JF002/InfiniTime)** itself, this is the *application firmware* running on the PineTime. This is the main firmware which provides most of the functionalities you'll use on a daily basis : bluetooth low-energy (BLE) connectivity, applications, watchfaces,...
- - **[The bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader)** is responsible for safely applying **updates** of the *application firmware*, reverting them in case of issues and load the recovery firmware when requested.
- - **The recovery firmware** is a specific *application firmware* than can be loaded by the bootloader on user request. This firmware can be useful in case of serious issue, when the main application firmware cannot perform an OTA update correctly. Currently, this recovery firmware is based on [InfiniTime 0.14.1](https://github.com/JF002/InfiniTime/releases/tag/0.14.1).
-
-**OTA** and **DFU** refer to the update of the firmware over BLE (**B**luetooth **L**ow **E**nergy). **OTA** means **O**ver **T**he **A**ir, this is a functionality that allows the user to update the firmware how their device using a wireless communication like BLE. When we talk about **DFU** (**D**igital **F**irmware **U**pdate), we refer to the file format and protocol used to send the update of the firmware to the watch over-the-air. InfiniTime implement the (legacy) DFU protocol from Nordic Semiconductor (NRF).
-
-## How to check the version of InfiniTime and the bootloader?
-Since September 2020, all PineTimes (devkits or sealed) are flashed using the **[first iteration of the bootloader](https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v4.1.7)** and **[InfiniTime 0.7.1](https://github.com/JF002/InfiniTime/releases/tag/0.7.1)**. There was no recovery firmware at that time.
-
-The bootloader only runs when the watch starts (from an empty battery, for example) or after a reset (after a succesful OTA or a manual reset - long push on the button).
-
-You can recognize this first iteration of the bootloader with it greenish **PINETIME** logo.
-
-![Old bootloader logo](oldbootloaderlogo.jpg)
-
-You can check the version of InfiniTime by opening the app *SystemInfo*. For version < 1.0:
-
-![InfiniTime 0.7.1 Application menu](appmenu-071.jpg)
-![InfiniTime 0.7.1 version](version-071.jpg)
-
-And for version >= 1.0 :
-
-![InfiniTime 1.0 version](version-1.0.jpg)
-
-
-PineTime shipped from June 2020 (to be confirmed) will be flashed with the [new version of the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/tag/1.0.0), the [recovery firmware](https://github.com/JF002/InfiniTime/releases/tag/0.14.1) and [InfiniTime 1.0](https://github.com/JF002/InfiniTime/releases/tag/1.0.0).
-
-The bootloader is easily recognizable with it white pine cone that is progressively drawn in green. It also displays its own version on the bottom (1.0.0 as of now).
-
-![Bootloader 1.0](bootloader-1.0.jpg)
-
-## How to update your PineTime?
-To update your PineTime, you can use one of the compatible companion applications. Here are the main ones:
-
- - **[Amazfish](https://github.com/piggz/harbour-amazfish)** (Desktop Linux, mobile Linux, SailfishOS, runs on the PinebookPro and the Pinephone)
- - **[Gadgetbridge](https://www.gadgetbridge.org/)** (Android)
- - **[Siglo](https://github.com/alexr4535/siglo)** (Linux, GTK based)
- - **NRFConnect** (closed source, Android & iOS).
-
-See [this page](ota-gadgetbridge-nrfconnect.md) for more info about the OTA procedure using Gadgetbrige and NRFCOnnect.
-
-### From InfiniTime 0.7.1 / old bootloader
-If your PineTime is currently running InfiniTime 0.7.1 and the old bootloader, we strongly recommend you update them to more recent version (Bootloader 1.0.0 and InfiniTime 1.0.0 as of now). We also recommend you install the recovery firmware once the bootloader is up-do-date.
-
-Using the companion app of your choice, you'll need to apply the OTA procedure for these 3 firmwares in this sequence (failing to follow this specific order might temporarily or permanently brick your device):
-
- 1. Flash the latest version of InfiniTime. The file to upload is named **pinetime-mcuboot-app-dfu-x.y.z.zip**. Here is the link to [InfiniTime 1.0](https://github.com/JF002/InfiniTime/releases/download/1.0.0/pinetime-mcuboot-app-dfu-1.0.0.zip).
- 2. Update the bootloader by applying the OTA procedure with the file named [**reloader-mcuboot.zip** from the repo of the bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader/releases/download/1.0.0/reloader-mcuboot.zip).
- 3. Install the recovery firmware by applying the OTA procedure with the file named [**pinetime-mcuboot-recovery-loader-dfu-0.14.1.zip** from the version 0.14.1 of InfiniTime](https://github.com/JF002/InfiniTime/releases/download/0.14.1/pinetime-mcuboot-recovery-loader-dfu-0.14.1.zip).
-
-You'll find more info about this process in [this wiki page](https://wiki.pine64.org/wiki/Upgrade_PineTime_to_InfiniTime_1.0.0). You can also see the procedure in video [here](https://video.codingfield.com/videos/watch/831077c5-16f3-47b4-9b2b-c4bbfecc6529) and [here (from Amazfish)](https://video.codingfield.com/videos/watch/f7bffb3d-a6a1-43c4-8f01-f4aeff4adf9e)
-
-### From version > 1.0
-If you are already running the new "1.0.0" bootloader, all you have to do is update your version of InfiniTime when it'll be available. We'll write specific instructions when (if) we release a new version of the bootloader.
-
-### Firmware validation
-The bootloader requires a (manual) validation of the firmware. If the watch reset with an updated firmware that was not validated, the bootloader will consider it as non-functionning and will revert to the previous version of the firmware. This is a safety feature to prevent bricking your device with a faulty firmware.
-
-You can validate your updated firmware on InfiniTime >= 1.0 by following this simple procedure:
-
- - From the watchface, swipe **right** to display the *Quick Actions menu*
- - Open the **Settings** app by tapping the *gear* icon on the bottom right
- - Swipe down and tap on the entry named **Firmware**
- - This app shows the version that is currently running. If it's not validated yet, it displays 2 buttons:
- - **Validate** to validate your firmware
- - **Reset** to reset the watch and revert to the previously running version of the firmware
-
-## InfiniTime 1.0 quick user guide
-### Setting the time
-By default, InfiniTime starts on the digital watchface. It'll probably display the epoch time (1 Jan 1970, 00:00). The time will be automatically synchronized once you connect on of the companion app to your PineTime using BLE connectivity. InfiniTime does not provide any way to manually set the time for now.
-
-### Navigation in the menu
-
-![Quick actions](quickactions.jpg)
-![Settings](settings.jpg)
-![Application menu](appmenu.jpg)
-
- - Swipe **down** to display the notification panel. Notification sent by your companion app will be displayed in this panel.
- - Swipe **up** to display the application menus. Apps (stopwatch, music, step, games,...) can be started from this menu.
- - Swipe **right** to display the Quick Actions menu. This menu allows you to
- - Set the brightness of the display
- - Start the **flashlight** app
- - Enable/disable vibrations on notifications (Do Not Disturb mode)
- - Enter the **settings** menu
- - Settings
- - Display timeout
- - Wake up event (Tap, wrist rotation)
- - Time format (12/24H)
- - Default watchface (digital / analog)
- - Battery info
- - Firmware validation
- - About (system info, firmware version,...)
-
-### Bootloader
-
-Most of the time, the bootloader just runs without your intervention (update and load the firmware).
-
-However, you can enable 2 functionalities using the push button:
-
- - Push the button until the pine cone is drawn in **blue** to force the rollback of the previous version of the firmware, even if you've already validated the updated one
- - Push the button until the pine cone is drawn in **red** to load the recovery firmware. This recovery firmware only provides BLE connectivity and OTA functionality.
-
-More info about the bootloader in [its project page](https://github.com/JF002/pinetime-mcuboot-bootloader/blob/master/README.md).
-
diff --git a/doc/gettingStarted/oldbootloaderlogo.jpg b/doc/gettingStarted/oldbootloaderlogo.jpg
deleted file mode 100644
index b4d0cdfb..00000000
--- a/doc/gettingStarted/oldbootloaderlogo.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/gettingStarted/ota-gadgetbridge-nrfconnect.md b/doc/gettingStarted/ota-gadgetbridge-nrfconnect.md
deleted file mode 100644
index 1187a9b7..00000000
--- a/doc/gettingStarted/ota-gadgetbridge-nrfconnect.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# Flash and upgrade InfiniTime
-If you just want to flash or upgrade InfiniTime on your PineTime, this page is for you!
-
-- [InfiniTime releases and versions](#infinitime-releases-and-versions)
-- [How to upgrade Over-The-Air (OTA)](#how-to-upgrade-over-the-air-ota)
- - [Using Gadgetbridge](#using-gadgetbridge)
- - [Using NRFConnect](#Using-nrfconnect)
-- [How to flash InfiniTime using the SWD interface](#how-to-flash-infinitime-using-the-swd-interface)
-
-## InfiniTime releases and versions
-All releases of InfiniTime are available on the [release page of the GitHub repo](https://github.com/JF002/InfiniTime/releases).
-
-Versions that are tagged as **RELEASE CANDIDATE** are pre-release versions, that are available for testing before actually releasing a new stable version. If you want to help us debug the project and provide stable versions to other user, you can use them. If you want stable and tested version, you should not flash these release candidate version.
-
-Release files are available under the *Assets* button.
-
-## How to upgrade Over-The-Air (OTA)
-OTA is the easiest method to upgrade InfiniTime. Note that it's only possible is your PineTime is already running InfiniTime (>= 0.7.1).
-
-2 companion apps provide support for OTA :
- - [Gadgetbridge](https://gadgetbridge.org/) (open source, runs on Android, [available on F-Droid](https://f-droid.org/packages/nodomain.freeyourgadget.gadgetbridge/)).
- - [NRFConnect](https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-mobile) (close source, runs on Android and iOS).
-
-Both applications need you to download the **DFU file** of InfiniTime. This file contains the new version of InfiniTime that will be flashed into your device. It's called **dfu-x.y.z.zip** (ex: dfu-0.9.0.zip) in the release note.
-![Dfu file](dfuFile.png )
-
-### Using Gadgetbridge
-Launch Gadgetbridge and tap on the **"+"** button on the bottom right to add a new device:
-
-![Gadgetbridge 0](gadgetbridge0.jpg)
-
-Wait for the scan to complete, your PineTime should be detected:
-
-![Gadgetbridge 1](gadgetbridge1.jpg)
-
-Tap on it. Gadgdetbridge will pair and connect to your device:
-
-![Gadgetbridge 2](gadgetbridge2.jpg)
-
-Now that Gadgetbridge is connected to your PineTime, use a file browser application (I'm using Seafile to browse my NAS) and browse to the DFU file (image-xxx.zip) you downloaded previously. Tap on it and open it using the Gadgetbridge application/firmware installer:
-
-![Gadgetbridge 3](gadgetbridge3.jpg)
-
-Read carefully the warning and tap **Install**:
-
-![Gadgetbridge 4](gadgetbridge4.jpg)
-
-Wait for the transfer to finish. Your PineTime should reset and reboot with the new version of InfiniTime!
-
-![Gadgetbridge 5](gadgetbridge5.jpg)
-
-### Using NRFConnect
-Open NRFConnect. Swipe down in the *Scanner* tab and wait for your device to appear:
-
-![NRFConnect 0](nrfconnect0.jpg)
-
-Tap on the *Connect* button on the right of your device. NRFConnect will connect to your PineTime and discover its characteristics. Tap on the **DFU** button on the top right:
-
-![NRFConnect 1](nrfconnect1.jpg)
-
-Select **Distribution packet (ZIP)**:
-
-![NRFConnect 2](nrfconnect2.jpg)
-
-Browse to the DFU file you downloaded previously, the DFU transfer will start automatically. When the transfer is finished, your PineTime will reset and restart on the new version of InfiniTime!
-
-![NRFConnect 3](nrfconnect3.jpg)
-
-## How to flash InfiniTime using the SWD interface
-Download the files **bootloader.bin**, **image-x.y.z.bin** and **pinetime-graphics-x.y.z.bin** from the release page:
-
-![Image file](imageFile.png )
-
-The bootloader reads a boot logo from the external SPI flash memory. The first step consists in flashing a tool in the MCU that will flash the boot logo into this SPI flash memory. This first step is optional but recommanded (the bootloader will display garbage on screen for a few second if you don't do it).
-Using your SWD tool, flash **pinetime-graphics-x.y.z.bin** at offset **0x0000**. Reset the MCU and wait for a few second, until the logo is completely drawn on the display.
-
-Then, using your SWD tool, flash those file at specific offset:
-
- - bootloader.bin : **0x0000**
- - image-x.y.z.bin : **0x8000**
-
-Reset and voilĂ , you're running InfiniTime on your PineTime!
-
-If you are using OpenOCD with a STLinkV2, you can find more info [on this page](../openOCD.md).
-
-## How to synchronize the time
-
-### Using Gadgetbridge
-Good news! Gadgetbridge **automatically** synchronizes the time when connecting to your PineTime!
-
-### Using NRFConnect
-You must enable the **CTS** *GATT server* into NRFConnect so that InfiniTime can synchronize the time with your smartphone.
-
-Launch NRFConnect, tap the sandwich button on the top left and select *Configure GATT server*:
-
-![NRFConnect CTS 0](nrfconnectcts0.jpg)
-
-
-Tap *Add service* and select the server configuration *Current Time service*. Tap OK and connect to your PineTime, it should automcatically sync the time once the connection is established!
-
-![NRFConnect CTS 1](nrfconnectcts1.jpg)
diff --git a/doc/gettingStarted/quickactions.jpg b/doc/gettingStarted/quickactions.jpg
deleted file mode 100644
index 0d92b134..00000000
--- a/doc/gettingStarted/quickactions.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/gettingStarted/settings.jpg b/doc/gettingStarted/settings.jpg
deleted file mode 100644
index 510b29eb..00000000
--- a/doc/gettingStarted/settings.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/gettingStarted/version-071.jpg b/doc/gettingStarted/version-071.jpg
deleted file mode 100644
index bc9bc5b5..00000000
--- a/doc/gettingStarted/version-071.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/gettingStarted/version-1.0.jpg b/doc/gettingStarted/version-1.0.jpg
deleted file mode 100644
index bcfc8c63..00000000
--- a/doc/gettingStarted/version-1.0.jpg
+++ /dev/null
Binary files differ