Skip to content

Conversation

hedger
Copy link
Member

@hedger hedger commented Feb 22, 2025

What's new

  • libs: stricter constness for saving RAM by using .rodata section (thus, flash memory) for object storage;
  • hal: made FuriHalSpiBusHandle, FuriHalI2cBusHandle const across API methods
  • fbt: sdk: fixed signature generation for types with nested constness
  • saves about 1K RAM in release builds - see size report for details
f7
this branch
	.data            796 (  0.78 K)
dev
	.data           1776 (  1.73 K)

sidenote: furi_hal_usb_set_state_callback future?

Verification

  • Build, flash, everything should work - no functional changes

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

…k: fixed signature generation for nested const params
@hedger hedger added Build System & Scripts fbt, scripts and toolchain-related Core+Services HAL, furi & core system services labels Feb 22, 2025
Copy link

github-actions bot commented Feb 22, 2025

Compiled f7 firmware for commit 4c4a253f:

@hedger hedger marked this pull request as draft February 22, 2025 19:25
@hedger hedger marked this pull request as ready for review February 22, 2025 19:53
@hedger hedger merged commit 5fcaef2 into dev Mar 31, 2025
10 of 11 checks passed
@hedger hedger deleted the hedger/more-constness branch March 31, 2025 15:23
hedger added a commit to RebornedBrain/flipperzero-firmware that referenced this pull request Apr 5, 2025
* libs: stricter constness for saving RAM with .rodata section; fbt: sdk: fixed signature generation for nested const params

* hal: additional fixes for constness in USB subsystem

* debug apps: additional usb-related fixes

* mjs: more consts for token parser

* fatfs: const driver struct

* hal: more consts for ble & nfc vars

* hal: made FuriHalSpiBusHandle static

* hal: made FuriHalI2cBusHandle static

* usb: restored previous api

* linter fixes

* API fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build System & Scripts fbt, scripts and toolchain-related Core+Services HAL, furi & core system services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants