Commit Graph

52 Commits

Author SHA1 Message Date
WillyJL
ecb7bc881f FBT: Fix redundant decl for apps using an icon disabled in API 2025-07-31 22:05:35 +02:00
WillyJL
3ef283824d FBT: Optimize icons blob -4KB DFU, scrub unused icons (#291)
* Unused icons to check later

* Exclude disabled icons from firmware

* Format

* Also report free flash in gh comment

* Fix free flash calc

* Fix?

* Fix??

* Split to next line

* Remove dead icons

* Some spring cleaning of icons cooker

* Improve unused icons script

* Disable icons that cant be used in asset packs

* These will need a workaround for external

* Revert "These will need a workaround for external"

This reverts commit fb23d97952.

* Here's the workaround: split assets lib

now there is "assets" and "fwassets"

firmware links with fwassets and includes all icons
however not all of them are exposed to api

if an app needs a firmware icon not in api, it can use fap_libs=["assets"]
this will link against this dummy assets lib
it only contains the icons that arent exposed to api

this way, an app using assets lib will still benefit from asset packs
but at same time, we can remove pointless icons from dfu blob

* Update changelog
2024-11-05 08:32:24 +01:00
Willy-JL
0d6312d097 Change asset pack icons logging to info 2024-10-07 04:09:49 +01:00
WillyJL
aa6d4de9fe Asset Packs: Optimize icon loader (#164)
* Original pointer can be const

* Back to const icons

* Missed this one

* Simpler string alloc

* Single allocation and header struct for static icons

* Shared allocation and meta struct for animated icons

* Only try to load if dir exists

* Restructure momentum lib

* Use some internal headers

* Swap icons at draw

* Properly init and free, no more original in icon struct
2024-07-18 03:35:21 +01:00
Willy-JL
d9f55d110d Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev 2024-05-21 04:56:03 +01:00
hedger
9e42e00ead Icons: compression fixes & larger dimension support (#3564)
* toolbox, gui: fixes for compressed icon handling
* ufbt: fixes for generated vscode project
* scripts: increased max dimensions for image converter
* icon type changes
* linter fixes; api sync
* gui: docs fix
* toolbox: fixed potential decoder buffer overflow
* minor cleanup
* fbt: sdk: suppressed deprecation warnings in API table
* toolbox: compress: added unit tests
   vscode: now installs resources for unit_tests
   unit_tests: now loads subghz region data
* toolbox: compress: review fixes, pt 1
* compress: now passes decoder buffer size as constructor argument; auto-resize decoder buffer; crash on failed icon decompression
* PVS fixes
* pvs fixes, pt2
* doxygen fixes
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* UnitTests: move all tests into plugins, brakes testing
* UnitTests: add plugin API and update plugin entrypoints
* UniTests: Test runner that works with plugins
* fbt: extra filtering for extapps to include in build
* UnitTests: filter tests by name
* loader: restored API table for unit_test build config
* Add various missing symbols to API table
* UnitTest: fail on plugin load error
* UnitTests: cleanup plugin api and reporting
* unit_tests: composite resolver
* UnitTests: remove unused declaration
* unit_tests, nfc: moved mock nfc implementation to libnfc
* unit_tests: api: removed redundant #define
* toolbox: compress: removed size_hint for icons; triggering furi_check on oversized icons
* gui: icon, icon_animation: removed size hit APIs
* Format Sources. Cleanup code.
* loader: refuse to start .fal as app
* toolbox: compress: fixed memory corruption in operations with small destination buffer; added unit tests for that case
* unit_tests: proper test skipping; better selective test interface
* unit_tests: moved 'loading' logging to proper location

Co-authored-by: あく <alleteam@gmail.com>
2024-05-20 18:23:47 +01:00
Willy-JL
ff36de9a47 Fix assets in UFBT SDK 2024-03-13 00:34:27 +00:00
Willy-JL
6531104ee0 Improve logic in FBT asset pack support 2024-03-01 06:13:44 +00:00
Willy-JL
85deae6bcf FBT auto prioritize system icons in apps 2024-02-17 00:42:07 +00:00
Willy-JL
5181f4878d Fix font descent parsing and re-enable icons in debug 2024-02-09 19:32:59 +00:00
Willy-JL
b4695ef0aa More space efficient icon paths list 2024-02-09 16:48:09 +00:00
Willy-JL
5ea2c9799b Trace and Icons not essential in debug builds 2024-02-09 01:37:16 +00:00
Willy-JL
4ce344ff82 Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into dev 2024-01-13 02:36:39 +00:00
hedger
0789cbdefa assets: checking limits on image size; ufbt: cdb target (#3359)
* scripts: assets: checking limits on image size
* ufbt: added "cdb" target for regenerating; also generating cdb on "vscode_dist"
* fbt: now also creating cdb for vscode_dist

Co-authored-by: あく <alleteam@gmail.com>
2024-01-12 17:58:37 +09:00
Willy-JL
d5f1d0bf02 Format 2023-11-12 12:27:49 +00:00
Willy-JL
94efe04132 Refactor asset packs to build properly with fbt 2023-11-12 05:39:24 +00:00
Willy-JL
418f44fef1 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2023-11-12 02:56:30 +00:00
hedger
917410a0a8 [FL-3629] fbt: reworked assets & resources handling (#3160)
* fbt: reworking targets & assets handling WIP
* fbt: dist fixes
* fbt: moved SD card resources to owning apps
* unit_tests: moved resources to app folder
* github: updated unit_tests paths
* github: packaging fixes
* unit_tests: fixes
* fbt: assets: internal cleanup
* fbt: reworked assets handling
* github: unit_tests: reintroducing fixes
* minor cleanup
* fbt: naming changes to reflect private nature of scons tools
* fbt: resources: fixed dist archive paths
* docs: updated paths
* docs: updated more paths
* docs: included "resources" parameter in app manifest docs; updated assets readme
* updated gitignore for assets
* github: updated action versions
* unit_tests: restored timeout; scripts: assets: logging changes
* gh: don't upload desktop animations for unit test run

Co-authored-by: あく <alleteam@gmail.com>
2023-10-31 00:17:30 +09:00
ClaraCrazy
3264c37e5b Migrate asset packs folder 2023-07-24 13:54:32 +02:00
Willy-JL
84888975a0 Format 2023-05-21 21:18:40 +01:00
Willy-JL
20f55c956e Icons go brrr 2023-05-21 20:42:09 +01:00
Willy-JL
79f36c2297 Swap assets system-wide 2023-05-20 21:20:14 +01:00
Willy-JL
ee0212d05d Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev 2023-05-10 15:59:20 +01:00
hedger
268b88be0d [FL-3285] Removed STM32CubeWB module (#2608)
* libs: removed STM32CubeWB module; split cube into 3 submodules
* fixed f18 version
* fbt: options: fixed expected stack version
* pvs: updated for new paths
* fbt: ep: multithreaded submodule update
* libs: stm32cubewb: fixed duplicate include path; renamed to stm32wb; codeowners: updated paths; docs: updated paths
* pvs: updated paths
* libs: added cmsis_core from ARM sources, v.5.4.0, from https://github.com/ARM-software/CMSIS_5/tree/develop/CMSIS/Core/Include
* Updated stm32wb_copro structure
* PVS: exclude cmsis core from analysis

---------

Co-authored-by: あく <alleteam@gmail.com>
2023-05-09 06:30:33 +09:00
Willy-JL
22e0d83ab7 Merge branch 'ofw-dev' into xfw-dev 2023-05-04 01:42:30 +01:00
hedger
c3ececcf96 [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601)
* ufbt: added "dolphin_ext" target (expects "external" subfolder in cwd with dolphin assets); cleaned up unused code
* ufbt: codestyle fixes
* scripts: fixed style according to ruff linter
* scripts: additional cleanup & codestyle fixes
* github: pass target hw code when installing local SDK with ufbt
* ufbt: added error message for missing folder in dolphin builder
* scripts: more linter fixes
* sdk: added flipper_format_stream; ufbt: support for --extra-define
* fbt: reduced amount of global defines
* scripts, fbt: rearranged imports

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-05-03 14:48:49 +09:00
Willy-JL
fa8ed7f6e4 Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware 2023-02-28 20:34:44 +00:00
Willy-JL
6555082e2a Revert "Merge branch 'dev' of https://github.com/ClaraCrazy/Flipper-Xtreme into dev"
This reverts commit 708dd167c8.
2023-02-10 20:50:30 +00:00
VerstreuteSeele
708dd167c8 Merge branch 'dev' of https://github.com/ClaraCrazy/Flipper-Xtreme into dev 2023-02-10 17:36:22 +01:00
Willy-JL
955e16b0ef Move NSFW mode to an asset pack 2023-02-10 03:14:40 +00:00
Willy-JL
e33023463a Format 2023-02-02 21:38:45 +00:00
Willy-JL
542b4a4cd9 Add asset pack scripts 2023-01-20 03:26:17 +00:00
Willy-JL
95552f536e Fix animation pathing 2023-01-20 03:01:10 +00:00
Willy-JL
a1fac3eb95 Use pathlib for assets, fix build on linux 2023-01-14 17:49:39 +00:00
VerstreuteSeele
33c6f8356b wayy better 2023-01-10 01:16:48 +01:00
VerstreuteSeele
7f594fd4ea bit cleaner now 2023-01-10 00:55:45 +01:00
VerstreuteSeele
1a23515ebd fixing things 2023-01-10 00:23:50 +01:00
VerstreuteSeele
c1921c96a6 Compiler part done 2023-01-09 05:26:22 +01:00
hedger
9bf11d9fd2 [FL-2859,2838] fbt: improvements for FAPs (#1813)
* fbt: assets builder for apps WIP
* fbt: automatically building private fap assets
* docs: details on how to use image assets
* fbt: renamed fap_assets -> fap_icons
* fbt: support for fap_extbuild field
* docs: info on fap_extbuild
* fbt: added --proxy-env parame ter
* fbt: made firmware_cdb & updater_cdb targets always available
* fbt: renamed fap_icons -> fap_icon_assets
* fbt: deprecated firmware_* target names for faps; new alias is "fap_APPID"
* fbt: changed intermediate file locations for external apps
* fbt: support for fap_private_libs; docs: updates
* restored mbedtls as global lib
* scripts: lint.py: skip "lib" subfolder
* fbt: Sanity checks for building advanced faps as part of fw
* docs: info on fap_private_libs; fbt: optimized *.fam indexing
* fbt: cleanup; samples: added sample_icons app
* fbt: moved example app to applications/examples
* linter fix
* docs: readme fixes
* added applications/examples/application.fam stub
* docs: more info on private libs

Co-authored-by: あく <alleteam@gmail.com>
2022-10-06 22:55:57 +09:00
hedger
76d38e832e fbt: reproducible manifest builds & improvements (#1801)
* fbt: reproducible manifest builds, less rebuild on small updates; scripts: assets: using timestamp from commandline af available
* fbt: added app import validation for launch_app & single app build targets
* fbt: COMSTR for app imports validation
* docs: minor fixes
* docs: markdown fix
* vscode: comments for RTOS startup

Co-authored-by: あく <alleteam@gmail.com>
2022-09-29 20:00:22 +09:00
Vyacheslav Tumanov
e25b424188 Typos fix in some strings/comments #1794
Co-authored-by: あく <alleteam@gmail.com>
2022-09-29 01:52:46 +09:00
SG
b9a766d909 [FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages)
* Added plugin_dist target for fbt to build FAPs
* All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default
* Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them
* Added debugging support for FAPs with fbt debug & VSCode
* Added public firmware API with automated versioning

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-09-15 02:21:03 +09:00
hedger
f3b1475ede [FL-2052] New build system based on scons (#1269) 2022-06-26 21:00:03 +09:00
hedger
7ce305fca3 [FL-2269] Core2 OTA (#1144)
* C2OTA: wip
* Update Cube to 1.13.3
* Fixed prio
* Functional Core2 updater
* Removed hardware CRC usage; code cleanup & linter fixes
* Moved hardcoded stack params to copro.mk
* Fixing CI bundling of core2 fw
* Removed last traces of hardcoded radio stack
* OB processing draft
* Python scripts cleanup
* Support for comments in ob data
* Sacrificed SD card icon in favor of faster update. Waiting for Storage fix
* Additional handling for OB mismatched values
* Description for new furi_hal apis; spelling fixes
* Rework of OB write, WIP
* Properly restarting OB verification loop
* Split update_task_workers.c
* Checking OBs after enabling post-update mode
* Moved OB verification before flashing
* Removed ob.data for custom stacks
* Fixed progress calculation for OB
* Removed unnecessary OB mask cast

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-04-27 18:53:48 +03:00
hedger
57312961e8 [FL-2481] Renamed assets->resources; enforcing Manifest build if it does not exist (#1135)
* Renamed assets->resources; enforcing Manifest build if it does not exist
* Rebuild resources from CI
* Added Manifest to repo - be sure to rebuild it with `make -C assets` before committing changes!
* Actually added Manifest.
* Keeping Manifest on assets clean
* Spelling fix in Makefile
2022-04-19 22:02:37 +03:00
あく
939998a8c8 Release Candidate 0.48.0 Bug Fixes (#991)
* Power: wait a little bit till message displayed on screen when executing power off. FuriCore: do not use bkpt in release builds(causing HardFault when SPI is active).
* Cleanup BSS section: add more consty consts to be more constish.
* Desktop: properly handle autostarted applications.
2022-02-13 22:24:03 +03:00
Albert Kharisov
84410c83b5 [FL-2183] [FL-2209] Dolphin Deeds, Level up, assets generation, refactoring (#965)
* Desktop: cleanup headers
* Get loader pubsub via record
* [FL-2183] Dolphin refactoring 2022.01
* Restruct animations assets structure
* Rename assets
* Cleanup headers
* Update Recording animation
* Add BadBattery animation
* Provide loader's pubsub via record
* Fix load/unload animations
* Scripts: add flipper format support, initial dolphin packager rework. Assets: internal and external dolphin.
* Sync internal meta.txt and manifest.txt
* Reorder, rename dolphin assets
* Split essential generated assets
* Add ReadMe for dolphin assets
* Separate essential blocking animations
* Scripts: full dolphin validation before packaging
* Assets, Scripts: dolphin external resources packer
* Github: update codeowners
* Scripts: proper slots handling in dolphin animation meta
* Scripts: correct frames enumeration and fix compiled assets.
* [FL-2209] Add Dolphin Deeds points and many more
* Remove excess frame_rate
* Change dolphin assets directory
* Scripts: add internal resource support to dolphin compiler
* Scripts: add internal assets generation, renaming
* Scripts: correct assert, renaming
* Code cleanup, documentation, fixes
* Update Levelup animations
* Rename essential -> blocking
* Fix Unlocked hint
* Scripts: rewrite Templite compiller, replace regexps with token parser, split block types into code and variable blocks. Update dolphin templates.
* Documentation: add key combos description and use information
* Scripts: cleanup templit, more debug info and add dev comment

Co-authored-by: あく <alleteam@gmail.com>
2022-01-29 12:20:41 +03:00
Albert Kharisov
a39002ce22 [FL-2150] Dolphin animation refactoring (#938)
* Dolphin Animation Refactoring, part 1
* Remove animations from desktop
* Remove excess, first start
* Split animation_manager with callbacks
* allocate view inside animation_view
* Work on ViewComposed
* Draw white rectangles under bubble corners
* Fix bubbles sequence
* RPC: remove obsolete include "status.pb.h"
* Add animations manifest decoding
* Flipper file: add strict mode
* FFF: Animation structures parsing
* Assembling structure of animation
* Lot of view fixes:
  Add multi-line bubbles
  Add support for passive bubbles (frame_order values starts from passive now)
  Add hard-coded delay (active_shift) for active state enabling
  Fix active state handling
  Fix leaks
  Fix parsing uncorrect bubble_animation meta file
  Fix bubble rules of showing
* Animation load/unload & view freeze/unfreeze
* Blocking & system animations, fixes:
  View correct activation
  Refactoring + blocking animation
  Freeze first passive/active frames
  Many insert/eject SD tests fixes
  Add system animations
  Add Loader events app started/finished
  Add system no_sd animation
* Assets: dolphin packer. Scripts: minor refactoring.
* Desktop: update logging tags. Scripts: add metadata to dolphin bundling process, extra sorting for fs traversing. Make: phony assets rules.
* Github: rebuild assets on build
* Docker: add missing dependencies for assets compilation
* Docker: fix run command syntax
* ReadMe: update naming rules with link to source
* Assets: recompile icons
* Loader: add loader event
* Desktop, Gui, Furi Core: const shenanigans macros

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-01-03 00:39:56 +03:00
gornekich
827d99dde3 [FL-1922] Assets compression (#773)
* lib: add heatshrink compress library
* canvas: new icons format
* scripts: add icons compression to assets generation script
* assets: update assets
* furi-hal: introduce furi-hal-compress
* canvas: rework icon drawing with furi-hal-compress
* lib: rework heatshrink lib for dynamic buffer allocation API
* furi-hal-compress: add encode and decode API
* furi-hal-compress: working decode
* furi-hal-compress: support f6 target
* scripts: format sources
* furi-hal-compress: fix incorrect encoder reset
* furi-hal: add compress initialization to f6 target

Co-authored-by: あく <alleteam@gmail.com>
2021-10-21 17:46:36 +03:00
あく
4456982e27 [FL-1699, FL-1700] Scripts: new radio firmware bundling scheme, manifest for resources. (#700)
* Scripts: new radio firmware bundling scheme, manifest for resources.
* Scripts: add destination address for copro binaries.
* Bootloader: update linker scripts
* Scripts: resource manifest FsTree.
2021-09-13 12:52:50 +03:00