2020-01-18 19:52:33 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2019-11-17 19:47:04 +00:00
|
|
|
|
|
|
|
project(pinetime-app C CXX ASM)
|
|
|
|
|
2021-03-03 15:27:32 +00:00
|
|
|
|
2019-11-17 19:47:04 +00:00
|
|
|
# define some variables just for this example to determine file locations
|
|
|
|
set(NRF_PROJECT_NAME pinetime-app)
|
|
|
|
set(NRF_BOARD pca10040)
|
|
|
|
|
2020-05-24 14:36:04 +00:00
|
|
|
# check if all the necessary tools paths have been provided.
|
|
|
|
if (NOT NRF5_SDK_PATH)
|
2022-05-10 20:17:18 +00:00
|
|
|
message(FATAL_ERROR "The path to the nRF5 SDK (NRF5_SDK_PATH) must be set.")
|
2020-05-24 14:36:04 +00:00
|
|
|
endif ()
|
2020-10-02 18:43:30 +00:00
|
|
|
if (DEFINED ARM_NONE_EABI_TOOLCHAIN_PATH)
|
2022-05-10 20:17:18 +00:00
|
|
|
set(ARM_NONE_EABI_TOOLCHAIN_BIN_PATH ${ARM_NONE_EABI_TOOLCHAIN_PATH}/bin)
|
2020-10-02 18:43:30 +00:00
|
|
|
endif ()
|
2020-05-24 14:36:04 +00:00
|
|
|
|
|
|
|
if (NOT NRF_TARGET MATCHES "nrf52")
|
2022-05-10 20:17:18 +00:00
|
|
|
message(FATAL_ERROR "Only rRF52 boards are supported right now")
|
2020-10-02 18:43:30 +00:00
|
|
|
endif ()
|
2020-05-24 14:36:04 +00:00
|
|
|
|
|
|
|
# Setup toolchain
|
|
|
|
include(${CMAKE_SOURCE_DIR}/cmake-nRF5x/arm-gcc-toolchain.cmake)
|
|
|
|
|
2020-10-02 18:43:30 +00:00
|
|
|
if (NOT DEFINED ARM_GCC_TOOLCHAIN)
|
2022-05-10 20:17:18 +00:00
|
|
|
message(FATAL_ERROR "The toolchain must be set up before calling this macro")
|
2020-10-02 18:43:30 +00:00
|
|
|
endif ()
|
2020-05-24 14:36:04 +00:00
|
|
|
set(CMAKE_OSX_SYSROOT "/")
|
|
|
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "")
|
|
|
|
|
|
|
|
|
|
|
|
set(SDK_SOURCE_FILES
|
|
|
|
# Startup
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/mdk/system_nrf52.c"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/mdk/gcc_startup_nrf52.S"
|
|
|
|
|
|
|
|
# Base SDK
|
|
|
|
"${NRF5_SDK_PATH}/components/boards/boards.c"
|
|
|
|
"${NRF5_SDK_PATH}/integration/nrfx/legacy/nrf_drv_clock.c"
|
2021-01-16 03:11:53 +00:00
|
|
|
"${NRF5_SDK_PATH}/integration/nrfx/legacy/nrf_drv_clock.h"
|
2020-05-24 14:36:04 +00:00
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_clock.c"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_gpiote.c"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/soc/nrfx_atomic.c"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_saadc.c"
|
|
|
|
|
|
|
|
# FreeRTOS
|
|
|
|
${NRF5_SDK_PATH}/external/freertos/source/croutine.c
|
|
|
|
${NRF5_SDK_PATH}/external/freertos/source/event_groups.c
|
|
|
|
${NRF5_SDK_PATH}/external/freertos/source/list.c
|
|
|
|
${NRF5_SDK_PATH}/external/freertos/source/queue.c
|
|
|
|
${NRF5_SDK_PATH}/external/freertos/source/stream_buffer.c
|
|
|
|
${NRF5_SDK_PATH}/external/freertos/source/tasks.c
|
|
|
|
${NRF5_SDK_PATH}/external/freertos/source/timers.c
|
|
|
|
|
|
|
|
# Libs
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/atomic/nrf_atomic.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/balloc/nrf_balloc.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/util/nrf_assert.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/util/app_error.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/util/app_error_weak.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/util/app_error_handler_gcc.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/util/app_util_platform.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/log/src/nrf_log_backend_rtt.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/log/src/nrf_log_backend_serial.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/log/src/nrf_log_default_backends.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/log/src/nrf_log_frontend.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/log/src/nrf_log_str_formatter.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/memobj/nrf_memobj.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/ringbuf/nrf_ringbuf.c"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/strerror/nrf_strerror.c"
|
|
|
|
|
|
|
|
# Segger RTT
|
|
|
|
"${NRF5_SDK_PATH}/external/segger_rtt/SEGGER_RTT_Syscalls_GCC.c"
|
|
|
|
"${NRF5_SDK_PATH}/external/segger_rtt/SEGGER_RTT.c"
|
|
|
|
"${NRF5_SDK_PATH}/external/segger_rtt/SEGGER_RTT_printf.c"
|
|
|
|
|
|
|
|
# Other
|
|
|
|
"${NRF5_SDK_PATH}/external/utf_converter/utf.c"
|
|
|
|
"${NRF5_SDK_PATH}/external/fprintf/nrf_fprintf.c"
|
|
|
|
"${NRF5_SDK_PATH}/external/fprintf/nrf_fprintf_format.c"
|
|
|
|
|
|
|
|
# TWI
|
2021-04-08 18:07:24 +00:00
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_twim.c"
|
2020-05-24 14:36:04 +00:00
|
|
|
|
|
|
|
# GPIOTE
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/gpiote/app_gpiote.c"
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-02-08 17:01:02 +00:00
|
|
|
|
2020-04-19 18:44:59 +00:00
|
|
|
set(TINYCRYPT_SRC
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/mynewt-nimble/ext/tinycrypt/src/aes_encrypt.c
|
|
|
|
libs/mynewt-nimble/ext/tinycrypt/src/utils.c
|
2021-08-29 20:50:04 +00:00
|
|
|
libs/mynewt-nimble/ext/tinycrypt/src/cmac_mode.c
|
|
|
|
libs/mynewt-nimble/ext/tinycrypt/src/ecc.c
|
|
|
|
libs/mynewt-nimble/ext/tinycrypt/src/ecc_dh.c
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-04-19 18:44:59 +00:00
|
|
|
|
|
|
|
set(NIMBLE_SRC
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
|
|
|
|
libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_hci_evt.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig_cmd.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_l2cap.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_mbuf.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_sm.c
|
2021-08-29 20:50:04 +00:00
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_sm_cmd.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_sm_lgcy.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_sm_alg.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_sm_sc.c
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_gap.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_gatts.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_gattc.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_conn.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_att_svr.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_store.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_store_util.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_pvcy.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_hci.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_log.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_hci_util.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_hci_cmd.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_cfg.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_uuid.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_id.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_misc.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_att.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_att_clt.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_att_svr.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_att_cmd.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_atomic.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_adv.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_flow.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_mqueue.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_stop.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_hs_startup.c
|
|
|
|
libs/mynewt-nimble/nimble/host/store/ram/src/ble_store_ram.c
|
|
|
|
libs/mynewt-nimble/nimble/host/src/ble_monitor.c
|
|
|
|
libs/mynewt-nimble/nimble/transport/ram/src/ble_hci_ram.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_rand.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_conn.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_ctrl.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_hci.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_hci.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_utils.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_scan.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_whitelist.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_adv.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_sched.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_supp_cmd.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_hci_ev.c
|
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_rfmgmt.c
|
2021-10-30 18:02:39 +00:00
|
|
|
libs/mynewt-nimble/nimble/controller/src/ble_ll_resolv.c
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/mynewt-nimble/porting/nimble/src/os_cputime.c
|
|
|
|
libs/mynewt-nimble/porting/nimble/src/os_cputime_pwr2.c
|
|
|
|
libs/mynewt-nimble/porting/nimble/src/os_mbuf.c
|
|
|
|
libs/mynewt-nimble/porting/nimble/src/os_mempool.c
|
|
|
|
libs/mynewt-nimble/porting/nimble/src/hal_timer.c
|
|
|
|
libs/mynewt-nimble/porting/nimble/src/mem.c
|
|
|
|
libs/mynewt-nimble/porting/nimble/src/endian.c
|
|
|
|
libs/mynewt-nimble/porting/nimble/src/os_msys_init.c
|
|
|
|
libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_hw.c
|
|
|
|
libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c
|
|
|
|
libs/mynewt-nimble/nimble/host/services/gap/src/ble_svc_gap.c
|
|
|
|
libs/mynewt-nimble/nimble/host/services/gatt/src/ble_svc_gatt.c
|
|
|
|
libs/mynewt-nimble/nimble/host/util/src/addr.c
|
|
|
|
)
|
2020-04-19 18:44:59 +00:00
|
|
|
|
2021-07-11 13:06:06 +00:00
|
|
|
set(LITTLEFS_SRC
|
|
|
|
libs/littlefs/lfs_util.h
|
|
|
|
libs/littlefs/lfs.h
|
|
|
|
libs/littlefs/lfs_util.c
|
|
|
|
libs/littlefs/lfs.c
|
|
|
|
)
|
|
|
|
|
2020-02-08 17:01:02 +00:00
|
|
|
set(LVGL_SRC
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lv_conf.h
|
|
|
|
libs/lvgl/lvgl.h
|
2021-01-28 17:13:28 +00:00
|
|
|
|
|
|
|
libs/lvgl/src/lvgl.h
|
|
|
|
libs/lvgl/src/lv_api_map.h
|
|
|
|
libs/lvgl/src/lv_conf_internal.h
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_core/lv_disp.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_core/lv_group.h
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_core/lv_indev.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_core/lv_obj.h
|
|
|
|
libs/lvgl/src/lv_core/lv_obj_style_dec.h
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_core/lv_refr.h
|
|
|
|
libs/lvgl/src/lv_core/lv_style.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_draw.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_arc.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_blend.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_img.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_label.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_line.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_mask.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_rect.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_triangle.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_img_buf.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_img_cache.h
|
|
|
|
libs/lvgl/src/lv_draw/lv_img_decoder.h
|
|
|
|
libs/lvgl/src/lv_font/lv_font.h
|
|
|
|
libs/lvgl/src/lv_font/lv_font_fmt_txt.h
|
|
|
|
libs/lvgl/src/lv_font/lv_font_loader.h
|
|
|
|
libs/lvgl/src/lv_font/lv_symbol_def.h
|
|
|
|
libs/lvgl/src/lv_hal/lv_hal.h
|
|
|
|
libs/lvgl/src/lv_hal/lv_hal_disp.h
|
|
|
|
libs/lvgl/src/lv_hal/lv_hal_indev.h
|
|
|
|
libs/lvgl/src/lv_hal/lv_hal_tick.h
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_anim.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_area.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_async.h
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_bidi.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_color.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_debug.h
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_fs.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_gc.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_ll.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_log.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_math.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_mem.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_printf.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_task.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_templ.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_txt.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_txt_ap.h
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_types.h
|
|
|
|
libs/lvgl/src/lv_misc/lv_utils.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_themes/lv_theme.h
|
|
|
|
libs/lvgl/src/lv_themes/lv_theme_empty.h
|
|
|
|
libs/lvgl/src/lv_themes/lv_theme_material.h
|
|
|
|
#libs/lvgl/src/lv_themes/lv_theme_mono.h
|
|
|
|
#libs/lvgl/src/lv_themes/lv_theme_template.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_arc.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_bar.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_btn.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_btnmatrix.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_calendar.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_canvas.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_chart.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_checkbox.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_cont.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_cpicker.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_dropdown.h
|
2021-06-29 18:20:27 +00:00
|
|
|
libs/lvgl/src/lv_widgets/lv_gauge.h
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_widgets/lv_img.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_imgbtn.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_keyboard.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_label.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_led.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_line.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_linemeter.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_list.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_msgbox.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_objmask.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_objx_templ.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_page.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_roller.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_slider.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_spinbox.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_spinner.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_switch.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_table.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_tabview.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_textarea.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_tileview.h
|
|
|
|
libs/lvgl/src/lv_widgets/lv_win.h
|
|
|
|
libs/lvgl/src/lv_core/lv_disp.c
|
|
|
|
libs/lvgl/src/lv_core/lv_group.c
|
|
|
|
libs/lvgl/src/lv_core/lv_indev.c
|
|
|
|
libs/lvgl/src/lv_core/lv_obj.c
|
|
|
|
libs/lvgl/src/lv_core/lv_refr.c
|
|
|
|
libs/lvgl/src/lv_core/lv_style.c
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_draw_arc.c
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_draw_blend.c
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_draw_img.c
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_label.c
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_line.c
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_draw_mask.c
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_draw_rect.c
|
|
|
|
libs/lvgl/src/lv_draw/lv_draw_triangle.c
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_img_buf.c
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_draw/lv_img_cache.c
|
|
|
|
libs/lvgl/src/lv_draw/lv_img_decoder.c
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_font/lv_font.c
|
|
|
|
#libs/lvgl/src/lv_font/lv_font_dejavu_16_persian_hebrew.c
|
|
|
|
libs/lvgl/src/lv_font/lv_font_fmt_txt.c
|
|
|
|
libs/lvgl/src/lv_font/lv_font_loader.c
|
|
|
|
# LVGL Fonts
|
|
|
|
libs/lvgl/src/lv_font/lv_font_montserrat_14.c
|
|
|
|
libs/lvgl/src/lv_font/lv_font_montserrat_18.c
|
|
|
|
libs/lvgl/src/lv_font/lv_font_montserrat_22.c
|
|
|
|
libs/lvgl/src/lv_font/lv_font_montserrat_28.c
|
|
|
|
#
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_hal/lv_hal_disp.c
|
|
|
|
libs/lvgl/src/lv_hal/lv_hal_indev.c
|
|
|
|
libs/lvgl/src/lv_hal/lv_hal_tick.c
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_misc/lv_anim.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_area.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_async.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_bidi.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_color.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_debug.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_fs.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_gc.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_ll.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_log.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_math.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_mem.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_printf.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_task.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_templ.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_txt.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_txt_ap.c
|
|
|
|
libs/lvgl/src/lv_misc/lv_utils.c
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/lvgl/src/lv_themes/lv_theme.c
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_themes/lv_theme_empty.c
|
|
|
|
libs/lvgl/src/lv_themes/lv_theme_material.c
|
|
|
|
#libs/lvgl/src/lv_themes/lv_theme_mono.c
|
|
|
|
#libs/lvgl/src/lv_themes/lv_theme_template.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_arc.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_bar.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_btn.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_btnmatrix.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_calendar.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_canvas.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_chart.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_checkbox.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_cont.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_cpicker.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_dropdown.c
|
2021-06-29 18:20:27 +00:00
|
|
|
libs/lvgl/src/lv_widgets/lv_gauge.c
|
2021-01-28 17:13:28 +00:00
|
|
|
libs/lvgl/src/lv_widgets/lv_img.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_imgbtn.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_keyboard.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_label.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_led.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_line.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_linemeter.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_list.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_msgbox.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_objmask.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_objx_templ.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_page.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_roller.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_slider.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_spinbox.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_spinner.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_switch.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_table.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_tabview.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_textarea.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_tileview.c
|
|
|
|
libs/lvgl/src/lv_widgets/lv_win.c
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2019-11-17 19:47:04 +00:00
|
|
|
|
2020-03-14 15:33:47 +00:00
|
|
|
list(APPEND IMAGE_FILES
|
2022-04-07 14:28:04 +00:00
|
|
|
displayapp/icons/battery/batteryicon.c
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2019-11-17 19:47:04 +00:00
|
|
|
list(APPEND SOURCE_FILES
|
2023-03-26 12:49:03 +00:00
|
|
|
stdlib.c
|
2023-03-26 12:21:35 +00:00
|
|
|
FreeRTOS/heap_4_infinitime.c
|
2020-10-27 18:38:45 +00:00
|
|
|
BootloaderVersion.cpp
|
2020-10-02 18:45:51 +00:00
|
|
|
logging/NrfLogger.cpp
|
2020-10-02 18:46:41 +00:00
|
|
|
displayapp/DisplayApp.cpp
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/Screen.cpp
|
|
|
|
displayapp/screens/Tile.cpp
|
|
|
|
displayapp/screens/InfiniPaint.cpp
|
2020-12-03 14:16:36 +00:00
|
|
|
displayapp/screens/Paddle.cpp
|
2021-03-11 09:54:14 +00:00
|
|
|
displayapp/screens/StopWatch.cpp
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/BatteryIcon.cpp
|
|
|
|
displayapp/screens/BleIcon.cpp
|
2020-10-20 18:57:39 +00:00
|
|
|
displayapp/screens/NotificationIcon.cpp
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/SystemInfo.cpp
|
|
|
|
displayapp/screens/Label.cpp
|
|
|
|
displayapp/screens/FirmwareUpdate.cpp
|
|
|
|
displayapp/screens/Music.cpp
|
2021-01-20 20:34:09 +00:00
|
|
|
displayapp/screens/Navigation.cpp
|
2021-06-12 13:06:58 +00:00
|
|
|
displayapp/screens/Metronome.cpp
|
2021-04-09 19:16:21 +00:00
|
|
|
displayapp/screens/Motion.cpp
|
2024-01-31 22:41:39 +00:00
|
|
|
displayapp/screens/Weather.cpp
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/FirmwareValidation.cpp
|
|
|
|
displayapp/screens/ApplicationList.cpp
|
2020-10-18 15:35:36 +00:00
|
|
|
displayapp/screens/Notifications.cpp
|
2021-01-02 20:08:12 +00:00
|
|
|
displayapp/screens/Twos.cpp
|
2021-01-10 16:57:26 +00:00
|
|
|
displayapp/screens/HeartRate.cpp
|
2021-04-04 02:08:51 +00:00
|
|
|
displayapp/screens/FlashLight.cpp
|
|
|
|
displayapp/screens/List.cpp
|
2022-03-05 00:12:44 +00:00
|
|
|
displayapp/screens/CheckboxList.cpp
|
2021-04-04 02:08:51 +00:00
|
|
|
displayapp/screens/BatteryInfo.cpp
|
2021-04-19 14:28:38 +00:00
|
|
|
displayapp/screens/Steps.cpp
|
2021-05-20 18:43:54 +00:00
|
|
|
displayapp/screens/Timer.cpp
|
2024-01-23 08:45:52 +00:00
|
|
|
displayapp/screens/Dice.cpp
|
2021-10-30 18:02:39 +00:00
|
|
|
displayapp/screens/PassKey.cpp
|
2021-08-18 12:23:30 +00:00
|
|
|
displayapp/screens/Error.cpp
|
2021-09-10 22:40:13 +00:00
|
|
|
displayapp/screens/Alarm.cpp
|
2021-09-22 23:53:10 +00:00
|
|
|
displayapp/screens/Styles.cpp
|
2024-01-13 13:05:04 +00:00
|
|
|
displayapp/screens/WeatherSymbols.cpp
|
2021-08-28 19:02:11 +00:00
|
|
|
displayapp/Colors.cpp
|
2022-04-21 14:17:49 +00:00
|
|
|
displayapp/widgets/Counter.cpp
|
2022-07-05 05:41:09 +00:00
|
|
|
displayapp/widgets/PageIndicator.cpp
|
2023-01-14 19:50:21 +00:00
|
|
|
displayapp/widgets/DotIndicator.cpp
|
2022-07-21 16:27:52 +00:00
|
|
|
displayapp/widgets/StatusIcons.cpp
|
2021-04-04 02:08:51 +00:00
|
|
|
|
|
|
|
## Settings
|
|
|
|
displayapp/screens/settings/QuickSettings.cpp
|
|
|
|
displayapp/screens/settings/Settings.cpp
|
|
|
|
displayapp/screens/settings/SettingWatchFace.cpp
|
|
|
|
displayapp/screens/settings/SettingTimeFormat.cpp
|
2023-07-15 00:23:10 +00:00
|
|
|
displayapp/screens/settings/SettingWeatherFormat.cpp
|
2021-04-04 02:08:51 +00:00
|
|
|
displayapp/screens/settings/SettingWakeUp.cpp
|
|
|
|
displayapp/screens/settings/SettingDisplay.cpp
|
2021-04-19 14:28:38 +00:00
|
|
|
displayapp/screens/settings/SettingSteps.cpp
|
2023-01-14 19:50:21 +00:00
|
|
|
displayapp/screens/settings/SettingSetDateTime.cpp
|
2021-07-09 12:14:17 +00:00
|
|
|
displayapp/screens/settings/SettingSetDate.cpp
|
|
|
|
displayapp/screens/settings/SettingSetTime.cpp
|
2021-11-07 10:50:33 +00:00
|
|
|
displayapp/screens/settings/SettingChimes.cpp
|
2021-09-27 02:52:02 +00:00
|
|
|
displayapp/screens/settings/SettingShakeThreshold.cpp
|
2022-04-02 13:03:20 +00:00
|
|
|
displayapp/screens/settings/SettingBluetooth.cpp
|
2021-02-24 19:40:24 +00:00
|
|
|
|
|
|
|
## Watch faces
|
|
|
|
displayapp/screens/WatchFaceAnalog.cpp
|
|
|
|
displayapp/screens/WatchFaceDigital.cpp
|
2022-02-26 19:43:33 +00:00
|
|
|
displayapp/screens/WatchFaceInfineat.cpp
|
2022-02-20 12:20:43 +00:00
|
|
|
displayapp/screens/WatchFaceTerminal.cpp
|
2022-03-12 16:55:54 +00:00
|
|
|
displayapp/screens/WatchFacePineTimeStyle.cpp
|
2022-05-09 15:45:53 +00:00
|
|
|
displayapp/screens/WatchFaceCasioStyleG7710.cpp
|
2021-02-24 19:40:24 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
|
2020-10-02 18:43:30 +00:00
|
|
|
main.cpp
|
|
|
|
drivers/St7789.cpp
|
|
|
|
drivers/SpiNorFlash.cpp
|
|
|
|
drivers/SpiMaster.cpp
|
|
|
|
drivers/Spi.cpp
|
|
|
|
drivers/Watchdog.cpp
|
|
|
|
drivers/InternalFlash.cpp
|
2021-01-10 16:57:26 +00:00
|
|
|
drivers/Hrs3300.cpp
|
2021-03-31 17:47:27 +00:00
|
|
|
drivers/Bma421.cpp
|
|
|
|
drivers/Bma421_C/bma4.c
|
|
|
|
drivers/Bma421_C/bma423.c
|
2020-10-02 19:16:48 +00:00
|
|
|
components/battery/BatteryController.cpp
|
|
|
|
components/ble/BleController.cpp
|
|
|
|
components/ble/NotificationManager.cpp
|
|
|
|
components/datetime/DateTimeController.cpp
|
|
|
|
components/brightness/BrightnessController.cpp
|
2021-03-31 17:47:27 +00:00
|
|
|
components/motion/MotionController.cpp
|
2020-10-02 19:16:48 +00:00
|
|
|
components/ble/NimbleController.cpp
|
|
|
|
components/ble/DeviceInformationService.cpp
|
|
|
|
components/ble/CurrentTimeClient.cpp
|
|
|
|
components/ble/AlertNotificationClient.cpp
|
|
|
|
components/ble/DfuService.cpp
|
|
|
|
components/ble/CurrentTimeService.cpp
|
|
|
|
components/ble/AlertNotificationService.cpp
|
|
|
|
components/ble/MusicService.cpp
|
2023-12-09 19:39:08 +00:00
|
|
|
components/ble/SimpleWeatherService.cpp
|
2021-01-20 20:34:09 +00:00
|
|
|
components/ble/NavigationService.cpp
|
2020-10-02 19:16:48 +00:00
|
|
|
components/ble/BatteryInformationService.cpp
|
2021-10-17 01:09:26 +00:00
|
|
|
components/ble/FSService.cpp
|
2020-10-02 19:16:48 +00:00
|
|
|
components/ble/ImmediateAlertService.cpp
|
2020-10-29 15:06:01 +00:00
|
|
|
components/ble/ServiceDiscovery.cpp
|
2021-01-17 15:34:14 +00:00
|
|
|
components/ble/HeartRateService.cpp
|
2021-10-17 06:23:44 +00:00
|
|
|
components/ble/MotionService.cpp
|
2020-10-02 19:16:48 +00:00
|
|
|
components/firmwarevalidator/FirmwareValidator.cpp
|
2021-01-16 03:46:03 +00:00
|
|
|
components/motor/MotorController.cpp
|
2021-02-24 19:40:24 +00:00
|
|
|
components/settings/Settings.cpp
|
2023-04-11 09:18:49 +00:00
|
|
|
components/timer/Timer.cpp
|
2021-09-10 22:40:13 +00:00
|
|
|
components/alarm/AlarmController.cpp
|
2021-07-11 13:06:06 +00:00
|
|
|
components/fs/FS.cpp
|
2020-10-02 18:43:30 +00:00
|
|
|
drivers/Cst816s.cpp
|
|
|
|
FreeRTOS/port.c
|
|
|
|
FreeRTOS/port_cmsis_systick.c
|
|
|
|
FreeRTOS/port_cmsis.c
|
|
|
|
|
2020-10-02 18:46:41 +00:00
|
|
|
displayapp/LittleVgl.cpp
|
2022-08-16 05:21:23 +00:00
|
|
|
displayapp/InfiniTimeTheme.cpp
|
2020-10-02 18:43:30 +00:00
|
|
|
|
2020-10-02 18:45:21 +00:00
|
|
|
systemtask/SystemTask.cpp
|
2022-01-27 22:10:59 +00:00
|
|
|
systemtask/SystemMonitor.cpp
|
2020-10-02 18:43:30 +00:00
|
|
|
drivers/TwiMaster.cpp
|
2021-01-10 16:57:26 +00:00
|
|
|
|
|
|
|
heartratetask/HeartRateTask.cpp
|
|
|
|
components/heartrate/HeartRateController.cpp
|
2023-04-30 13:50:18 +00:00
|
|
|
components/heartrate/Ppg.cpp
|
2021-07-15 11:11:27 +00:00
|
|
|
|
2021-10-25 09:53:14 +00:00
|
|
|
buttonhandler/ButtonHandler.cpp
|
2021-07-15 11:11:27 +00:00
|
|
|
touchhandler/TouchHandler.cpp
|
2023-06-25 13:59:34 +00:00
|
|
|
|
|
|
|
utility/Math.cpp
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2019-11-17 19:47:04 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
list(APPEND RECOVERY_SOURCE_FILES
|
2023-03-26 12:49:03 +00:00
|
|
|
stdlib.c
|
2023-03-26 12:21:35 +00:00
|
|
|
FreeRTOS/heap_4_infinitime.c
|
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
BootloaderVersion.cpp
|
|
|
|
logging/NrfLogger.cpp
|
|
|
|
displayapp/DisplayAppRecovery.cpp
|
|
|
|
|
|
|
|
main.cpp
|
|
|
|
drivers/St7789.cpp
|
|
|
|
drivers/SpiNorFlash.cpp
|
|
|
|
drivers/SpiMaster.cpp
|
|
|
|
drivers/Spi.cpp
|
|
|
|
drivers/Watchdog.cpp
|
|
|
|
drivers/InternalFlash.cpp
|
|
|
|
drivers/Hrs3300.cpp
|
2021-03-31 17:47:27 +00:00
|
|
|
drivers/Bma421.cpp
|
|
|
|
drivers/Bma421_C/bma4.c
|
|
|
|
drivers/Bma421_C/bma423.c
|
2021-01-26 19:31:45 +00:00
|
|
|
components/battery/BatteryController.cpp
|
|
|
|
components/ble/BleController.cpp
|
|
|
|
components/ble/NotificationManager.cpp
|
|
|
|
components/datetime/DateTimeController.cpp
|
|
|
|
components/brightness/BrightnessController.cpp
|
2021-03-31 17:47:27 +00:00
|
|
|
components/motion/MotionController.cpp
|
2021-01-26 19:31:45 +00:00
|
|
|
components/ble/NimbleController.cpp
|
|
|
|
components/ble/DeviceInformationService.cpp
|
|
|
|
components/ble/CurrentTimeClient.cpp
|
|
|
|
components/ble/AlertNotificationClient.cpp
|
|
|
|
components/ble/DfuService.cpp
|
|
|
|
components/ble/CurrentTimeService.cpp
|
|
|
|
components/ble/AlertNotificationService.cpp
|
|
|
|
components/ble/MusicService.cpp
|
2023-12-09 19:39:08 +00:00
|
|
|
components/ble/SimpleWeatherService.cpp
|
2021-01-26 19:31:45 +00:00
|
|
|
components/ble/BatteryInformationService.cpp
|
2021-10-17 01:09:26 +00:00
|
|
|
components/ble/FSService.cpp
|
2021-01-26 19:31:45 +00:00
|
|
|
components/ble/ImmediateAlertService.cpp
|
|
|
|
components/ble/ServiceDiscovery.cpp
|
|
|
|
components/ble/NavigationService.cpp
|
|
|
|
components/ble/HeartRateService.cpp
|
2021-10-17 06:23:44 +00:00
|
|
|
components/ble/MotionService.cpp
|
2021-01-26 19:31:45 +00:00
|
|
|
components/firmwarevalidator/FirmwareValidator.cpp
|
2021-03-20 10:41:49 +00:00
|
|
|
components/settings/Settings.cpp
|
2023-04-11 09:18:49 +00:00
|
|
|
components/timer/Timer.cpp
|
2021-09-10 22:40:13 +00:00
|
|
|
components/alarm/AlarmController.cpp
|
2021-01-26 19:31:45 +00:00
|
|
|
drivers/Cst816s.cpp
|
|
|
|
FreeRTOS/port.c
|
|
|
|
FreeRTOS/port_cmsis_systick.c
|
|
|
|
FreeRTOS/port_cmsis.c
|
|
|
|
|
|
|
|
systemtask/SystemTask.cpp
|
2022-01-27 22:10:59 +00:00
|
|
|
systemtask/SystemMonitor.cpp
|
2021-01-26 19:31:45 +00:00
|
|
|
drivers/TwiMaster.cpp
|
|
|
|
components/rle/RleDecoder.cpp
|
|
|
|
components/heartrate/HeartRateController.cpp
|
|
|
|
heartratetask/HeartRateTask.cpp
|
|
|
|
components/heartrate/Ppg.cpp
|
2023-04-30 13:50:18 +00:00
|
|
|
|
2021-03-07 07:44:14 +00:00
|
|
|
components/motor/MotorController.cpp
|
2021-07-11 13:06:06 +00:00
|
|
|
components/fs/FS.cpp
|
2021-10-25 09:53:14 +00:00
|
|
|
buttonhandler/ButtonHandler.cpp
|
2021-07-15 11:11:27 +00:00
|
|
|
touchhandler/TouchHandler.cpp
|
2023-06-25 13:59:34 +00:00
|
|
|
|
|
|
|
utility/Math.cpp
|
2021-01-26 19:31:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND RECOVERYLOADER_SOURCE_FILES
|
2023-03-26 12:49:03 +00:00
|
|
|
stdlib.c
|
2023-03-26 12:21:35 +00:00
|
|
|
FreeRTOS/heap_4_infinitime.c
|
|
|
|
|
2020-10-02 18:43:30 +00:00
|
|
|
# FreeRTOS
|
|
|
|
FreeRTOS/port.c
|
|
|
|
FreeRTOS/port_cmsis_systick.c
|
|
|
|
FreeRTOS/port_cmsis.c
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2020-10-02 18:43:30 +00:00
|
|
|
drivers/SpiNorFlash.cpp
|
|
|
|
drivers/SpiMaster.cpp
|
|
|
|
drivers/Spi.cpp
|
2020-10-02 18:45:51 +00:00
|
|
|
logging/NrfLogger.cpp
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
components/rle/RleDecoder.cpp
|
|
|
|
|
2020-10-02 18:43:30 +00:00
|
|
|
drivers/St7789.cpp
|
2020-10-02 19:16:48 +00:00
|
|
|
components/brightness/BrightnessController.cpp
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
recoveryLoader.cpp
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
|
2019-11-17 19:47:04 +00:00
|
|
|
set(INCLUDE_FILES
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2022-01-17 20:25:16 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/src/Version.h
|
2020-10-27 18:38:45 +00:00
|
|
|
BootloaderVersion.h
|
2020-10-02 18:45:51 +00:00
|
|
|
logging/Logger.h
|
|
|
|
logging/NrfLogger.h
|
2020-10-02 18:46:41 +00:00
|
|
|
displayapp/DisplayApp.h
|
2021-01-26 19:31:45 +00:00
|
|
|
displayapp/Messages.h
|
2020-10-02 18:46:41 +00:00
|
|
|
displayapp/TouchEvents.h
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/Screen.h
|
|
|
|
displayapp/screens/Tile.h
|
|
|
|
displayapp/screens/InfiniPaint.h
|
2021-03-11 09:54:14 +00:00
|
|
|
displayapp/screens/StopWatch.h
|
2020-12-03 14:16:36 +00:00
|
|
|
displayapp/screens/Paddle.h
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/BatteryIcon.h
|
2020-10-20 18:57:39 +00:00
|
|
|
displayapp/screens/BleIcon.h
|
|
|
|
displayapp/screens/NotificationIcon.h
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/SystemInfo.h
|
|
|
|
displayapp/screens/ScreenList.h
|
|
|
|
displayapp/screens/Label.h
|
|
|
|
displayapp/screens/FirmwareUpdate.h
|
|
|
|
displayapp/screens/FirmwareValidation.h
|
|
|
|
displayapp/screens/ApplicationList.h
|
2022-03-05 00:12:44 +00:00
|
|
|
displayapp/screens/CheckboxList.h
|
2020-10-02 18:46:41 +00:00
|
|
|
displayapp/Apps.h
|
2020-10-20 18:57:39 +00:00
|
|
|
displayapp/screens/Notifications.h
|
2021-01-10 16:57:26 +00:00
|
|
|
displayapp/screens/HeartRate.h
|
2021-06-12 13:06:58 +00:00
|
|
|
displayapp/screens/Metronome.h
|
2021-03-31 17:47:27 +00:00
|
|
|
displayapp/screens/Motion.h
|
2021-05-20 18:43:54 +00:00
|
|
|
displayapp/screens/Timer.h
|
2024-01-23 08:45:52 +00:00
|
|
|
displayapp/screens/Dice.h
|
2021-09-10 22:40:13 +00:00
|
|
|
displayapp/screens/Alarm.h
|
2021-08-28 19:02:11 +00:00
|
|
|
displayapp/Colors.h
|
2022-04-21 14:17:49 +00:00
|
|
|
displayapp/widgets/Counter.h
|
2022-07-05 05:41:09 +00:00
|
|
|
displayapp/widgets/PageIndicator.h
|
2023-01-14 19:50:21 +00:00
|
|
|
displayapp/widgets/DotIndicator.h
|
2022-07-21 16:27:52 +00:00
|
|
|
displayapp/widgets/StatusIcons.h
|
2020-10-02 18:43:30 +00:00
|
|
|
drivers/St7789.h
|
|
|
|
drivers/SpiNorFlash.h
|
|
|
|
drivers/SpiMaster.h
|
|
|
|
drivers/Spi.h
|
|
|
|
drivers/Watchdog.h
|
|
|
|
drivers/InternalFlash.h
|
2021-01-10 16:57:26 +00:00
|
|
|
drivers/Hrs3300.h
|
2021-08-02 19:37:48 +00:00
|
|
|
drivers/PinMap.h
|
2021-03-31 17:47:27 +00:00
|
|
|
drivers/Bma421.h
|
|
|
|
drivers/Bma421_C/bma4.c
|
|
|
|
drivers/Bma421_C/bma423.c
|
2020-10-02 19:16:48 +00:00
|
|
|
components/battery/BatteryController.h
|
|
|
|
components/ble/BleController.h
|
|
|
|
components/ble/NotificationManager.h
|
|
|
|
components/datetime/DateTimeController.h
|
|
|
|
components/brightness/BrightnessController.h
|
2021-03-31 17:47:27 +00:00
|
|
|
components/motion/MotionController.h
|
2021-06-09 21:45:39 +00:00
|
|
|
components/firmwarevalidator/FirmwareValidator.h
|
|
|
|
components/ble/BleController.h
|
|
|
|
components/ble/NotificationManager.h
|
2020-10-02 19:16:48 +00:00
|
|
|
components/ble/NimbleController.h
|
|
|
|
components/ble/DeviceInformationService.h
|
|
|
|
components/ble/CurrentTimeClient.h
|
|
|
|
components/ble/AlertNotificationClient.h
|
|
|
|
components/ble/DfuService.h
|
|
|
|
components/firmwarevalidator/FirmwareValidator.h
|
|
|
|
components/ble/BatteryInformationService.h
|
2021-10-17 01:09:26 +00:00
|
|
|
components/ble/FSService.h
|
2020-10-02 19:16:48 +00:00
|
|
|
components/ble/ImmediateAlertService.h
|
2020-10-29 15:06:01 +00:00
|
|
|
components/ble/ServiceDiscovery.h
|
|
|
|
components/ble/BleClient.h
|
2021-02-24 19:40:24 +00:00
|
|
|
components/ble/HeartRateService.h
|
2021-10-17 06:23:44 +00:00
|
|
|
components/ble/MotionService.h
|
2023-12-09 19:39:08 +00:00
|
|
|
components/ble/SimpleWeatherService.h
|
2021-02-24 19:40:24 +00:00
|
|
|
components/settings/Settings.h
|
2023-04-11 09:18:49 +00:00
|
|
|
components/timer/Timer.h
|
2021-09-10 22:40:13 +00:00
|
|
|
components/alarm/AlarmController.h
|
2020-10-02 18:43:30 +00:00
|
|
|
drivers/Cst816s.h
|
|
|
|
FreeRTOS/portmacro.h
|
|
|
|
FreeRTOS/portmacro_cmsis.h
|
2020-10-02 18:46:41 +00:00
|
|
|
displayapp/LittleVgl.h
|
2022-08-16 05:21:23 +00:00
|
|
|
displayapp/InfiniTimeTheme.h
|
2020-10-02 18:45:21 +00:00
|
|
|
systemtask/SystemTask.h
|
|
|
|
systemtask/SystemMonitor.h
|
2020-10-02 18:49:55 +00:00
|
|
|
displayapp/screens/Symbols.h
|
2020-10-02 18:43:30 +00:00
|
|
|
drivers/TwiMaster.h
|
2021-01-10 16:57:26 +00:00
|
|
|
heartratetask/HeartRateTask.h
|
|
|
|
components/heartrate/Ppg.h
|
|
|
|
components/heartrate/HeartRateController.h
|
2023-05-28 01:03:49 +00:00
|
|
|
libs/arduinoFFT/src/arduinoFFT.h
|
|
|
|
libs/arduinoFFT/src/defs.h
|
|
|
|
libs/arduinoFFT/src/types.h
|
2021-01-23 21:12:06 +00:00
|
|
|
components/motor/MotorController.h
|
2021-10-25 09:53:14 +00:00
|
|
|
buttonhandler/ButtonHandler.h
|
2021-07-15 11:11:27 +00:00
|
|
|
touchhandler/TouchHandler.h
|
2023-06-25 13:59:34 +00:00
|
|
|
utility/Math.h
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-01-05 10:09:07 +00:00
|
|
|
|
|
|
|
include_directories(
|
2022-01-17 20:25:16 +00:00
|
|
|
${CMAKE_BINARY_DIR}/src # include generated files like Version.h
|
2020-10-02 18:43:30 +00:00
|
|
|
.
|
|
|
|
../
|
2022-12-30 21:31:31 +00:00
|
|
|
)
|
|
|
|
include_directories(SYSTEM
|
2020-10-02 18:43:30 +00:00
|
|
|
libs/
|
|
|
|
FreeRTOS/
|
|
|
|
libs/mynewt-nimble/porting/npl/freertos/include
|
|
|
|
libs/mynewt-nimble/nimble/include
|
|
|
|
libs/mynewt-nimble/porting/nimble/include
|
|
|
|
libs/mynewt-nimble/nimble/host/include
|
|
|
|
libs/mynewt-nimble/nimble/controller/include
|
|
|
|
libs/mynewt-nimble/nimble/transport/ram/include
|
|
|
|
libs/mynewt-nimble/nimble/drivers/nrf52/include
|
|
|
|
libs/mynewt-nimble/ext/tinycrypt/include
|
|
|
|
libs/mynewt-nimble/nimble/host/services/gap/include
|
|
|
|
libs/mynewt-nimble/nimble/host/services/gatt/include
|
|
|
|
libs/mynewt-nimble/nimble/host/util/include
|
|
|
|
libs/mynewt-nimble/nimble/host/store/ram/include
|
|
|
|
|
|
|
|
"${NRF5_SDK_PATH}/components/drivers_nrf/nrf_soc_nosd"
|
2020-05-24 14:36:04 +00:00
|
|
|
"${NRF5_SDK_PATH}/components"
|
|
|
|
"${NRF5_SDK_PATH}/components/boards"
|
|
|
|
"${NRF5_SDK_PATH}/components/softdevice/common"
|
|
|
|
"${NRF5_SDK_PATH}/integration/nrfx"
|
|
|
|
"${NRF5_SDK_PATH}/integration/nrfx/legacy"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/drivers/include"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/hal"
|
|
|
|
"${NRF5_SDK_PATH}/modules/nrfx/mdk"
|
2021-01-30 17:11:07 +00:00
|
|
|
"${NRF5_SDK_PATH}/external/freertos/source/include"
|
2020-05-24 14:36:04 +00:00
|
|
|
"${NRF5_SDK_PATH}/components/toolchain/cmsis/include"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/atomic"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/atomic_fifo"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/atomic_flags"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/balloc"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/bootloader/ble_dfu"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/cli"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/crc16"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/crc32"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/crypto"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/csense"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/csense_drv"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/delay"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/ecc"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/experimental_section_vars"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/experimental_task_manager"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/fds"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/fstorage"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/gfx"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/gpiote"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/hardfault"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/hci"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/led_softblink"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/log"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/log/src"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/low_power_pwm"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/mem_manager"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/memobj"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/mpu"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/mutex"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/pwm"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/pwr_mgmt"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/queue"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/ringbuf"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/scheduler"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/sdcard"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/slip"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/sortlist"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/spi_mngr"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/stack_guard"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/strerror"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/svc"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/timer"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/audio"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/cdc"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/cdc/acm"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/hid"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/hid/generic"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/hid/kbd"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/hid/mouse"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/usbd/class/msc"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/util"
|
|
|
|
"${NRF5_SDK_PATH}/external/segger_rtt/"
|
|
|
|
"${NRF5_SDK_PATH}/external/fprintf/"
|
|
|
|
"${NRF5_SDK_PATH}/external/thedotfactory_fonts"
|
|
|
|
"${NRF5_SDK_PATH}/components/libraries/gpiote"
|
|
|
|
|
2019-11-17 19:47:04 +00:00
|
|
|
)
|
|
|
|
|
2020-01-12 15:26:20 +00:00
|
|
|
link_directories(
|
2020-10-02 18:43:30 +00:00
|
|
|
../
|
2020-01-12 15:26:20 +00:00
|
|
|
)
|
|
|
|
|
2020-05-24 14:36:04 +00:00
|
|
|
|
2021-07-17 16:09:38 +00:00
|
|
|
set(COMMON_FLAGS -MP -MD -mthumb -mabi=aapcs -ftree-vrp -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fstack-usage -fno-exceptions -fno-non-call-exceptions)
|
2023-01-24 08:57:22 +00:00
|
|
|
set(WARNING_FLAGS -Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-nonliteral -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-expansion-to-defined -Wreturn-type -Werror=return-type -Werror)
|
2021-07-17 16:09:38 +00:00
|
|
|
set(DEBUG_FLAGS -Og -g3)
|
|
|
|
set(RELEASE_FLAGS -Os)
|
|
|
|
set(CXX_FLAGS -fno-rtti)
|
|
|
|
set(ASM_FLAGS -x assembler-with-cpp)
|
2020-05-24 14:36:04 +00:00
|
|
|
add_definitions(-DCONFIG_GPIO_AS_PINRESET)
|
|
|
|
add_definitions(-DNIMBLE_CFG_CONTROLLER)
|
|
|
|
add_definitions(-DOS_CPUTIME_FREQ)
|
|
|
|
add_definitions(-DNRF52 -DNRF52832 -DNRF52832_XXAA -DNRF52_PAN_74 -DNRF52_PAN_64 -DNRF52_PAN_12 -DNRF52_PAN_58 -DNRF52_PAN_54 -DNRF52_PAN_31 -DNRF52_PAN_51 -DNRF52_PAN_36 -DNRF52_PAN_15 -DNRF52_PAN_20 -DNRF52_PAN_55 -DBOARD_PCA10040)
|
|
|
|
add_definitions(-DFREERTOS)
|
2021-06-06 13:56:03 +00:00
|
|
|
add_definitions(-D__STACK_SIZE=1024)
|
2023-03-26 12:49:03 +00:00
|
|
|
add_definitions(-D__HEAP_SIZE=0)
|
2022-03-21 13:05:49 +00:00
|
|
|
add_definitions(-DMYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME=1500)
|
2020-05-24 14:36:04 +00:00
|
|
|
|
2022-05-10 19:46:36 +00:00
|
|
|
# Note: Only use this for debugging
|
|
|
|
# Derive the low frequency clock from the main clock (SYNT)
|
|
|
|
# add_definitions(-DCLOCK_CONFIG_LF_SRC=2)
|
|
|
|
|
|
|
|
# Target hardware configuration options
|
|
|
|
add_definitions(-DTARGET_DEVICE_${TARGET_DEVICE})
|
2022-06-27 06:34:01 +00:00
|
|
|
add_definitions(-DTARGET_DEVICE_NAME="${TARGET_DEVICE}")
|
2022-05-10 19:46:36 +00:00
|
|
|
if(TARGET_DEVICE STREQUAL "PINETIME")
|
|
|
|
add_definitions(-DDRIVER_PINMAP_PINETIME)
|
|
|
|
add_definitions(-DCLOCK_CONFIG_LF_SRC=1) # XTAL
|
2023-11-16 09:39:48 +00:00
|
|
|
elseif(TARGET_DEVICE STREQUAL "MOY_TFK5") # P8a
|
2022-05-10 19:46:36 +00:00
|
|
|
add_definitions(-DDRIVER_PINMAP_P8)
|
|
|
|
add_definitions(-DCLOCK_CONFIG_LF_SRC=1) # XTAL
|
2023-11-16 09:39:48 +00:00
|
|
|
elseif(TARGET_DEVICE STREQUAL "MOY_TIN5") # P8a variant 2
|
2022-05-10 19:46:36 +00:00
|
|
|
add_definitions(-DDRIVER_PINMAP_P8)
|
|
|
|
add_definitions(-DCLOCK_CONFIG_LF_SRC=1) # XTAL
|
2023-11-16 09:39:48 +00:00
|
|
|
elseif(TARGET_DEVICE STREQUAL "MOY_TON5") # P8b
|
2022-05-10 19:46:36 +00:00
|
|
|
add_definitions(-DDRIVER_PINMAP_P8)
|
|
|
|
add_definitions(-DCLOCK_CONFIG_LF_SRC=0) # RC
|
|
|
|
add_definitions(-DMYNEWT_VAL_BLE_LL_SCA=500)
|
|
|
|
add_definitions(-DCLOCK_CONFIG_LF_CAL_ENABLED=1)
|
2023-11-16 09:39:48 +00:00
|
|
|
elseif(TARGET_DEVICE STREQUAL "MOY_UNK") # P8b mirrored
|
2022-05-10 19:46:36 +00:00
|
|
|
add_definitions(-DDRIVER_PINMAP_P8)
|
|
|
|
add_definitions(-DCLOCK_CONFIG_LF_SRC=0) # RC
|
|
|
|
add_definitions(-DMYNEWT_VAL_BLE_LL_SCA=500)
|
|
|
|
add_definitions(-DCLOCK_CONFIG_LF_CAL_ENABLED=1)
|
2022-06-24 22:32:23 +00:00
|
|
|
add_definitions(-DDRIVER_DISPLAY_MIRROR)
|
2022-05-10 19:46:36 +00:00
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Invalid TARGET_DEVICE")
|
|
|
|
endif()
|
|
|
|
|
2022-05-10 20:11:08 +00:00
|
|
|
# Debug configuration
|
|
|
|
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
add_definitions(-DDEBUG)
|
|
|
|
add_definitions(-DDEBUG_NRF_USER)
|
|
|
|
|
|
|
|
# NRF SDK Logging
|
|
|
|
add_definitions(-DNRF_LOG_ENABLED=1)
|
|
|
|
# add_definitions(-DNRF_LOG_BACKEND_RTT_ENABLED=1)
|
|
|
|
# add_definitions(-DNRF_LOG_BACKEND_SERIAL_USES_RTT=1)
|
|
|
|
|
|
|
|
# NRF SDK individual modules logging
|
|
|
|
# add_definitions(-DCLOCK_CONFIG_LOG_ENABLED=1)
|
|
|
|
# add_definitions(-DCLOCK_CONFIG_LOG_LEVEL=4)
|
|
|
|
# add_definitions(-DRTC_CONFIG_LOG_ENABLED=1)
|
|
|
|
# add_definitions(-DRTC_CONFIG_LOG_LEVEL=4)
|
|
|
|
|
|
|
|
# Nimble Logging
|
|
|
|
add_definitions(-DMYNEWT_VAL_NEWT_FEATURE_LOGCFG=1)
|
|
|
|
# add_definitions(-DMYNEWT_VAL_LOG_LEVEL=0)
|
|
|
|
# add_definitions(-DMYNEWT_VAL_BLE_HS_LOG_LVL=0)
|
|
|
|
endif()
|
2020-06-16 19:02:03 +00:00
|
|
|
|
2022-05-10 21:48:41 +00:00
|
|
|
add_subdirectory(displayapp/fonts)
|
|
|
|
target_compile_options(infinitime_fonts PUBLIC
|
2022-12-14 18:22:25 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2022-05-10 21:48:41 +00:00
|
|
|
)
|
|
|
|
|
2023-12-19 16:53:48 +00:00
|
|
|
add_subdirectory(displayapp/apps)
|
|
|
|
|
2020-08-17 14:48:12 +00:00
|
|
|
# NRF SDK
|
|
|
|
add_library(nrf-sdk STATIC ${SDK_SOURCE_FILES})
|
|
|
|
target_include_directories(nrf-sdk SYSTEM PUBLIC . ../)
|
|
|
|
target_include_directories(nrf-sdk SYSTEM PUBLIC ${INCLUDES_FROM_LIBS})
|
|
|
|
target_compile_options(nrf-sdk PRIVATE
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
|
|
|
-O3
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-08-17 14:48:12 +00:00
|
|
|
|
|
|
|
# NimBLE
|
|
|
|
add_library(nimble STATIC ${NIMBLE_SRC} ${TINYCRYPT_SRC})
|
|
|
|
target_include_directories(nimble SYSTEM PUBLIC . ../)
|
|
|
|
target_include_directories(nimble SYSTEM PUBLIC ${INCLUDES_FROM_LIBS})
|
|
|
|
target_compile_options(nimble PRIVATE
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-08-17 14:48:12 +00:00
|
|
|
|
|
|
|
# lvgl
|
|
|
|
add_library(lvgl STATIC ${LVGL_SRC})
|
|
|
|
target_include_directories(lvgl SYSTEM PUBLIC . ../)
|
|
|
|
target_include_directories(lvgl SYSTEM PUBLIC ${INCLUDES_FROM_LIBS})
|
|
|
|
target_compile_options(lvgl PRIVATE
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-08-17 14:48:12 +00:00
|
|
|
|
2021-07-11 13:06:06 +00:00
|
|
|
# LITTLEFS_SRC
|
|
|
|
add_library(littlefs STATIC ${LITTLEFS_SRC})
|
|
|
|
target_include_directories(littlefs SYSTEM PUBLIC . ../)
|
|
|
|
target_include_directories(littlefs SYSTEM PUBLIC ${INCLUDES_FROM_LIBS})
|
|
|
|
target_compile_options(littlefs PRIVATE
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2021-07-11 13:06:06 +00:00
|
|
|
)
|
|
|
|
|
2020-05-24 14:36:04 +00:00
|
|
|
# Build autonomous binary (without support for bootloader)
|
|
|
|
set(EXECUTABLE_NAME "pinetime-app")
|
2020-08-19 19:52:46 +00:00
|
|
|
set(EXECUTABLE_FILE_NAME ${EXECUTABLE_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
2020-05-24 14:36:04 +00:00
|
|
|
set(NRF5_LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/gcc_nrf52.ld")
|
|
|
|
add_executable(${EXECUTABLE_NAME} ${SOURCE_FILES})
|
2020-10-02 18:43:30 +00:00
|
|
|
set_target_properties(${EXECUTABLE_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_FILE_NAME})
|
2023-12-19 16:53:48 +00:00
|
|
|
target_link_libraries(${EXECUTABLE_NAME} nimble nrf-sdk lvgl littlefs infinitime_fonts infinitime_apps)
|
2020-05-24 14:36:04 +00:00
|
|
|
target_compile_options(${EXECUTABLE_NAME} PUBLIC
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
${WARNING_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-05-24 14:36:04 +00:00
|
|
|
|
|
|
|
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
|
|
|
|
SUFFIX ".out"
|
2021-08-16 14:42:42 +00:00
|
|
|
LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_FILE_NAME}.map"
|
2020-05-24 14:36:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(TARGET ${EXECUTABLE_NAME}
|
|
|
|
POST_BUILD
|
2020-08-19 19:52:46 +00:00
|
|
|
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_FILE_NAME}.out
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_FILE_NAME}.out "${EXECUTABLE_FILE_NAME}.bin"
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_FILE_NAME}.out "${EXECUTABLE_FILE_NAME}.hex"
|
|
|
|
COMMENT "post build steps for ${EXECUTABLE_FILE_NAME}")
|
2020-05-24 14:36:04 +00:00
|
|
|
|
2022-09-11 10:43:30 +00:00
|
|
|
if(BUILD_RESOURCES)
|
|
|
|
add_dependencies(${EXECUTABLE_NAME} GenerateResources)
|
|
|
|
endif()
|
|
|
|
|
2020-05-24 14:36:04 +00:00
|
|
|
# Build binary intended to be used by bootloader
|
|
|
|
set(EXECUTABLE_MCUBOOT_NAME "pinetime-mcuboot-app")
|
2020-08-19 19:52:46 +00:00
|
|
|
set(EXECUTABLE_MCUBOOT_FILE_NAME ${EXECUTABLE_MCUBOOT_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
2022-07-08 15:59:51 +00:00
|
|
|
set(IMAGE_MCUBOOT_FILE_NAME_HEX ${EXECUTABLE_MCUBOOT_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.hex)
|
|
|
|
set(IMAGE_MCUBOOT_FILE_NAME_BIN ${EXECUTABLE_MCUBOOT_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.bin)
|
2021-01-26 19:31:45 +00:00
|
|
|
set(DFU_MCUBOOT_FILE_NAME ${EXECUTABLE_MCUBOOT_NAME}-dfu-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.zip)
|
2020-05-24 14:36:04 +00:00
|
|
|
set(NRF5_LINKER_SCRIPT_MCUBOOT "${CMAKE_SOURCE_DIR}/gcc_nrf52-mcuboot.ld")
|
|
|
|
add_executable(${EXECUTABLE_MCUBOOT_NAME} ${SOURCE_FILES})
|
2023-12-19 16:53:48 +00:00
|
|
|
target_link_libraries(${EXECUTABLE_MCUBOOT_NAME} nimble nrf-sdk lvgl littlefs infinitime_fonts infinitime_apps)
|
2020-10-02 18:43:30 +00:00
|
|
|
set_target_properties(${EXECUTABLE_MCUBOOT_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_MCUBOOT_FILE_NAME})
|
2020-05-24 14:36:04 +00:00
|
|
|
target_compile_options(${EXECUTABLE_MCUBOOT_NAME} PUBLIC
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
${WARNING_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2020-05-24 14:36:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set_target_properties(${EXECUTABLE_MCUBOOT_NAME} PROPERTIES
|
|
|
|
SUFFIX ".out"
|
2021-08-16 14:42:42 +00:00
|
|
|
LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_MCUBOOT_FILE_NAME}.map"
|
2020-05-24 14:36:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_NAME}
|
|
|
|
POST_BUILD
|
2020-08-19 19:52:46 +00:00
|
|
|
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_MCUBOOT_FILE_NAME}.out
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_FILE_NAME}.bin"
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_FILE_NAME}.hex"
|
2022-12-29 05:11:24 +00:00
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 1 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_MCUBOOT_FILE_NAME}.hex ${IMAGE_MCUBOOT_FILE_NAME_HEX}
|
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 1 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_MCUBOOT_FILE_NAME}.bin ${IMAGE_MCUBOOT_FILE_NAME_BIN}
|
2020-08-19 19:52:46 +00:00
|
|
|
COMMENT "post build steps for ${EXECUTABLE_MCUBOOT_FILE_NAME}"
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-05-24 14:36:04 +00:00
|
|
|
|
2022-09-11 10:43:30 +00:00
|
|
|
if(BUILD_RESOURCES)
|
|
|
|
add_dependencies(${EXECUTABLE_MCUBOOT_NAME} GenerateResources)
|
|
|
|
endif()
|
|
|
|
|
2021-02-01 20:07:53 +00:00
|
|
|
if(BUILD_DFU)
|
2022-05-10 20:17:18 +00:00
|
|
|
add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_NAME}
|
|
|
|
POST_BUILD
|
2022-07-08 15:59:51 +00:00
|
|
|
COMMAND adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application ${IMAGE_MCUBOOT_FILE_NAME_HEX} ${DFU_MCUBOOT_FILE_NAME}
|
2022-05-10 20:17:18 +00:00
|
|
|
COMMENT "post build (DFU) steps for ${EXECUTABLE_MCUBOOT_FILE_NAME}"
|
|
|
|
)
|
2021-02-01 20:07:53 +00:00
|
|
|
endif()
|
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
# InfiniTime recovery firmware (autonomous)
|
|
|
|
set(EXECUTABLE_RECOVERY_NAME "pinetime-recovery")
|
|
|
|
set(EXECUTABLE_RECOVERY_FILE_NAME ${EXECUTABLE_RECOVERY_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
|
|
|
add_executable(${EXECUTABLE_RECOVERY_NAME} ${RECOVERY_SOURCE_FILES})
|
2023-12-19 16:53:48 +00:00
|
|
|
target_link_libraries(${EXECUTABLE_RECOVERY_NAME} nimble nrf-sdk littlefs infinitime_fonts infinitime_apps)
|
2021-01-26 19:31:45 +00:00
|
|
|
set_target_properties(${EXECUTABLE_RECOVERY_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERY_FILE_NAME})
|
|
|
|
target_compile_definitions(${EXECUTABLE_RECOVERY_NAME} PUBLIC "PINETIME_IS_RECOVERY")
|
|
|
|
target_compile_options(${EXECUTABLE_RECOVERY_NAME} PUBLIC
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
${WARNING_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
set_target_properties(${EXECUTABLE_RECOVERY_NAME} PROPERTIES
|
2020-10-02 18:43:30 +00:00
|
|
|
SUFFIX ".out"
|
2021-08-16 14:42:42 +00:00
|
|
|
LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERY_FILE_NAME}.map"
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
add_custom_command(TARGET ${EXECUTABLE_RECOVERY_NAME}
|
2020-10-02 18:43:30 +00:00
|
|
|
POST_BUILD
|
2021-01-26 19:31:45 +00:00
|
|
|
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_RECOVERY_FILE_NAME}.out
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_RECOVERY_FILE_NAME}.out "${EXECUTABLE_RECOVERY_FILE_NAME}.bin"
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_RECOVERY_FILE_NAME}.out "${EXECUTABLE_RECOVERY_FILE_NAME}.hex"
|
|
|
|
COMMENT "post build steps for ${EXECUTABLE_RECOVERY_FILE_NAME}"
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
# InfiniTime recovery firmware (mcuboot)
|
|
|
|
set(EXECUTABLE_RECOVERY_MCUBOOT_NAME "pinetime-mcuboot-recovery")
|
|
|
|
set(EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
2022-07-08 15:59:51 +00:00
|
|
|
set(IMAGE_RECOVERY_MCUBOOT_FILE_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
|
|
|
set(IMAGE_RECOVERY_MCUBOOT_FILE_NAME_HEX ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME}.hex)
|
2021-01-26 19:31:45 +00:00
|
|
|
set(DFU_RECOVERY_MCUBOOT_FILE_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}-dfu-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.zip)
|
|
|
|
add_executable(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} ${RECOVERY_SOURCE_FILES})
|
2023-12-19 16:53:48 +00:00
|
|
|
target_link_libraries(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} nimble nrf-sdk littlefs infinitime_fonts infinitime_apps)
|
2021-01-26 19:31:45 +00:00
|
|
|
set_target_properties(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME})
|
|
|
|
target_compile_definitions(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC "PINETIME_IS_RECOVERY")
|
|
|
|
target_compile_options(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
${WARNING_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
set_target_properties(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PROPERTIES
|
2020-10-02 18:43:30 +00:00
|
|
|
SUFFIX ".out"
|
2021-04-14 04:01:14 +00:00
|
|
|
LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_GRAPHICS_FILE_NAME}.map"
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
add_custom_command(TARGET ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}
|
2020-10-02 18:43:30 +00:00
|
|
|
POST_BUILD
|
2021-01-26 19:31:45 +00:00
|
|
|
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.out
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.bin"
|
2021-04-01 10:02:43 +00:00
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.out "${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.hex"
|
2022-12-29 05:11:24 +00:00
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 1 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.hex ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME_HEX}
|
2022-07-08 15:59:51 +00:00
|
|
|
COMMAND ${CMAKE_OBJCOPY} -I ihex -O binary ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME_HEX} "${IMAGE_RECOVERY_MCUBOOT_FILE_NAME}.bin"
|
2021-04-01 10:02:43 +00:00
|
|
|
COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/bin2c.py ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME}.bin recoveryImage > recoveryImage.h
|
2021-01-26 19:31:45 +00:00
|
|
|
COMMENT "post build steps for ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}"
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-02-01 20:07:53 +00:00
|
|
|
if(BUILD_DFU)
|
2022-05-10 20:17:18 +00:00
|
|
|
add_custom_command(TARGET ${EXECUTABLE_RECOVERY_MCUBOOT_NAME}
|
|
|
|
POST_BUILD
|
2022-07-08 15:59:51 +00:00
|
|
|
COMMAND adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application ${IMAGE_RECOVERY_MCUBOOT_FILE_NAME_HEX} ${DFU_RECOVERY_MCUBOOT_FILE_NAME}
|
2022-05-10 20:17:18 +00:00
|
|
|
COMMENT "post build (DFU) steps for ${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}"
|
|
|
|
)
|
2021-02-01 20:07:53 +00:00
|
|
|
endif()
|
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
# Build binary that writes the recovery image into the SPI flash memory
|
|
|
|
set(EXECUTABLE_RECOVERYLOADER_NAME "pinetime-recovery-loader")
|
|
|
|
set(EXECUTABLE_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_RECOVERYLOADER_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
|
|
|
add_executable(${EXECUTABLE_RECOVERYLOADER_NAME} ${RECOVERYLOADER_SOURCE_FILES})
|
2023-12-19 16:53:48 +00:00
|
|
|
target_link_libraries(${EXECUTABLE_RECOVERYLOADER_NAME} nrf-sdk infinitime_fonts infinitime_apps)
|
2021-01-26 19:31:45 +00:00
|
|
|
set_target_properties(${EXECUTABLE_RECOVERYLOADER_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_RECOVERYLOADER_FILE_NAME})
|
|
|
|
target_compile_options(${EXECUTABLE_RECOVERYLOADER_NAME} PUBLIC
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
${WARNING_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2021-01-26 19:31:45 +00:00
|
|
|
)
|
|
|
|
target_include_directories(${EXECUTABLE_RECOVERYLOADER_NAME} PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
|
|
|
)
|
|
|
|
add_dependencies(${EXECUTABLE_RECOVERYLOADER_NAME} ${EXECUTABLE_RECOVERY_MCUBOOT_NAME})
|
|
|
|
|
|
|
|
set_target_properties(${EXECUTABLE_RECOVERYLOADER_NAME} PROPERTIES
|
|
|
|
SUFFIX ".out"
|
2021-08-16 14:42:42 +00:00
|
|
|
LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.map"
|
2021-01-26 19:31:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(TARGET ${EXECUTABLE_RECOVERYLOADER_NAME}
|
2020-10-02 18:43:30 +00:00
|
|
|
POST_BUILD
|
2021-01-26 19:31:45 +00:00
|
|
|
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.out
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.out "${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.bin"
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.out "${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.hex"
|
|
|
|
COMMENT "post build steps for ${EXECUTABLE_RECOVERYLOADER_FILE_NAME}"
|
2020-10-02 18:43:30 +00:00
|
|
|
)
|
2020-06-06 17:28:01 +00:00
|
|
|
|
2021-01-26 19:31:45 +00:00
|
|
|
# Build binary that writes the recovery image (MCUBoot version)
|
|
|
|
set(EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME "pinetime-mcuboot-recovery-loader")
|
|
|
|
set(EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
2022-07-08 15:59:51 +00:00
|
|
|
set(IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}-image-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
|
|
|
|
set(IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME_HEX ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.hex)
|
2021-01-26 19:31:45 +00:00
|
|
|
set(DFU_MCUBOOT_RECOVERYLOADER_FILE_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}-dfu-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH}.zip)
|
|
|
|
add_executable(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} ${RECOVERYLOADER_SOURCE_FILES})
|
2023-12-19 16:53:48 +00:00
|
|
|
target_link_libraries(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} nrf-sdk infinitime_fonts infinitime_apps)
|
2021-01-26 19:31:45 +00:00
|
|
|
set_target_properties(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PROPERTIES OUTPUT_NAME ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME})
|
|
|
|
target_compile_options(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PUBLIC
|
2021-07-17 16:09:38 +00:00
|
|
|
${COMMON_FLAGS}
|
|
|
|
${WARNING_FLAGS}
|
|
|
|
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
|
|
|
|
$<$<CONFIG:RELEASE>: ${RELEASE_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
|
|
|
|
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
|
2021-01-26 19:31:45 +00:00
|
|
|
)
|
|
|
|
target_include_directories(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
|
|
|
)
|
|
|
|
add_dependencies(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} ${EXECUTABLE_RECOVERY_MCUBOOT_NAME})
|
|
|
|
|
|
|
|
set_target_properties(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PROPERTIES
|
|
|
|
SUFFIX ".out"
|
2021-08-16 14:42:42 +00:00
|
|
|
LINK_FLAGS "-mthumb -mabi=aapcs -std=gnu++98 -std=c99 -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--print-memory-usage --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.map"
|
2021-01-26 19:31:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_SIZE_UTIL} ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.out
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O binary ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.bin"
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.out "${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.hex"
|
2022-12-29 05:11:24 +00:00
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/tools/mcuboot/imgtool.py create --align 1 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.hex ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME_HEX}
|
2022-07-08 15:59:51 +00:00
|
|
|
COMMAND ${CMAKE_OBJCOPY} -I ihex -O binary ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME_HEX} "${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.bin"
|
2021-04-01 10:02:43 +00:00
|
|
|
COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/bin2c.py ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME}.bin recoveryLoaderImage > recoveryLoaderImage.h
|
2021-01-26 19:31:45 +00:00
|
|
|
COMMENT "post build steps for ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}"
|
|
|
|
)
|
|
|
|
|
2021-02-01 20:07:53 +00:00
|
|
|
if(BUILD_DFU)
|
2022-05-10 20:17:18 +00:00
|
|
|
add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME}
|
|
|
|
POST_BUILD
|
2022-07-08 15:59:51 +00:00
|
|
|
COMMAND adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME_HEX} ${DFU_MCUBOOT_RECOVERYLOADER_FILE_NAME}
|
2022-05-10 20:17:18 +00:00
|
|
|
COMMENT "post build (DFU) steps for ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}"
|
|
|
|
)
|
2021-02-01 20:07:53 +00:00
|
|
|
endif()
|
|
|
|
|
2022-09-11 10:43:30 +00:00
|
|
|
if(BUILD_RESOURCES)
|
|
|
|
add_subdirectory(resources)
|
|
|
|
endif()
|
2022-08-22 19:24:25 +00:00
|
|
|
|