replace auto-gen of XLS doc files and Modbus with python

This commit is contained in:
proddy
2025-10-23 17:16:32 +02:00
parent 982d64ddca
commit ba334930fe
9 changed files with 478 additions and 23 deletions

View File

@@ -175,6 +175,7 @@ board = seeed_xiao_esp32c6
build_flags =
${common.build_flags}
-DBOARD_C6
;
; Building and testing natively, standalone without an ESP32.
; See https://docs.platformio.org/en/latest/platforms/native.html
@@ -193,15 +194,12 @@ build_flags =
;
[env:native]
platform = native
extra_scripts =
build_flags =
build_type = debug
build_src_flags =
-DARDUINOJSON_ENABLE_ARDUINO_STRING=1
-DEMSESP_STANDALONE -DEMSESP_TEST
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.7.3-dev.0\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
-std=gnu++17 -Og -ggdb
build_unflags = -std=gnu++11 -std=gnu++14
build_type = debug
build_src_flags =
-Wall -Wextra
-Wno-unused-parameter -Wno-sign-compare -Wno-missing-braces
-I./src/core
@@ -232,7 +230,6 @@ lib_deps =
; then re-run and capture the output between "START - CUT HERE" and "END - CUT HERE" into the test_api.h file
[env:native-test]
platform = native
extra_scripts =
test_build_src = true
build_flags =
; -DEMSESP_UNITY_CREATE
@@ -271,3 +268,28 @@ lib_ldf_mode = off
lib_deps = Unity
test_testing_command =
${platformio.build_dir}/${this.__env__}/program
# builds the modbus_entity_parameters.hpp header file
# pio run -e build_modbus -t build
[env:build_modbus]
extends = env:native
extra_scripts =
pre:scripts/build_modbus_entity_parameters_pre.py
post:scripts/build_run_test.py
build_flags = -DEMSESP_MODBUS
custom_test_command = entity_dump
custom_output_file = dump_entities.csv
custom_post_script = scripts/build_modbus_entity_parameters_post.py
; builds the real dump_entities.csv and dump_telegrams.csv files
; and the Modbus-Entity-Registers.md file
; to be run after build_modbus with: pio run -e build_standalone -t clean -t build
[env:build_standalone]
extends = env:native
extra_scripts =
post:scripts/build_run_test.py
build_flags = -DEMSESP_STANDALONE
custom_test_command = entity_dump
custom_output_file = dump_entities.csv
custom_post_script = scripts/build_modbus_generate_doc_post.py