mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
4
.github/workflows/pr_check.yml
vendored
4
.github/workflows/pr_check.yml
vendored
@@ -32,6 +32,6 @@ jobs:
|
|||||||
pip install wheel
|
pip install wheel
|
||||||
pip install -U platformio
|
pip install -U platformio
|
||||||
|
|
||||||
- name: Build native
|
- name: Build standalone
|
||||||
run: |
|
run: |
|
||||||
platformio run -e native
|
platformio run -e standalone
|
||||||
|
|||||||
@@ -179,29 +179,14 @@ build_flags =
|
|||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
-DBOARD_C6
|
-DBOARD_C6
|
||||||
|
|
||||||
;
|
; foundation for building and testing natively, standalone without an ESP32.
|
||||||
; 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/
|
|
||||||
;
|
|
||||||
[env:native]
|
[env:native]
|
||||||
platform = native
|
platform = native
|
||||||
build_type = debug
|
build_type = debug
|
||||||
|
build_flags =
|
||||||
build_src_flags =
|
build_src_flags =
|
||||||
-DARDUINOJSON_ENABLE_ARDUINO_STRING=1
|
|
||||||
-DEMSESP_STANDALONE -DEMSESP_TEST
|
-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
|
-std=gnu++17 -Og -ggdb
|
||||||
-Wall -Wextra
|
-Wall -Wextra
|
||||||
-Wno-unused-parameter -Wno-sign-compare -Wno-missing-braces
|
-Wno-unused-parameter -Wno-sign-compare -Wno-missing-braces
|
||||||
@@ -272,6 +257,27 @@ lib_deps = Unity
|
|||||||
test_testing_command =
|
test_testing_command =
|
||||||
${platformio.build_dir}/${this.__env__}/program
|
${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
|
; Modbus
|
||||||
; Creating the modbus registers is a multi-step process. Before it was in a shell script called generate_csv_and_headers.sh
|
; 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:
|
; but now moved to pio so everything is in python and cross-platform. The logic is as follows:
|
||||||
|
|||||||
Reference in New Issue
Block a user