32 Commits

Author SHA1 Message Date
Maxim Prokhorov
c5a0b5f23f build(scripts): allow to generate compile_commands.json with everything enabled 2025-06-24 23:55:41 +03:00
Maxim Prokhorov
b3bc053e52 pio: workaround py3.12+ syntax warnings
core 2.7.4 elf2bin patches w/ subprocess.run
temporary workaround for -latest, pending 3.2.0 release
2024-08-24 00:50:06 +03:00
Maxim Prokhorov
d292f32a99 pio: dep and preprocess helper target
drop sideeffect dependency in favour of a direct one
build both .d and .E, for .o and preprocessor deps respectively
2024-07-25 21:31:59 +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
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
ac14cbca4f pio: .gz and two-step hint on upload target 2022-09-23 05:04:26 +03:00
Maxim Prokhorov
d2e0bd9ac5 pio: update formatting 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
74ce4d974d pio: update formatting 2022-08-30 03:18:11 +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
Maxim Prokhorov
57f04023d4 pio: major version option renames 2022-05-05 20:02:35 +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
d36127963c scripts: comments 2021-06-09 12:45:14 +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
Maxim Prokhorov
3a34d555d5 ci: don't mention travis 2021-01-14 18:11:14 +03:00
Max Prokhorov
1d957506b3 PIO: remove Arduino Core 2.3.0 support (#2333)
As this is no longer an option since PIO 4.4.0
ref.
04694b4126
https://docs.platformio.org/en/latest/core/history.html

*...I have known you for so long
When we ran in circles...*
2020-08-22 01:36:44 +03:00
Rui Marinho
6266930a4d sns: Add BME680 (#2295)
Add support for BME680 using libalgobsec proprietary algorithms for precise Indoor Air Quality (IAQ) measurement. Unlike traditional CO2 sensors - and good ones are expensive - it measures nearly all VOCs compounds in the air (plus other gases) and compensates those measurements with its built-in temperature and humidity sensors to determine indoor air quality.

Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
2020-08-02 09:12:38 +03:00
Max Prokhorov
edb23dbfc4 Convert .ino -> .cpp (#2228)
- general conversion from .ino modules into a separate .cpp files
- clean-up internal headers, place libraries into .h. guard .cpp with _SUPPORT flags 
- fix some instances of shared variables instead of public methods
- tweak build system to still build a single source file via os environment variable ESPURNA_BUILD_SINGLE_SOURCE
2020-04-30 13:55:07 +03:00
Maxim Prokhorov
492a35926f ci: rework build.sh & release.sh generator
- don't depend on TRAVIS environment variables
- depend on CI flag to add release variables
- chmod +x
2020-04-08 23:28:43 +03:00
Max Prokhorov
db50be91bc PIO: fix env definitions (again) (#2212)
* base envs

* CI: speed up release process (since we still want some .bin files)

* fixup! CI: speed up release process (since we still want some .bin files)

* release dry run

* fixup! release dry run

* adjust

* fix .bin name

* it works

* minor cleanup for current git

* use pio suggestion about ldscript, reduce build_flags impact

* fix linker

* parse ${vars} instead of ignoring them

* add filtering and override file (sneak peak into tasmota's pio config)

* don't generate secure client (for now)

* formatting

* codacy
2020-04-07 21:20:32 +03:00
Max Prokhorov
a4d4231ae0 PIO: remove -ota envs, handle OTA condition in extra script (#2099)
* PIO: remove -ota envs, handle OTA condition in extra script
* Tweak ESPURNA_BOARD variable
* Support git and latest in ota script
* Handle ESPURNA_FLAGS too
* Try to handle env and projenv in pylint
* Add deprecation comment about -ota envs
* regen arduino.h
2020-01-20 17:41:10 +03:00
Max Prokhorov
f743ca4c6c Reword comments regarding 2.4.0 (#2024) 2019-11-28 19:47:31 +03:00
Max Prokhorov
c18490cc4a PIO: pass APP_REVISION via extra scripts (#1946)
* utils/version: use git description token as version, add memoization

* pio: move extra scripts to a separate directory

* pio: add -DAPP_REVISION=... as local build flag
2019-10-16 14:41:43 +03:00