fix native

This commit is contained in:
proddy
2025-10-24 18:05:12 +02:00
parent 35fca9c450
commit c958c7d61a

View File

@@ -179,29 +179,14 @@ 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
;
; It will generate an executable which when run will show the EMS-ESP Console where you can run tests using the `test` command.
;
; See https://docs.platformio.org/en/latest/core/installation/shell-commands.html#piocore-install-shell-commands
;
; to build and run directly on linux: pio run -e native -t exec
;
; to build and run on Windows, it needs winsock for the console input so:
; - For the first time, install Msys2 (https://www.msys2.org/) and the GCC compiler with `run pacman -S mingw-w64-ucrt-x86_64-gcc`
; - Then, build with `pio run -e native` to create the program.exe file
; - run by calling the executable from the Mysys shell e.g. `C:/msys64/msys2_shell.cmd -defterm -here -no-start -ucrt64 -c <location>/.pio/build/native/program.exe`
; - or use with Windows Terminal https://www.msys2.org/docs/terminals/
;
; foundation for building and testing natively, standalone without an ESP32.
[env:native]
platform = native
build_type = debug
build_flags =
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\"
-DARDUINOJSON_ENABLE_ARDUINO_STRING=1
-std=gnu++17 -Og -ggdb
-Wall -Wextra
-Wno-unused-parameter -Wno-sign-compare -Wno-missing-braces
@@ -272,6 +257,27 @@ lib_deps = Unity
test_testing_command =
${platformio.build_dir}/${this.__env__}/program
;
; Building and testing locally on OS, which we call "standalone" without an ESP32.
; See https://docs.platformio.org/en/latest/platforms/native.html
;
; It will generate an executable which when run will show the EMS-ESP Console where you can run tests using the `test` command.
;
; See https://docs.platformio.org/en/latest/core/installation/shell-commands.html#piocore-install-shell-commands
;
; to build and run directly on linux: pio run -e standalone -t exec
;
; to build and run on Windows, it needs winsock for the console input so:
; - For the first time, install Msys2 (https://www.msys2.org/) and the GCC compiler with `run pacman -S mingw-w64-ucrt-x86_64-gcc`
; - Then, build with `pio run -e standalone` to create the program.exe file
; - run by calling the executable from the Mysys shell e.g. `C:/msys64/msys2_shell.cmd -defterm -here -no-start -ucrt64 -c <location>/.pio/build/native/program.exe`
; - or use with Windows Terminal https://www.msys2.org/docs/terminals/
;
[env:standalone]
extends = env:native
build_flags =
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.7.3-dev.0\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
; Modbus
; Creating the modbus registers is a multi-step process. Before it was in a shell script called generate_csv_and_headers.sh
; but now moved to pio so everything is in python and cross-platform. The logic is as follows: