Skip to content

Commit

Permalink
Anjay-esp32-client 22.04.1
Browse files Browse the repository at this point in the history
Bugfixes:
- Fix configuration issue regarded to improper include order.
  • Loading branch information
Mieszko Mieruński committed Apr 28, 2022
1 parent 52db46f commit 13cea95
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions main/anjay-config/anjay/anjay_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef ANJAY_CONFIG_H
#define ANJAY_CONFIG_H

#include <sdkconfig.h>

/**
* @file anjay_config.h
*
Expand Down
2 changes: 2 additions & 0 deletions main/anjay-config/avsystem/coap/avs_coap_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef AVS_COAP_CONFIG_H
#define AVS_COAP_CONFIG_H

#include <sdkconfig.h>

/**
* @file avs_coap_config.h
*
Expand Down
2 changes: 2 additions & 0 deletions main/anjay-config/avsystem/commons/avs_commons_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef AVS_COMMONS_CONFIG_H
#define AVS_COMMONS_CONFIG_H

#include <sdkconfig.h>

/**
* @file avs_commons_config.h
*
Expand Down
2 changes: 1 addition & 1 deletion main/default_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@

#include <avsystem/commons/avs_log.h>

#define CLIENT_VERSION "${GIT_REPO_VERSION}"
#define CLIENT_VERSION "@CLIENT_VERSION@"

#define DEFAULT_LOG_LEVEL AVS_LOG_INFO
8 changes: 4 additions & 4 deletions main/generate_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 13cea95

Please sign in to comment.