summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--README.md12
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/graphics.cpp8
4 files changed, 21 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51ac2d18..c5cf78aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
-project(pinetime VERSION 0.7.0 LANGUAGES C CXX ASM)
+project(pinetime VERSION 0.6.1 LANGUAGES C CXX ASM)
set(NRF_TARGET "nrf52")
diff --git a/README.md b/README.md
index 30a92dc8..42efda20 100644
--- a/README.md
+++ b/README.md
@@ -92,16 +92,24 @@ GDB (Back Magic Probe)
```
$ mkdir build
$ cd build
-$ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_GDB_CLIENT=1 -DGDB_CLIENT_BIN_PATH=... -DGDB_CLIENT_TARGET_REMOTE=... -DMERGEHEX=... ../
+$ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_GDB_CLIENT=1 -DGDB_CLIENT_BIN_PATH=... -DGDB_CLIENT_TARGET_REMOTE=... ../
```
OpenOCD (STlink v2 clones)
```
$ mkdir build
$ cd build
-$ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_OPENOCD=1 -DGDB_CLIENT_BIN_PATH=[optional] -DMERGEHEX=... ../
+$ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_OPENOCD=1 -DGDB_CLIENT_BIN_PATH=[optional] ../
```
+
+**Note** : By default, the build configuration *Release* is applied. It means that the code is built with optimisations enabled (-O3). If you wanto to compile in *Debug* mode to ease debugging and step-by-step debugging, specify the CMake variable `CMAKE_BUILD_TYPE` in the CMake command line:
+
+```
+-DCMAKE_BUILD_TYPE=Debug
+```
+
+
* Make
```
$ make -j pinetime-app
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5fe46148..a30fb568 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -535,6 +535,7 @@ include_directories(
)
link_directories(
+ ../
)
@@ -547,6 +548,10 @@ add_definitions(-DNRF52 -DNRF52832 -DNRF52832_XXAA -DNRF52_PAN_74 -DNRF52_PAN_64
add_definitions(-DFREERTOS)
add_definitions(-DDEBUG_NRF_USER)
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release")
+endif()
+
# Build autonomous binary (without support for bootloader)
set(EXECUTABLE_NAME "pinetime-app")
set(NRF5_LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/gcc_nrf52.ld")
@@ -663,4 +668,4 @@ elseif(USE_OPENOCD)
COMMENT "flashing ${EXECUTABLE_NAME}.hex"
)
-endif() \ No newline at end of file
+endif()
diff --git a/src/graphics.cpp b/src/graphics.cpp
index d95ba3fa..3b53703c 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -3,13 +3,13 @@
#include <drivers/SpiMaster.h>
#include <drivers/Spi.h>
#include <drivers/SpiNorFlash.h>
-#include <sdk/components/libraries/log/nrf_log.h>
+#include <libraries/log/nrf_log.h>
#include "bootloader/boot_graphics.h"
#include <FreeRTOS.h>
#include <task.h>
-#include <sdk/integration/nrfx/legacy/nrf_drv_gpiote.h>
+#include <legacy/nrf_drv_gpiote.h>
#include <libraries/gpiote/app_gpiote.h>
-#include <sdk/modules/nrfx/hal/nrf_wdt.h>
+#include <hal/nrf_wdt.h>
#include <cstring>
#include <Components/Gfx/Gfx.h>
#include <drivers/St7789.h>
@@ -132,4 +132,4 @@ int main(void) {
for (;;) {
APP_ERROR_HANDLER(NRF_ERROR_FORBIDDEN);
}
-} \ No newline at end of file
+}