Skip to content

v1.5.0

Latest

Choose a tag to compare

@GianfriAur GianfriAur released this 06 Oct 09:22
· 8 commits to master since this release
829c87c

[1.5.0] - Power Save, Watch Button, Product Protection

Added

  • secure — Flash Encryption. secure = true encrypts the flash so a dump can't reveal the baked PHP
    source or the .env (they come out as ciphertext). It marks the embedded storage partition encrypted
    (data partitions aren't by default) and turns on Flash Encryption (development mode) in the firmware's
    sdkconfig; the .env, already inside the app image, is covered automatically.
    Protect your product.
  • secure_boot — Secure Boot v2. secure_boot = true makes the chip boot only firmware signed with
    your key. phpflash build provisions one signing key per unit at deploys/<MAC>.pem (optional
    secure_boot_keys_dir, default ./deploys) generated, 600
    Signature verified successfully. Example: secure-boot.
  • phpflash flash handles encrypted boards. It detects a chip with Flash Encryption burned and switches
    to encrypted-flash on its own, so the one command works before and after a chip is protected — no manual
    esptool --encrypt or offset juggling.
  • phpflash discover reports the protection state. It reads the eFuses and prints Flash encryption and
    Secure boot as enabled / not set.
  • power_save — automatic light sleep. power_save = true makes the event-driven reactor light-sleep
    between events on its own (RAM retained, instant wake), no sleep code in PHP; power_hold() /
    power_release() bracket a stretch that must stay awake. On a bare S3-Zero idle fell to ~0.95 mA (from
    ~49 mA active). See Power save; example: power-save.
  • I²C bus ownership on core 1. new I2cBus(..., I2cBus::CORE1) runs blocking transactions on the
    core-1 executor over an intent queue, off the PHP core (default I2cBus::SYNC unchanged). Example:
    i2c-core1.
  • MMC5603 magnetometer + Baremetal\Sensor\Magnetometer capability: mag(), heading(), temperature.
    Example: mmc5603.
  • PCF85063 RTC driver — now() / set() (BCD at 0x51). Example: rtc-pcf85063.
  • watch_button() — GPIO button gestures (pressed/released/held/click/repeat/double) with
    debounce and timing in C; button_sampling(false) pauses the sampler before a light sleep. watch_gpio
    stays for the plain falling-edge case.
  • St77916::wake() — re-inits the panel (reset, init, orientation) after light sleep disturbs the QSPI
    lines; call it, then repaint.