71 Commits

Author SHA1 Message Date
Maxim Prokhorov
e529e38ec6 pio: update for re2c 3.0 and fix exit handling 2024-05-16 00:04:00 +03:00
Maxim Prokhorov
be74757710 scripts: no need for pytz to generate tz list 2023-10-17 03:43:30 +03:00
Maxim Prokhorov
26fc2abc88 pio: typo
(redraw)
2023-03-27 19:29:02 +03:00
Maxim Prokhorov
bcb6f6b2d4 pio: missing default env value 2023-03-27 19:20:20 +03:00
Maxim Prokhorov
cfab435275 pio: experiment with cachedir 2023-03-27 19:12:27 +03:00
Maxim Prokhorov
e2c8dd7be1 pio: fix dependencies generator
`-mD` is not an option...

`-M -MF $file` can be used together with `-E` to generate a small
makefile-like generator (does not include any compiler flags!) for the
target file so we know which files it would use during compilation
2023-01-17 06:25:53 +03:00
Max Prokhorov
d141a3e5b3 pio: conditional for preprocess target 2023-01-13 06:28:22 +03:00
Maxim Prokhorov
579a5b239b pio: helper to build single-source .E 2023-01-13 02:42:34 +03:00
Maxim Prokhorov
fb21386de5 test: warning fixes 2023-01-11 06:08:53 +03:00
Maxim Prokhorov
5a74dc146e doc: simple offsets with generic syntax
same as original fix for the Core
fix footer into a single line and add UTC alias notice
2022-11-25 09:46:38 +03:00
Maxim Prokhorov
70d25aea06 webui: ntp offsets from tzdata/etcetera
refer to our docs for the script output
see #2548
2022-11-17 01:46:51 +03:00
Maxim Prokhorov
360a2f14e7 scripts: update core -> minimal
amend 5bc55cd1a5
2022-09-23 06:09:58 +03:00
Maxim Prokhorov
ac14cbca4f pio: .gz and two-step hint on upload target 2022-09-23 05:04:26 +03:00
Maxim Prokhorov
95e659fa58 decoder: spacing for lines prefixed with (inlined by) 2022-09-21 04:31:20 +03:00
Maxim Prokhorov
d2e0bd9ac5 pio: update formatting 2022-08-31 03:08:30 +03:00
Maxim Prokhorov
5527441d36 pio: cppcheck works with pio-check
https://docs.platformio.org/en/latest/core/userguide/cmd_check.html
2022-08-31 03:08:30 +03:00
Maxim Prokhorov
246364470c ci: compress debug symbols a bit more 2022-08-31 03:08:30 +03:00
Maxim Prokhorov
038f1ffec3 pio: firmware.bin.gz builder 2022-08-31 03:08:30 +03:00
Maxim Prokhorov
d17316f78c pio: fix .bin size check script dependency
cannot depend on checkprogsize, since it depends on .elf and not .bin

also, compare with the block-aligned size
add notes about reserved space

warning might become annoying, though :)
2022-08-31 03:08:06 +03:00
Maxim Prokhorov
e8e9c152e7 pio: missing scripts 2022-08-30 03:22:47 +03:00
Maxim Prokhorov
a6df38e807 pio: stack dump decoder script
from the pending ESP8266 Core PR
2022-08-30 03:18:11 +03:00
Maxim Prokhorov
74ce4d974d pio: update formatting 2022-08-30 03:18:11 +03:00
Maxim Prokhorov
c0e74e431d pio: prettier file size output 2022-08-30 03:18:07 +03:00
Maxim Prokhorov
fd249c8055 pio: also hide raw putc function in postmortem
updates scripts to be a post action
rename redefined symbols to stubs
2022-08-30 02:06:30 +03:00
Maxim Prokhorov
6f122f5ecb pio: debug info in distributed builds and build-and-copy fixes
store objcopy of these extra symbols and .map from the linker
distribution will have an extra debug .zip file that could be used with
the exception decoder

also fixes relative paths in the build-and-copy
(although, yet again loses the pio target in the gui)
2022-08-30 01:33:55 +03:00
hamed
660d8c339b sns: add INA219 (current / power monitor)
resolves #2501

Co-Authored-by: Maxim Prokhorov <prokhorov.max@outlook.com>
2022-05-18 21:22:32 +03:00
Maxim Prokhorov
7c2130b722 pio: prune unused libraries from shared_lib_dir 2022-05-06 15:48:16 +03:00
Maxim Prokhorov
57f04023d4 pio: major version option renames 2022-05-05 20:02:35 +03:00
Maxim Prokhorov
5ccc70e42e pio: trying to work out 6.0.0 changes 2022-05-05 17:50:21 +03:00
Maxim Prokhorov
8312f27e4b pio: even shorter suffix for .ipp files
remove .cpp from the resulting suffix, since .ipp already implies it is c++
update comments once again
2021-12-07 01:06:18 +03:00
Maxim Prokhorov
c0c3dcdc1d ir: include typos 2021-11-30 03:20:13 +03:00
Maxim Prokhorov
d40322d98f ci: fix quoting for the test_build -include
amends 79321b6707
otherwise, env.ParseFlags never understands it
2021-11-30 03:17:33 +03:00
Maxim Prokhorov
d094283df2 pio: formatting 2021-11-30 01:28:09 +03:00
Maxim Prokhorov
a7a9c5045f pio: generate .cpp.ipp instead of .cpp.inc
fixes #2479
2021-11-30 00:15:52 +03:00
Maxim Prokhorov
c738b91b6a pio: simplify single-source builder
Generate resulting .cpp in the $BUILD_DIR, no need for atexit
Register middleware only once, there's no need to manually walk the
project directory since fnmatch.fnmatch(...) supports globs

Provide a SCons Action instead of simple function, so there's a way to
generate things on demand via command line
```
$ pio run -e $env -t .pio/build/$env/espurna_single_source/src/main.cpp
```
2021-11-30 00:06:24 +03:00
Maxim Prokhorov
ebc479f145 pio: fix indirect dependency on the build-and-copy .bin 2021-11-29 23:06:25 +03:00
Maxim Prokhorov
79321b6707 ci: directly use the test build headers
- just pass `-include ${cfg}` to the compiler instead of a
  temporary custom.h. also do `-DDEVICE=...` and `-DMANUFACTURER=...`
- rework test_build to print using `logging` module
- report leftover configurations, after the failed one exits
- prettify the output and highlight relevant info instead of the whole lines
2021-11-29 23:06:03 +03:00
Maxim Prokhorov
cf0315c231 scripts: formatting 2021-10-03 20:44:58 +03:00
Maxim Prokhorov
001ec79c8e ir: clean-up and refactoring of the existing module
- provide a queue for the outgoing messages, don't depend on the MQTT
  callback implementation details and always postpone the actual transfer.
- generate user input parsers using re2c, adds special PlatformIO build handlers
- add terminal command to show GPIO info and send a simple payload
- rework button<->action presets into value<->terminal command presets and custom ones
  through the use of `irCmd<VALUE>` settings, where the VALUE is taken from the simple payload
  (yet, it does not understand repeated codes, but that's something to add later *or* use rpnlib)
- add tx message integration for the relay module via `irRelayOn#` and `irRelayOff#`
- rework simple payload to include 'repeats' value for the 'IRsend::send()'
  also adds internal 'series', 'delay' and includes full 64bit 'value'
  (as uppercase HEX, instead of decimal)
- rework raw payload to use 'series' instead of 'repeats', and provide a
  clear distinction between the usec time and the options of the message
  by moving the required options to the front and separating them using ':'
  (just like the simple variant)
- make RX and TX pin a runtime setting, make RX and TX support a build flag
- small test framework to check whether internal string encode<->decode works

Also updates the hexEncode & hexDecode implementations to use
'iterators' instead of just pointer + index.
2021-10-03 20:44:58 +03:00
Maxim Prokhorov
bdd821db86 pio: check returncode of the git process
Since the Popen instance won't do that by itself. Handles the case
where there is `git` command present, but it's not a git repo underneath.
2021-08-17 14:35:20 +03:00
Maxim Prokhorov
cf79259189 ci: release workflow 2021-08-06 14:45:52 +03:00
Maxim Prokhorov
bacff3102d pio: make sure "y" for shared libs still works
And update other options to support y, yes and true
2021-06-20 17:41:46 +03:00
Maxim Prokhorov
f18f128e4b pio: consistent shared libs location
Do not install libraries globally in CI, use the specified PIO .ini option.
Similar to the other package installers, prefer package cache to the actual library storage contents.
2021-06-19 12:52:10 +03:00
Maxim Prokhorov
a1e7941fa6 scripts: some more Core version fixes
Remove 2.3.0 code for ldscripts
Update
2021-06-18 12:12:08 +03:00
Maxim Prokhorov
d36127963c scripts: comments 2021-06-09 12:45:14 +03:00
Maxim Prokhorov
75b51f1e80 scripts: restore old build.sh and fixup release.sh generator
Leave build.sh as a local script, assume that CI will use the release.sh instead
Generator parser returned None at the end (...this is not rust...), also
fix args.* typos with a more declarative structure.
2021-06-08 13:22:25 +03:00
Maxim Prokhorov
4c33cacfdb pio: add build-and-copy, more configuration options for version
Multiple ways to specify version string through environment variables:
- `ESPURNA_BUILD_FULL_VERSION` to set full version string
By default it is empty, and the version is combined using the values specified below
- `ESPURNA_BUILD_VERSION` to modify the first part of the version string (1.15.0-dev)
By default, uses espurna/config/version.h APP_VERSION value
- `ESPURNA_BUILD_REVISION` to specify revision part of the version string
For example 12345678, which is expanded as either .git12345678 or -git12345678
(depending on whether the version string contains hyphen)
By default, use git to retrieve the first 8 characters of the current HEAD SHA value
- `ESPURNA_BUILD_VERSION_SUFFIX` to specify build metadata part of the string
For example nightly20210607, which is added to the full version as 1.15.0-dev+nightly20210607
Empty by defauld

Adds -t build-and-copy which uses the values above to copy firmware.bin, configurable with:
- `ESPURNA_BUILD_NAME` to set the suffix of the filename.
By default, uses the $PIOENV (aka the string after the env: in the .ini file)
- `ESPURNA_BUILD_DESTINATION` to specify where to copy the .bin files
By default, uses $PROJECT_DIR

Resulting file is stored at:
${ESPURNA_BUILD_DESTINATION}/${ESPURNA_BUILD_FULL_VERSION}/espurna-${ESPURNA_BUILD_FULL_VERSION}-${ESPURNA_BUILD_NAME}.bin

In addition, modify generate_release_sh.py to use the new environment variables.
2021-06-07 03:54:28 +03:00
Maxim Prokhorov
1ed00f5768 pio: make sure the .map path is properly quoted
fix #2435
2021-04-12 01:56:27 +03:00
Maxim Prokhorov
21794b7892 pio: create .map file for the resulting .elf 2021-04-07 03:53:40 +03:00
Rui Marinho
bfa704c2fd sns: remove need to patch bme680 static library (#2429)
Upstream released a version of their proprietary library which does not require any modification to the linker script.
2021-03-31 08:48:09 +03:00