This commit is contained in:
Wolfgang Hottgenroth 2021-03-25 10:58:51 +01:00
parent 44696c4d97
commit 1a03fdb9da
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469
4 changed files with 19 additions and 0 deletions

6
readme.md Normal file
View File

@ -0,0 +1,6 @@
Generate configuration binary:
~/esp/esp-idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate --version 1 config.csv config.bin 0x6000
Flash configuration binary:
esptool -p /dev/ttyUSB0 write_flash 0x9000 ../config.bin

View File

@ -5,4 +5,5 @@ idf_component_register(SRCS "app_main.c"
"timesync.c"
"sha256.c"
"sinkSender.c"
"version.c"
INCLUDE_DIRS ".")

2
src/main/version.c Normal file
View File

@ -0,0 +1,2 @@
#include <stdint.h>
const uint32_t APP_VERSION = 0x44696c4d;

10
tools/setVersion.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
VERSION=`git rev-parse --short=8 HEAD`
cat - > ./src/main/version.c <<EOF
#include <stdint.h>
const uint32_t APP_VERSION = 0x${VERSION};
EOF