Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system: allow easy solidification of external Berry #21430

Merged
merged 3 commits into from
May 24, 2024

Conversation

Staars
Copy link
Contributor

@Staars Staars commented May 17, 2024

Description:

Addition to the build scripts, that makes it fairly easy to solidify external Berry code into the firmware image.

Provided Berry files must contain only 1 module or 1 class. Otherwise this will lead to undefined behaviour.

Typical use case should be to host specialised code for certain device in a GH repo, but any open or private http server will be fine.

Usage:
Add entry custom_berry_solidify to a build environment with one or many Berry files - one per line.
Example:

custom_berry_solidify   = https://raw.githubusercontent.com/Staars/berry-examples/main/led/ulanzi_matrix_screen.be
                          https://raw.githubusercontent.com/Staars/berry-examples/main/led/u_anim.be
                          https://raw.githubusercontent.com/Staars/berry-examples/main/blescan.be
                          https://raw.githubusercontent.com/Staars/berry-examples/main/gpio/ulanzi_rtttl.be

Then just build as usual.

These files must be written in compatible way to be solidified, which is non trivial and out of the scope of this explanation.


Besides other things the name of the module or class must be declared with a special meta comment, which is already used in Tasmotas embedded Berry code:

#@ solidify:class_name
or
#@ solidify:module_name

It is recommended to run a clean after compilation, as the source code in the lib folder will temporarily be modified - but not much. This is meant mainly in the context of development to avoid unwanted GIT actions.

Currently Windows does not support solidification.
@arendst @s-hadinger
We can leave this PR open until we are sure how to handle the Windows problem. I can turn it off for Windows to avoid user confusion.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.6
  • The code change is tested and works with Tasmota core ESP32 V.3.0.0
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@s-hadinger
Copy link
Collaborator

Thanks. Let's try as is

@s-hadinger s-hadinger merged commit e5521bb into arendst:development May 24, 2024
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants