diff --git a/README.md b/README.md index e2602fb..39e8b28 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ To do that, `esptool.py` is required, which can be installed running `pip instal ### Creating a merged binary for M5StickC-Plus ``` -esptool.py --chip esp32 merge_bin --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/anjay-esp32-client.bin 0x110000 build/storage.bin --output m5stickc-plus.bin +esptool.py --chip esp32 merge_bin --flash_mode dio --flash_size 4MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/anjay-esp32-client.bin 0x210000 build/storage.bin --output m5stickc-plus.bin ``` ### NVS config file To generate NVS partition, create a `nvs_config.csv` file with following content: @@ -74,6 +74,11 @@ esptool.py -b 750000 --chip esp32 write_flash 0x0000 m5stickc-plus.bin esptool.py -b 750000 --chip esp32 write_flash 0x9000 nvs_config.bin ``` Device will be reset and run with provided configuration. +### FOTA +After compilation, you can perform FOTA with Coiote DM. Required binary file location: +``` +$PROJECT_DIR/build/anjay-esp32-client/build/anjay-esp32-client.bin +``` ## Links * [Anjay source repository](https://github.com/AVSystem/Anjay) * [Anjay documentation](https://avsystem.github.io/Anjay-doc/index.html) diff --git a/main/anjay-config/anjay/anjay_config.h b/main/anjay-config/anjay/anjay_config.h index d7ad979..d90e1fb 100644 --- a/main/anjay-config/anjay/anjay_config.h +++ b/main/anjay-config/anjay/anjay_config.h @@ -17,6 +17,8 @@ #ifndef ANJAY_CONFIG_H #define ANJAY_CONFIG_H +#include + /** * @file anjay_config.h * diff --git a/main/anjay-config/avsystem/coap/avs_coap_config.h b/main/anjay-config/avsystem/coap/avs_coap_config.h index cb2ac41..d40a6f0 100644 --- a/main/anjay-config/avsystem/coap/avs_coap_config.h +++ b/main/anjay-config/avsystem/coap/avs_coap_config.h @@ -17,6 +17,8 @@ #ifndef AVS_COAP_CONFIG_H #define AVS_COAP_CONFIG_H +#include + /** * @file avs_coap_config.h * diff --git a/main/anjay-config/avsystem/commons/avs_commons_config.h b/main/anjay-config/avsystem/commons/avs_commons_config.h index c3be00f..b707440 100644 --- a/main/anjay-config/avsystem/commons/avs_commons_config.h +++ b/main/anjay-config/avsystem/commons/avs_commons_config.h @@ -17,6 +17,8 @@ #ifndef AVS_COMMONS_CONFIG_H #define AVS_COMMONS_CONFIG_H +#include + /** * @file avs_commons_config.h * diff --git a/main/default_config.h.in b/main/default_config.h.in index 8be0631..bc65026 100644 --- a/main/default_config.h.in +++ b/main/default_config.h.in @@ -18,6 +18,6 @@ #include -#define CLIENT_VERSION "${GIT_REPO_VERSION}" +#define CLIENT_VERSION "@CLIENT_VERSION@" #define DEFAULT_LOG_LEVEL AVS_LOG_INFO diff --git a/main/generate_version.cmake b/main/generate_version.cmake index e36ea65..861d2fd 100644 --- a/main/generate_version.cmake +++ b/main/generate_version.cmake @@ -15,11 +15,11 @@ # Git executable is extracted from parameters. execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always RESULT_VARIABLE GIT_DESCRIBE_RESULT - OUTPUT_VARIABLE GIT_REPO_VERSION_S) + OUTPUT_VARIABLE CLIENT_VERSION_S) if(GIT_DESCRIBE_RESULT EQUAL 0) - string(STRIP "${GIT_REPO_VERSION_S}" GIT_REPO_VERSION) + string(STRIP "${CLIENT_VERSION_S}" CLIENT_VERSION) else() - set(GIT_REPO_VERSION "22.04") + set(CLIENT_VERSION "22.04.1") endif() # Input and output files are extracted from parameters. -configure_file(${INPUT_FILE} ${OUTPUT_FILE}) +configure_file("${INPUT_FILE}" "${OUTPUT_FILE}" @ONLY)