Skip to content

Commit

Permalink
release R2312
Browse files Browse the repository at this point in the history
  • Loading branch information
maierkomor committed Dec 31, 2023
1 parent 437a0ed commit 61b89d6
Show file tree
Hide file tree
Showing 86 changed files with 2,765 additions and 2,882 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ cmake_minimum_required(VERSION 3.5)
#execute_process(COMMAND bin/prebuild.sh)
add_compile_definitions(ESP$ENV{ESP_FAM})
add_compile_definitions(IDF_VERSION=$ENV{IDF_VERSION})
add_compile_definitions(WFC_TARGET=$ENV{WFC_TARGET})
add_compile_definitions(FWCFG="$ENV{FWCFG}")
add_link_options(LINKER:SHELL:"-gc-sections,--defsym,LDTIMESTAMP=$ENV{TIMESTAMP}")
#set(FWCFG $ENV{FWCFG}) # ignored - for whatever reason...

#add_compile_definitions(FWCFG="$ENV{FWCFG}")
set(PROJECT_VER $ENV{VER}) # ignored - for whatever reason...
set(INCLUDE_DIRS components/logging drv/dht drv/bme280 drv/ws8212b)
set(EXTRA_COMPONENT_DIRS drv/button drv/dht drv/display drv/hc-sr04
Expand Down
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
R2312:
======
- fix DS18B20 negative values
- fix ESP32-C3 1-wire regression
- fix for SSD1306 font rendering
- SSD130x code unification
- enable core temperature support on C3,S2,S3
- update atriumcfg config to include all configurations
- added support for rendering PNM icons (PBM, PGM, PPM)

R2311:
======
- added driver foc.config_init_high()r BQ25601D charging IC
Expand Down
10 changes: 6 additions & 4 deletions Makefile.gmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ ROMFS_FILE =$(ROMFS_LST:%.lst=%.romfs)
ROMFS_FILES =$(shell cat $(ROMFS_LST) 2>/dev/null)
ROMFS_ADDR =$(CONFIG_ROMFS_ADDR)
IDF_VER :=$(shell cd $(IDF_PATH); git describe --tags 2>/dev/null | sed 's/\.//;s/v//;s/-.*//;s/\..*//')
CPPFLAGS =-DIDF_VERSION=$(IDF_VER) -D$(CHIP) -DFWCFG=\"$(PROJECT)\" -I$(BUILD_DIR_BASE)/config
# shell call to remove ""
WFC_TARGET =$(shell echo $(CONFIG_WFC_TARGET))
CPPFLAGS =-DIDF_VERSION=$(IDF_VER) -D$(CHIP) -DFWCFG=\"$(PROJECT)\" -DWFC_TARGET=$(WFC_TARGET) -I$(BUILD_DIR_BASE)/config
BUILD_DIR_BASE =$(PWD)/build.$(PROJECT)
PROJECT_ROOT =$(PWD)
WFCINC =$(WFCDIR)/include
PROJECT_VER =$(shell bin/mkversion.sh)
MEMFILES =$(shell cd data; ls -1 man/*.man)
ROMFS_PARTITION =storage
CFG_CXX =tools/atriumcfg.cpp tools/hwcfg.cpp tools/swcfg.cpp tools/wfccore.cpp
CFG_CXX =tools/atriumcfg.cpp components/wfc/hwcfg_pc.cpp components/wfc/swcfg_pc.cpp components/wfc/wfccore_pc.cpp
PATH :=$(PATH_$(CHIP)):$(PATH)
IDF_PYTHON_ENV_PATH =$(IDF_PYTHON_ENV_PATH_$(CHIP))

Expand All @@ -81,7 +83,7 @@ endif

.PHONY: prepare settings

export BUILD_DIR_BASE CHIP CPPFLAGS PROJECT_NAME IDF_PATH IDF_VER PATH PTABLE PROJECT_ROOT PROJECT SDKCONFIG WFC WFCDIR ESPTOOL_ALL_FLASH_ARGS CXXFLAGS PROJECT_VER MEMFILES CONFIG_INTEGRATED_HELP
export BUILD_DIR_BASE CHIP CPPFLAGS PROJECT_NAME IDF_PATH IDF_VER PATH PTABLE PROJECT_ROOT PROJECT SDKCONFIG WFC WFCDIR ESPTOOL_ALL_FLASH_ARGS CXXFLAGS PROJECT_VER MEMFILES CONFIG_INTEGRATED_HELP WFC_TARGET

romfs/%.romfs: prepare
bin/mkromfs -c data -o $@ $(ROMFS_FILES) version.txt
Expand Down Expand Up @@ -181,7 +183,7 @@ build.$(PROJECT)/spiffs.bin: $(ROMFS_FILES:%=data/%)
atriumcfg: bin/atriumcfg$(EXEEXT)

bin/atriumcfg$(EXEEXT): $(CFG_CXX) tools/version.h tools/pcconfig.h
g++ -g -Imain -Icomponents/streams $(CFG_CXX) -leditline -lmd -o $@
g++ -g -DWFC_TARGET=pc -Imain -Icomponents/wfc -Itools $(CFG_CXX) -ledit -lmd -o $@

always:

Expand Down
51 changes: 34 additions & 17 deletions bin/genmemfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ cat > $MEMFILES_H << EOF
#define MEMFILES_H
#ifdef CONFIG_IDF_TARGET_ESP8266
#define ROMSTR __attribute__((section(".irom0.text.romstr")))
#define ROMSTR __attribute__((section(".flash.text")))
#else
#define ROMSTR
#endif
#ifdef CONFIG_INTEGRATED_HELP
EOF

cat > $CMAKELISTS << EOF
Expand All @@ -55,26 +56,42 @@ for i in $MEMFILES; do
filename=`basename "$i"`
fn_nodot=`echo $filename | sed 's/\./_/g'`
cpp_file=`printf "%s.cpp" $fn_nodot`
if [ "$CONFIG_INTEGRATED_HELP" = "y" ]; then
size=`stat --printf='%s' $i`
printf "extern const char ROMSTR $fn_nodot""[];\n#define $fn_nodot""_len $size\n" >> $MEMFILES_H
test ! -e "$ldir/$cpp_file" -o "$file" -nt "$ldir/$cpp_file"
if [ "$?" == "0" ]; then
echo updating $ldir/$cpp_file
pushd `dirname $i`
xxd -i $filename "$ldir/$cpp_file"
popd > /dev/null
sed -i 's/unsigned char /#include "memfiles.h"\nconst char ROMSTR /;s/]/]/;s/^unsigned //;s/}/ ,0x00}/;s/int .*;//' "$ldir/$cpp_file"
fi
echo " $filename" | sed 's/.man/_man.cpp/' >> $CMAKELISTS
else
echo "#define $fn_nodot 0" >> $MEMFILES_H
rm -f "$ldir/$cpp_file"
size=`stat --printf='%s' $i`
printf "extern const char ROMSTR $fn_nodot""[];\n#define $fn_nodot""_len $size\n" >> $MEMFILES_H
test ! -e "$ldir/$cpp_file" -o "$file" -nt "$ldir/$cpp_file"
if [ "$?" == "0" ]; then
echo updating $ldir/$cpp_file
cat << EOHEADER > "$ldir/$cpp_file"
#include <sdkconfig.h>
#include "memfiles.h"
#ifdef CONFIG_INTEGRATED_HELP
EOHEADER
pushd `dirname $i`
xxd -i "$filename" >> "$ldir/$cpp_file"
popd > /dev/null
sed -i 's/unsigned char/const char ROMSTR/;s/]/]/;s/^unsigned //;s/}/ ,0x00}/;s/int .*;//' "$ldir/$cpp_file"
cat << EOFOOTER >> "$ldir/$cpp_file"
#else
#define $fn_nodot 0
#endif
EOFOOTER
fi
echo " $filename" | sed 's/.man/_man.cpp/' >> $CMAKELISTS
shift
done

printf "\n#else // no CONFIG_INTEGRATED_HELP\n\n" >> $MEMFILES_H

for i in $MEMFILES; do
file="$i"
filename=`basename "$i"`
fn_nodot=`echo $filename | sed 's/\./_/g'`
printf "#define $fn_nodot 0\n#define ${fn_nodot}_len 0\n" >> $MEMFILES_H
shift
done

printf "\n#endif" >> $MEMFILES_H
printf "\n\n#endif // CONFIG_INTEGRATED_HELP\n\n#endif\n" >> $MEMFILES_H
printf ")\nregister_component()" >> $CMAKELISTS

if [ -e "$ldir/memfiles.h" ]; then
Expand Down
89 changes: 0 additions & 89 deletions bin/link_wfc.sh

This file was deleted.

1 change: 0 additions & 1 deletion bin/prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ ln -s -f build.$PROJECT build || exit 1
export COMPONENT_PATH=`pwd`/main
bash bin/mkversion.sh main/versions.h || exit 1
bash bin/genmemfiles.sh || exit 1
bash bin/link_wfc.sh || exit 1
7 changes: 7 additions & 0 deletions components/env/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,20 @@ class EnvElement
EnvObject *getParent() const
{ return m_parent; }

bool skip() const
{ return m_skip; }

void setSkip(bool s = true)
{ m_skip = s; }

protected:
explicit EnvElement(const char *n, const char *dim = 0);

char *m_name;
char *m_dim;
friend class EnvObject;
EnvObject *m_parent = 0;
bool m_skip = false;

private:
EnvElement(const EnvElement &); // intentionally not supported
Expand Down
2 changes: 1 addition & 1 deletion components/streams/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
idf_component_register(
SRCS astream.cpp mstream.cpp stream.cpp strstream.cpp estring.cpp
SRCS astream.cpp mstream.cpp stream.cpp strstream.cpp estring.cpp support.cpp
INCLUDE_DIRS .
)
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions components/wfc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
idf_component_register(
SRCS hwcfg_$ENV{WFC_TARGET}.cpp swcfg_$ENV{WFC_TARGET}.cpp wfccore_$ENV{WFC_TARGET}.cpp
INCLUDE_DIRS . ../streams
REQUIRES streams
)
2 changes: 2 additions & 0 deletions components/wfc/component.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COMPONENT_ADD_INCLUDEDIRS=.
COMPONENT_OBJS = hwcfg_$(WFC_TARGET).o swcfg_$(WFC_TARGET).o wfccore_$(WFC_TARGET).o
Loading

0 comments on commit 61b89d6

Please sign in to comment.