This package is part of php-baremetal.
ext-hello is a demo. It adds one function, bm_hello(), which returns a fixed greeting, and does
nothing else. It exists for two reasons:
- to check a project: if
bm_hello()works on the board, your firmware project picks up the packages it requires, builds them in and runs your script; - as the smallest example of an extension package: one C file and a
composer.json, with nothing else in the way.
It touches no hardware and needs no other package, so it works on any platform your project targets.
Require it while setting up a new firmware project, or when a package you required does not show up and you want to know whether the problem is that package or the project. Remove it once the project works: it adds nothing a real firmware needs.
composer require php-baremetal/ext-helloThe project must use the php-baremetal build plugin (php-baremetal/conductor), which every
php-baremetal firmware already has. Rebuild and flash after requiring it.
<?php
echo bm_hello(), "\n"; // hello from ext-hello packageThe output appears on the board's serial console.
- Overview: what the demo is, install, the API at a glance.
- PHP API:
bm_hello()and how to check that the extension is built in. - Check that a package is built in: use the demo to verify a project.
See CHANGELOG.md.
AI is used as a tool here, on top of human engineering. The architecture, the design decisions and the hardware bring-up are done by hand. AI mostly helps with the documentation and with mechanical work that can be verified. The full policy, including what is expected of contributions made with AI, is in AI_USAGE.md.
Not for you? No worries at all. Nobody is forcing it on you, and a free, open-source project you didn't spend a minute or a cent on owes you no explanation anyway. Take it or leave it, no hard feelings.
And for everyone who's on board: when contributing, please follow the guidelines in AI_USAGE.md. Thanks!
MIT. See LICENSE.