From 740b3d7b58dd92a6a6f99620a090ae4f05c03299 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Mon, 1 Feb 2021 21:07:53 +0100 Subject: Add new cmake option to disable the generation of DFU file (which needs adafruit-nrfutil on the build machine) : BUILD_DFU (disabled by default, enabled in docker build). --- doc/buildAndProgram.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'doc/buildAndProgram.md') diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md index 72870e3d..3139c7f5 100644 --- a/doc/buildAndProgram.md +++ b/doc/buildAndProgram.md @@ -25,7 +25,10 @@ CMake configures the project according to variables you specify the command line **NRFJPROG**|Path to the NRFJProg executable. Used only if `USE_JLINK` is 1.|`-DNRFJPROG=/opt/nrfjprog/nrfjprog` **GDB_CLIENT_BIN_PATH**|Path to arm-none-eabi-gdb executable. Used only if `USE_GDB_CLIENT` is 1.|`-DGDB_CLIENT_BIN_PATH=/home/jf/nrf52/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gdb` **GDB_CLIENT_TARGET_REMOTE**|Target remote connection string. Used only if `USE_GDB_CLIENT` is 1.|`-DGDB_CLIENT_TARGET_REMOTE=/dev/ttyACM0` +**BUILD_DFU (\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-BUILD_DFU=1` +####(*) 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. #### CMake command line for JLink ``` @@ -44,11 +47,14 @@ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_OPENOCD=1 -DG ### Build the project During the project generation, CMake created the following targets: -- FLASH_ERASE : mass erase the flash memory of the NRF52. -- FLASH_pinetime-app : flash the firmware into the NRF52. -- pinetime-app : build the standalone (without bootloader support) version of the firmware. -- pinetime-mcuboot-app : build the firmware with the support of the bootloader (based on MCUBoot). -- pinetime-graphics : small firmware that writes the boot graphics into the SPI flash. +- **FLASH_ERASE** : mass erase the flash memory of the NRF52. +- **FLASH_pinetime-app** : flash the firmware into the NRF52. +- **pinetime-app** : build the standalone (without bootloader support) version of the firmware. +- **pinetime-recovery** : build the standalone recovery version of infinitime (light firmware that only supports OTA and basic UI) +- **pinetime-recovery-loader** : build the standalone tool that flashes the recovery firmware into the external SPI flash +- **pinetime-mcuboot-app** : build the firmware with the support of the bootloader (based on MCUBoot). +- **pinetime-mcuboot-recovery** : build pinetime-recovery with bootloader support +- **pinetime-mcuboot-recovery-loader** : build pinetime-recovery-loader with bootloader support If you just want to build the project and run it on the Pinetime, using *pinetime-app* is recommanded. See [this page](../bootloader/README.md) for more info about bootloader support. @@ -63,8 +69,11 @@ Binary files are generated into the folder `src`: - **pinetime-app.map** : map file - **pinetime-mcuboot-app.bin, .hex and .out** : firmware with bootloader support in bin, hex and out formats. - **pinetime-mcuboot-app.map** : map file - - **pinetime-graphics.bin, .hex and .out** : firmware for the boot graphic in bin, hex and out formats. - - **pinetime-graphics.map** : map file + - **pinetime-mcuboot-app-image** : MCUBoot image of the firmware + - **pinetime-mcuboot-ap-dfu** : DFU file of the firmware + +The same files are generated for **pinetime-recovery** and **pinetime-recoveryloader** + ### Program and run #### Using CMake targets -- cgit v1.2.3-70-g09d2 From bca7ba4eed437361c93af6316b810e97dd071d67 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Mon, 15 Mar 2021 23:07:04 +0000 Subject: Small correction to git URL in documentation files --- .github/workflows/main.yml | 4 ++-- README.md | 2 +- doc/buildAndProgram.md | 4 ++-- doc/contribute.md | 4 ++-- doc/filesInReleaseNotes.md | 4 ++-- doc/gettingStarted/gettingStarted.md | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'doc/buildAndProgram.md') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 81926a91..4a71b7e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ # GitHub Actions Workflow to build FreeRTOS Firmware for PineTime Smart Watch # See https://lupyuen.github.io/pinetime-rust-mynewt/articles/cloud -# Based on https://github.com/JF002/Pinetime/blob/master/doc/buildAndProgram.md -# and https://github.com/JF002/Pinetime/blob/master/bootloader/README.md +# Based on https://github.com/JF002/InfiniTime/blob/master/doc/buildAndProgram.md +# and https://github.com/JF002/InfiniTime/blob/master/bootloader/README.md # Name of this Workflow name: Build PineTime Firmware diff --git a/README.md b/README.md index 3f89ec7d..c277b36c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # PineTime -![Build PineTime Firmware](https://github.com/JF002/Pinetime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=master) +![Build PineTime Firmware](https://github.com/JF002/InfiniTime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=master) > The PineTime is a free and open source smartwatch capable of running custom-built open operating systems. Some of the notable features include a heart rate monitor, a week-long battery as well as a capacitive touch IPS display that is legible in direct sunlight. It is a fully community driven side-project, which means that it will ultimately be up to the developers and end-users to determine when they deem the PineTime ready to ship. diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md index 79ca519d..4564055f 100644 --- a/doc/buildAndProgram.md +++ b/doc/buildAndProgram.md @@ -8,8 +8,8 @@ To build this project, you'll need: ## Build steps ### Clone the repo ``` -git clone https://github.com/JF002/Pinetime.git -cd Pinetime +git clone https://github.com/JF002/InfiniTime.git +cd InfiniTime git submodule update --init mkdir build cd build diff --git a/doc/contribute.md b/doc/contribute.md index 40441cd2..fe385125 100644 --- a/doc/contribute.md +++ b/doc/contribute.md @@ -1,6 +1,6 @@ # How to contribute? ## Report bugs -You use your Pinetime and find a bug in the firmware? [Create an issue on Github](https://github.com/JF002/Pinetime/issues) explaining the bug, how to reproduce it, the version of the firmware you use... +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,... @@ -41,4 +41,4 @@ The most important rule to follow is to try to keep the code as easy to read and - **Include guard** : `#pragma once` (no `#ifdef __MODULE__ / #define __MODULE__ / #endif`) - **Includes** : - files from the project : `#include "relative/path/to/the/file.h"` - - external files and std : `#include ` \ No newline at end of file + - external files and std : `#include ` diff --git a/doc/filesInReleaseNotes.md b/doc/filesInReleaseNotes.md index 2fdfadf4..f48a0c10 100644 --- a/doc/filesInReleaseNotes.md +++ b/doc/filesInReleaseNotes.md @@ -1,9 +1,9 @@ # Using the releases -For each new *stable* version of Pinetime, a [release note](https://github.com/JF002/Pinetime/releases) is created. It contains a description of the main changes in the release and some files you can use to flash the firmware in your Pinetime. +For each new *stable* version of Pinetime, a [release note](https://github.com/JF002/InfiniTime/releases) is created. It contains a description of the main changes in the release and some files you can use to flash the firmware in your Pinetime. This page describes the files from the release notes and how to use them. -**NOTE :** the files included in different could be different. This page describes the release note of [version 0.7.1](https://github.com/JF002/Pinetime/releases/tag/0.7.1), which is the version that'll probably be pre-programmed at the factory for the next batch of Pinetime devkits. +**NOTE :** the files included in different could be different. This page describes the release note of [version 0.7.1](https://github.com/JF002/InfiniTime/releases/tag/0.7.1), which is the version that'll probably be pre-programmed at the factory for the next batch of Pinetime devkits. ## Files included in the release note diff --git a/doc/gettingStarted/gettingStarted.md b/doc/gettingStarted/gettingStarted.md index a3aa49ab..123bf4ae 100644 --- a/doc/gettingStarted/gettingStarted.md +++ b/doc/gettingStarted/gettingStarted.md @@ -8,7 +8,7 @@ If you just want to flash or upgrade InfiniTime on your PineTime, this page is f - [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/Pinetime/releases). +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. @@ -98,4 +98,4 @@ Launch NRFConnect, tap the sandwish button on the top left and select *Configure 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) \ No newline at end of file +![NRFConnect CTS 1](nrfconnectcts1.jpg) -- cgit v1.2.3-70-g09d2 From adefa1e660779c91d77b2d35659840989dbd6b8d Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 21 Mar 2021 17:12:19 +0100 Subject: Update buildAndProgram.md with info about Debug/Release builds. --- doc/buildAndProgram.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'doc/buildAndProgram.md') diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md index 484916a8..cf349094 100644 --- a/doc/buildAndProgram.md +++ b/doc/buildAndProgram.md @@ -22,18 +22,23 @@ CMake configures the project according to variables you specify the command line **ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`-DARM_NONE_EABI_TOOLCHAIN_PATH=/home/jf/nrf52/gcc-arm-none-eabi-9-2020-q2-update/`| **NRF5_SDK_PATH**|path to the NRF52 SDK|`-DNRF5_SDK_PATH=/home/jf/nrf52/Pinetime/sdk`| **USE_JLINK, USE_GDB_CLIENT and USE_OPENOCD**|Enable *JLink* mode, *GDB Client* (Black Magic Probe) mode or *OpenOCD* mode (set the one you want to use to `1`)|`-DUSE_JLINK=1` -**CMAKE_BUILD_TYPE**| Build type (Release or Debug). Release is applied by default if this variable is not specified.|`-DCMAKE_BUILD_TYPE=Debug` +**CMAKE_BUILD_TYPE (\*)**| Build type (Release or Debug). Release is applied by default if this variable is not specified.|`-DCMAKE_BUILD_TYPE=Debug` **NRFJPROG**|Path to the NRFJProg executable. Used only if `USE_JLINK` is 1.|`-DNRFJPROG=/opt/nrfjprog/nrfjprog` **GDB_CLIENT_BIN_PATH**|Path to arm-none-eabi-gdb executable. Used only if `USE_GDB_CLIENT` is 1.|`-DGDB_CLIENT_BIN_PATH=/home/jf/nrf52/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gdb` **GDB_CLIENT_TARGET_REMOTE**|Target remote connection string. Used only if `USE_GDB_CLIENT` is 1.|`-DGDB_CLIENT_TARGET_REMOTE=/dev/ttyACM0` -**BUILD_DFU (\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-BUILD_DFU=1` +**BUILD_DFU (\*\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-BUILD_DFU=1` -####(*) Note about **BUILD_DFU**: +####(**) Note about **CMAKE_BUILD_TYPE**: +By default, this variable is set to *Release*. It compiles the code with size and speed optimizations. We use this value for all the binaries we publish when we [release](https://github.com/JF002/InfiniTime/releases) new versions of InfiniTime. + +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/JF002/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. #### CMake command line for JLink ``` -cmake -DCMAKE_BUILD_TYPE=Debug -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_JLINK=1 -DNRFJPROG=... ../ +cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_JLINK=1 -DNRFJPROG=... ../ ``` #### CMake command line for GDB Client (Black Magic Probe) @@ -57,7 +62,7 @@ During the project generation, CMake created the following targets: - **pinetime-mcuboot-recovery** : build pinetime-recovery with bootloader support - **pinetime-mcuboot-recovery-loader** : build pinetime-recovery-loader with bootloader support -If you just want to build the project and run it on the Pinetime, using *pinetime-app* is recommanded. See [this page](../bootloader/README.md) for more info about bootloader support. +If you just want to build the project and run it on the Pinetime, using *pinetime-app* is recommended. See [this page](../bootloader/README.md) for more info about bootloader support. Build: ``` -- cgit v1.2.3-70-g09d2