-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applications: demo: Add project generator
- Loading branch information
Showing
21 changed files
with
627 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
# | ||
# Copyright (c) 2023 HARDWARIO a.s. | ||
# Copyright (c) 2024 HARDWARIO a.s. | ||
# | ||
# SPDX-License-Identifier: LicenseRef-HARDWARIO-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
set(SHIELD ctr_lte_v2) | ||
set(ENV{FW_BUNDLE} "com.hardwario.chester.app.demo") | ||
set(ENV{FW_VERSION} "v3.0.0") | ||
set(ENV{FW_NAME} "CHESTER Demo") | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(app) | ||
|
||
project(chester-demo) | ||
|
||
add_custom_command( | ||
COMMAND west gen-codec -d ../codec/cbor-decoder.yaml -e ../codec/cbor-encoder.yaml -o ../src/app_codec.h | ||
OUTPUT ../src/app_codec.h | ||
DEPENDS ../codec/cbor-decoder.yaml ../codec/cbor-encoder.yaml | ||
DEPENDS ../codec/cbor-decoder.yaml | ||
) | ||
|
||
target_sources(app PRIVATE src/app_cbor.c) | ||
target_sources(app PRIVATE src/app_config.c) | ||
target_sources(app PRIVATE src/app_data.c) | ||
target_sources(app PRIVATE src/app_handler.c) | ||
target_sources(app PRIVATE src/app_init.c) | ||
target_sources(app PRIVATE src/app_power.c) | ||
target_sources(app PRIVATE src/app_sensor.c) | ||
target_sources(app PRIVATE src/app_shell.c) | ||
target_sources(app PRIVATE src/app_codec.h) | ||
target_sources(app PRIVATE src/app_power.c) | ||
target_sources(app PRIVATE src/main.c) | ||
target_sources(app PRIVATE src/app_cbor.c) | ||
target_sources(app PRIVATE src/app_work.c) | ||
target_sources(app PRIVATE src/app_sensor.c) | ||
target_sources(app PRIVATE src/app_init.c) | ||
target_sources(app PRIVATE src/app_handler.c) | ||
target_sources(app PRIVATE src/app_config.c) | ||
|
||
target_sources(app PRIVATE src/main.c) | ||
target_precompile_headers(app PRIVATE src/feature.h) | ||
|
||
target_sources(app PRIVATE src/app_codec.h) | ||
# ### Preserved code "cmake" (begin) | ||
# ^^^ Preserved code "cmake" (end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2024 HARDWARIO a.s. | ||
# | ||
# SPDX-License-Identifier: LicenseRef-HARDWARIO-5-Clause | ||
# | ||
|
||
config VARIANT_CHESTER_DEMO | ||
bool "Enable VARIANT_CHESTER_DEMO" | ||
default y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VERSION_MAJOR = 1 | ||
VERSION_MAJOR = 3 | ||
VERSION_MINOR = 0 | ||
PATCHLEVEL = 0 | ||
VERSION_TWEAK = 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,78 @@ | ||
# | ||
# Copyright (c) 2023 HARDWARIO a.s. | ||
# Copyright (c) 2024 HARDWARIO a.s. | ||
# | ||
# SPDX-License-Identifier: LicenseRef-HARDWARIO-5-Clause | ||
# | ||
|
||
CONFIG_ADC_NRFX_SAADC=n | ||
CONFIG_ADC_SHELL=n | ||
CONFIG_APP_TAMPER=n | ||
# Configurations | ||
# SUBSYSTEM-ACCEL | ||
CONFIG_CTR_ACCEL=y | ||
# SUBSYSTEM-BATT | ||
CONFIG_CTR_BATT=y | ||
CONFIG_CTR_BUTTON=y | ||
# SUBSYSTEM-BLUETOOTH | ||
CONFIG_CTR_BLE=y | ||
# SUBSYSTEM-BUF | ||
CONFIG_CTR_BUF=y | ||
# SUBSYSTEM-BUTTON | ||
CONFIG_CTR_BUTTON=y | ||
# SUBSYSTEM-CLOUD | ||
CONFIG_CTR_CLOUD=y | ||
CONFIG_CTR_DEFAULTS=y | ||
CONFIG_CTR_INFO=y | ||
CONFIG_CTR_LED=y | ||
CONFIG_CTR_LOG=y | ||
CONFIG_CTR_RTC=y | ||
CONFIG_CTR_SHELL=y | ||
CONFIG_CTR_THERM=y | ||
CONFIG_CTR_WDOG=y | ||
CONFIG_NEWLIB_LIBC_NANO=n | ||
CONFIG_TINYCRYPT=y | ||
CONFIG_TINYCRYPT_SHA256=y | ||
CONFIG_ZCBOR=y | ||
CONFIG_ZCBOR_STOP_ON_ERROR=y | ||
CONFIG_ENTROPY_GENERATOR=y | ||
|
||
CONFIG_SETTINGS_SHELL=y | ||
|
||
CONFIG_IMG_MANAGER=y | ||
CONFIG_BOOTLOADER_MCUBOOT=y | ||
|
||
CONFIG_CTR_LTE_V2_GNSS=y | ||
CONFIG_CTR_GNSS=y | ||
|
||
# CONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS="--custom-tlv 0xff00 tralala" | ||
|
||
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000 | ||
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y | ||
CONFIG_SPI=y | ||
|
||
CONFIG_DFU_TARGET=y | ||
CONFIG_DFU_TARGET_STREAM=y | ||
CONFIG_DFU_TARGET_MCUBOOT=y | ||
CONFIG_DFU_TARGET_LOG_LEVEL_DBG=y | ||
CONFIG_STREAM_FLASH_ERASE=y | ||
CONFIG_STREAM_FLASH=y | ||
|
||
# CONFIG_CTR_LTE_LINK_LOG_LEVEL_DBG=y | ||
CONFIG_CTR_LTE_LINK_LOG_LEVEL_INF=y | ||
# CONFIG_CTR_LTE_LINK_LOG_LEVEL_ERR=y | ||
# CONFIG_CTR_LTE_V2_LOG_LEVEL_ERR=y | ||
CONFIG_CTR_LTE_V2_LOG_LEVEL_DBG=y | ||
|
||
CONFIG_ADC_TLA2021_INIT_PRIORITY=60 | ||
|
||
|
||
# Enable file system support | ||
CONFIG_FILE_SYSTEM=y | ||
CONFIG_FILE_SYSTEM_LITTLEFS=y | ||
CONFIG_FILE_SYSTEM_MKFS=y | ||
CONFIG_FILE_SYSTEM_SHELL=y | ||
# CONFIG_FILE_SYSTEM_SHELL_TEST_COMMANDS=y | ||
CONFIG_SETTINGS_FILE=y | ||
CONFIG_SETTINGS_FILE_PATH="/lfs1/settings/run" | ||
# Use external flash for littlefs file system | ||
CONFIG_PM_PARTITION_REGION_LITTLEFS_EXTERNAL=y | ||
# SUBSYSTEM-CONFIG | ||
CONFIG_CTR_CONFIG=y | ||
# SUBSYSTEM-DEFAULTS | ||
CONFIG_CTR_DEFAULTS=y | ||
# SUBSYSTEM-ENTROPY-GENERATOR | ||
CONFIG_ENTROPY_GENERATOR=y | ||
# SUBSYSTEM-GNSS | ||
CONFIG_CTR_GNSS=y | ||
# SUBSYSTEM-INFO | ||
CONFIG_CTR_INFO=y | ||
# SUBSYSTEM-LED | ||
CONFIG_CTR_LED=y | ||
# SUBSYSTEM-LOG | ||
CONFIG_CTR_LOG=y | ||
# SUBSYSTEM-LTE-V2 | ||
CONFIG_CTR_LTE_V2=y | ||
# SUBSYSTEM-RTC | ||
CONFIG_CTR_RTC=y | ||
# SUBSYSTEM-SHELL | ||
CONFIG_CTR_SHELL=y | ||
# SUBSYSTEM-THERM | ||
CONFIG_CTR_THERM=y | ||
# SUBSYSTEM-TINYCRYPT | ||
CONFIG_TINYCRYPT=y | ||
# SUBSYSTEM-TINYCRYPT-SHA256 | ||
CONFIG_TINYCRYPT_SHA256=y | ||
# SUBSYSTEM-WDOG | ||
CONFIG_CTR_WDOG=y | ||
# SUBSYSTEM-ZCBOR | ||
CONFIG_ZCBOR=y | ||
CONFIG_ZCBOR_STOP_ON_ERROR=y | ||
# Extra configurations | ||
CONFIG_ADC_NRFX_SAADC=n | ||
CONFIG_ADC_SHELL=n | ||
CONFIG_ADC_TLA2021_INIT_PRIORITY=60 | ||
CONFIG_CTR_LTE_V2_GNSS=y | ||
CONFIG_NEWLIB_LIBC_NANO=n | ||
|
||
|
||
# ### Preserved code "config" (begin) | ||
# ^^^ Preserved code "config" (end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
version: 1 | ||
variants: | ||
- name: CHESTER Demo | ||
fw_bundle: com.hardwario.chester.app.demo | ||
fw_name: hio-chester-demo | ||
fw_version: v3.0.0 | ||
project: | ||
variant: Demo | ||
company: 2024 HARDWARIO a.s. | ||
license: 'SPDX-License-Identifier: LicenseRef-HARDWARIO-5-Clause' | ||
fw_name: CHESTER Demo | ||
fw_bundle: com.hardwario.chester.app.demo | ||
fw_version: v3.0.0 | ||
features: | ||
- subsystem-accel | ||
- subsystem-batt | ||
- subsystem-bluetooth | ||
- subsystem-buf | ||
- subsystem-button | ||
- subsystem-config | ||
- subsystem-cloud | ||
- subsystem-defaults | ||
- subsystem-gnss | ||
- subsystem-info | ||
- subsystem-led | ||
- subsystem-log | ||
- subsystem-rtc | ||
- subsystem-shell | ||
- subsystem-therm | ||
- subsystem-wdog | ||
- subsystem-entropy-generator | ||
- subsystem-tinycrypt | ||
- subsystem-tinycrypt-sha256 | ||
- subsystem-zcbor | ||
- subsystem-lte-v2 | ||
- chester-app-report-jitter | ||
#- chester-app-tamper | ||
parameters: | ||
- name: interval-sample | ||
type: int | ||
min: 1 | ||
max: 86400 | ||
default: 60 | ||
help: 'Get/Set sample interval in seconds' | ||
- name: interval-aggreg | ||
type: int | ||
min: 1 | ||
max: 86400 | ||
default: 300 | ||
help: 'Get/Set aggregate interval in seconds ' | ||
- name: interval-report | ||
type: int | ||
min: 30 | ||
max: 86400 | ||
default: 1800 | ||
help: 'Get/Set report interval in seconds' | ||
- name: interval-poll | ||
type: int | ||
min: 0 | ||
max: 86400 | ||
default: 0 | ||
help: "Get/Set poll interval in seconds (disabled if 0)" | ||
commands: | ||
- name: sample | ||
callback: app_work_sample() | ||
help: 'Sample immediately.' | ||
- name: send | ||
callback: app_work_send() | ||
help: 'Send data immediately.' | ||
extras: | ||
- CONFIG_CTR_LTE_V2_GNSS=y | ||
- CONFIG_ADC_NRFX_SAADC=n | ||
- CONFIG_NEWLIB_LIBC_NANO=n | ||
- CONFIG_ADC_SHELL=n | ||
- CONFIG_ADC_TLA2021_INIT_PRIORITY=60 |
Oops, something went wrong.