Skip to content
php-baremetalPublic

About

Demo extension: bm_hello() only, no dependencies.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ext-hello

This package is part of php-baremetal.

What it is for

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.

When to use it

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.

Install

composer require php-baremetal/ext-hello

The project must use the php-baremetal build plugin (php-baremetal/conductor), which every php-baremetal firmware already has. Rebuild and flash after requiring it.

Example

<?php
echo bm_hello(), "\n";   // hello from ext-hello package

The output appears on the board's serial console.

Documentation

Changelog

See CHANGELOG.md.

AI usage

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!

License

MIT. See LICENSE.

About

Demo extension: bm_hello() only, no dependencies.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages