Commit graph

105 commits

Author SHA1 Message Date
MX
306e34c64b
Merge remote-tracking branch 'OFW/dev' into dev 2024-10-07 04:47:24 +03:00
あく
0469ef0e55
FuriHal, drivers: rework gauge initialization routine (#3912)
* FuriHal, drivers: rework gauge initialization, ensure that we can recover from any kind of internal/external issue
* Make PVS happy
* Format sources
* bq27220: add gaps injection into write operations
* Drivers: bq27220 cleanup and various fixes
* Drivers: bq27220 verbose logging and full access routine fix
* Drivers: better cfg mode exit handling in bq27220 driver
* Drivers: rewrite bq27220 based on bqstudio+ev2400, experiments and guessing. Fixes all known issues.
* PVS: hello license check
* Drivers: minimize reset count in bq27220 init sequence
* Drivers: bq27220 hide debug logging, reorganize routine to ensure predictable result and minimum amount of interaction with gauge, add documentation and notes.
* Drivers: more reliable bq27220_full_access routine
* Drivers: replace some warning with error in bq27220
* Drivers: move static asserts to headers in bq27220
* Fix PVS warnings
* Drivers: simplify logic in bq27220

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-10-06 22:36:05 +04:00
MX
56530ee61c
Merge remote-tracking branch 'OFW/dev' into dev 2024-09-05 22:10:41 +03:00
Georgii Surkov
fa2d611652
[FL-3889] 5V on GPIO control for ext. modules (#3830)
* Make file extensions case-insensitive
* Bump protobuf version
* Add support for 5V control via RPC
* Add support for 5V control via Expansion protocol
* Update running instructions
* Update expansion module documentation
* Prettify condition
* Test RPC OTG control as well
* Assets: bump protobuf version
* Disable PVS license expiration check, fix PVS warnings

Co-authored-by: あく <alleteam@gmail.com>
2024-09-05 15:40:14 +01:00
MX
a7ca56cf4e
Merge remote-tracking branch 'OFW/dev' into dev 2024-07-07 02:22:08 +03:00
hedger
7879876ba1
[FL-3863] toolchain: v37 (#3746)
* toolchain: v36
* toolchain: fixed cert path; lib: nanopb: updated to 0.4.8
* fbtenv: rolled back cert path for 3.11
* clang-format: updated config for v18
* linter fixes
* clang-format: properly regenerated config (`clang-format -style=file:.clang-format -dump-config > .clang-format-new; mv .clang-format-new .clang-format`)
* clang-format: AllowShortLoopsOnASingleLine: false
* toolchain: v37
* fbt: compilation_db.py: fixes for Windows
2024-07-05 18:27:21 +01:00
MX
181c59b30f
Merge remote-tracking branch 'OFW/dev' into dev 2024-06-10 22:55:02 +03:00
あく
0bc400a3ae
Code Cleanup: unused includes, useless checks, unused variables, etc... (#3696)
* Remove unnecessary checks
* Sublime: never insert missing headers
* Cleanup furi defines use
* Cleanup startup. Cleanup linker scripts. Explicitly define all interrupts hadlers, including uninmplemented one.
* Startup routine in C
* Drop assembler startup
* Move linker defines to stm32wb55_linker.h, cleanup naming, unify usage. Mpu: protect last 32b of main stack. Document various obscure things.
* Move furi_hal_switch documentation to appropriate place, use 0x0 for updater jump.
* UnitTests: move all temporary test files into tmp folder

---------

Co-authored-by: SG <who.just.the.doctor@gmail.com>
2024-06-11 03:04:29 +10:00
MX
4b5e7d90d6
Merge remote-tracking branch 'OFW/dev' into dev 2024-06-01 16:55:04 +03:00
hedger
c93d164785
fbt, vscode: tweaks for cdb generation for clangd (#3680)
* fbt, vscode: tweaks for cdb generation for clangd
* .clangd: updated config
* vscode: disabled auto header insertion for clangd
* .clangd: updated config, ignoring format warnings
* Add sublime text project
* vscode: enabled clang-tidy for clangd
* clangd: strict include checks for sources only

Co-authored-by: あく <alleteam@gmail.com>
2024-06-01 13:20:51 +01:00
MX
6a91588f52
Merge remote-tracking branch 'OFW/dev' into dev 2024-05-21 01:34:05 +03: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
MX
3ccb2956f3
Merge remote-tracking branch 'OFW/dev' into dev 2024-04-02 17:02:56 +03:00
hedger
096a26b07d
fbt: added -Wstrict-prototypes for main firmware (#3557)
* fbt: added -Wstrict-prototypes for main firmware (excludes extapps)
* unit_tests: fixed declarations using strict prototypes
* furi_hal: ble: changed gap stop log level to debug

Co-authored-by: あく <alleteam@gmail.com>
2024-04-02 02:02:45 +09:00
RebornedBrain
f426c44811
[FL-3801] Mifare Ultralight naming fix (#3551)
* Fixed some UI mismatches in plugin and nfc app
* Fixed nameing mismatches in mosgortrans_util
* Fix ultralight naming display
* Fix naming for Ultralight on read screen
* fbt: fixed regression with pvs-reports autoopen
* Revert st25tb_render.c

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
2024-04-02 00:02:11 +09:00
MX
7c0939ad52
Merge remote-tracking branch 'OFW/dev' into dev 2024-03-25 14:23:44 +03:00
MX
6d9a2cc699
fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms
https://github.com/flipperdevices/flipperzero-firmware/pull/3360/files
2024-03-22 11:27:48 +03:00
Silent
4039ccbcca
fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms (#3360)
* fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms
  GDB heavily dislikes forward slashes from Windows paths and strips
  them internally instead of normalizing them. Account for this by
  passing POSIX paths explicitly.
* fbt: different approach for posix path handling
* fbt, ufbt: further fixes for path handling
* fbt: explicit path stringification
* linter fixes

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 07:36:38 +09:00
hedger
ee36c66572
fbt: doxygen target (#3510)
* fbt: doxygen target
* github: adjustments for doxygen
* github: always generate docs, only upload for dev
* doxygen: fixed exclusion path for awesome-css
* github: stricter check for push ref
* github: bumped action version to fix node.js deprecation
* github: added PVS report url to workflow summary
* github: pvs: reworked report URL handling
* github: added size report to summary
* docs: added `doxygen` target
* fbt: common naming scheme for COMSTR
* Documentation: fix warnings and errors
* Doxygen: stricter warning checks
* fbt: "doxy" target, opens generated doxygen documentation in browser
* github: doxygen: now using edge (1.10) version

Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 01:32:53 +09:00
MX
88b354b57e
Merge branch 'ofw_dev' into dev 2024-03-02 07:24:47 +03:00
Sergei Gavrilov
4b7ca736d6
WiFi board: fixed update script on Windows (unfortunately also Mac and Linux) (#3485)
* WiFi board update: windows fix

* Scripts: add python\Scripts to the path

* Windows: another way to call esptool

* Aaaaaand once more!

* logz

* wifi board scripts: udev rule, dev channel

* fbt: added ARGS variable for passing extra options to certain scripts; removed `devboard_flash_dev` in favor of `devboard_flash ARGS="-c dev"`

* fbt: fully removed `devboard_flash_dev

* scripts: wifi_board.py: cleanup

* ufbt: ported ARGS for supported targets to ufbt

* docs: updated for ARGS=...

---------

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-03-01 15:58:15 +04:00
MX
9fcf3795ee
Merge branch 'ofw_dev' into blerefactr 2024-02-19 00:46:40 +03:00
hedger
60a9d7e6cf
ble: profile rework (#3272)
* ble: profile rework, initial
* apps: hid: fix for pairing cleanup
* app: hid: select transport based on #define
* fixing PVS warnings
* ble: serial service: fixed uid naming
* bt service: on-demand dialog init; ble profiles: docs; battery svc: proper update
* Added shci_cmd_resp_wait/shci_cmd_resp_release impl with semaphore
* app: hid: separated transport code
* ble: fixed service init order for serial svc; moved hardfault check to ble_glue
* cli: ps: added thread prio to output, fixed heap display
* ble_glue: naming changes; separate thread for event processing;
* furi: added runtime stats; cli: added cpu% to `ps`
* cli: fixed thread time calculation
* furi: added getter for thread priority
* fixing pvs warnings
* hid profile: fixed naming
* more naming fixes
* hal: ble init small cleanup
* cleanup & draft beacon api
* f18: api sync
* apps: moved example_custom_font from debug to examples
* BLE extra beacon demo app
* naming fix
* UI fixes for demo app (wip)
* desktop, ble svc: added statusbar icon for beacon
* minor cleanup
* Minor cleanup & naming fixes
* api sync
* Removed stale header
* hal: added FURI_BLE_EXTRA_LOG for extra logging; comments & code cleanup
* naming & macro fixes
* quick fixes from review
* Eliminated stock svc_ctl
* cli: ps: removed runtime stats
* minor include fixes
* (void)
* naming fixes
* More naming fixes
* fbt: always build all libs
* fbt: explicitly globbing libs; dist: logging SDK path
* scripts: fixed lib path precedence
* hal: bt: profiles: naming changes, support for passing params to a profile; include cleanup
* ble: hid: added parameter processing for profile template
* api sync
* BLE HID: long name trim
* Removed unused check
* desktop: updated beacon status icon; ble: hid: cleaner device name management
* desktop: updated status icon

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: nminaylov <nm29719@gmail.com>
2024-02-16 14:20:45 +07:00
MX
1faeca6e1b
Merge branch 'ofw_dev' into dev 2024-02-12 17:11:47 +03:00
hedger
14dabf523a
New toolchain with gcc 12 (#3254)
* changes for xPack 12.3
* support for gcc 13.2
* Update tools name
* Add new linux toolchain
* Fixed copro submodule
* Fix gdb-py
* Fixes for c++ apps
* Fix gdb-py3, add udev rules
* Fixed udev rules location
* Add MacOS arm, fix fbt toolchain download
* Fixed downloading error file
* fbt: fixed linker warnings; removed gcc 10 from list of supported toolchains
* ufbt: fixed supported toolchain versions
* nfc: replaced local malloc with calloc
* restored code with Warray-bounds to older state
* Update fbtenv.cmd
* Suppressing warnings
* Bump to 25
* Bump to 26
* lint: reformatted macros for new clang-format
* Bump to 27
* Fix m type word
* Bump to 28
* furi: added FURI_DEPRECATED macro
* scripts: toolchain download on Windows: fixing partially extracted cases

Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
2024-02-12 09:04:12 +07:00
MX
00ceb2cd5d
Merge branch 'ofw_dev' into dev 2023-12-01 20:29:16 +03:00
hedger
890c9e87ce
[FL-3690] Libraries cleanup; u2f crypto rework to use mbedtls (#3234)
* examples: plugins: utilize fal_embedded
* libs: removed fnv1a_hash
* furi: added FURI_PACKED; apps, libs: changed to use FURI_PACKED
* lib: mbedtls: using custom config
* lib: toolbox: removed md5, switched to mbedtls
* targets: f18: link fix
* lib: added mbedtls_cfg.h
* apps: nfc: explicit dependency on libmbedtls
* u2f: reworking to mbedtls
* u2f: replaced sha256 & hmac with mbedtls
* u2f: functional rework using mbedtls
* libs: dropped micro-ecc
* u2f: dropped old implementation
* toolbox: removed sha256 impl
* mcheck() for mbedtls
* libs: removed libmisc; split into smaller libs
* apps: debug: fixed display_test
* apps: include cleanups
* fbt: fixed VERSIONCOMSTR
* furi: added FURI_CHECK_RETURN
* lib: removed qrcode
* cleanup
* fbt: lint_py+format_py: fixed excessive command length
* api: Removed bzero from f7
* api: Removed bzero from f18
* Bump API Symbols

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 18:16:48 +09:00
MX
a64c9534e2
Merge branch 'ofw_dev' into dev 2023-11-17 02:20:27 +03:00
hedger
98d5718ec9
fbt: improvements (#3217)
* fbt: changed cdefines & lib handling for external apps; added extra checks for app manifest fields; moved around AppsC generator
* fbt: commandline fixes for spaces in paths
* fbt: fixed stringification for FAP_VERSION
* fbt: Removed excessive quoting for gdb
* docs: update for cdefines; fbt: typo fix
* fbt: enforcing at least 2 components in app version=

Co-authored-by: あく <alleteam@gmail.com>
2023-11-16 01:27:35 +09:00
MX
b958bfd5c9
Merge branch 'ofw_dev' into nfcrefactoring 2023-11-11 20:18:55 +04:00
Georgii Surkov
49dcf81743
[FL-3618] Infrared remote button index support (#3180)
* Do not load all signals at once (Draft)
* Minor cleanup
* Refactor remote renaming
* Improve function signatures
* Rename infrared_remote functions
* Optimise signal loading
* Implement adding signals to remote
* Add read_name() method
* Deprecate a function
* Partially implement deleting signals (draft)
* Use m-array instead of m-list for signal name directory
* Use plain C strings instead of furi_string
* Implement deleting signals
* Implement deleting signals via generalised callback
* Implement renaming signals
* Rename some types
* Some more renaming
* Remove unused type
* Implement inserting signals (internal use)
* Improve InfraredMoveView
* Send an event to move a signal
* Remove unused type
* Implement moving signals
* Implement creating new remotes with one signal
* Un-deprecate and rename a function
* Add InfraredRemote API docs
* Add InfraredSignal API docs
* Better error messages
* Show progress pop-up when moving buttons in a remote
* Copy labels to the InfraredMoveView to avoid pointer invalidation
* Improve file selection scene
* Show progress pop-up when renaming buttons in a remote
* Refactor a scene
* Show progress when deleting a button from remote
* Use a random name for temp files
* Add docs to infrared_brute_force.h
* Rename Infrared type to InfraredApp
* Add docs to infrared_app_i.h
* Deliver event data via a callback
* Bundle event data together with event type
* Change DataExchange behaviour
* Adapt RPC debug app to new API
* Remove rogue output
* Add Doxygen comments to rpc_app.h
* Simplify rpc_app.c code
* Remove superflous parameter
* Do not allocate protobuf messages on the stack
* Fix GetError response
* Support for button indices
* Comment out shallow submodules
* Fix F18 api
* Fix logical error and add more debug output
* fbt: testing unshallow for protobuf
* github: lint&checks: unshallow prior to checks
* Fix a TODO
* github: do not unshallow the unshallowed
* fbt: assets: only attempt to unshallow if cannot describe
* Do not use the name when loading a signal by index (duh)
* Simplify loading infrared signals by name
* Sync with protobuf release
* Infrared: use compact furi_crash macros

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-11-10 16:22:34 +09:00
MX
32e2cbe60a
Merge branch 'ofw_dev' into nfcrefactoring 2023-11-08 15:14:30 +04:00
hedger
0d94abf856
fbt: dist improvements (#3186)
* fbt: MENUEXTERNAL apps now respect build configuration; fixed `fap_deploy`
* fbt, ufbt: better message for missing app manifests (shows real paths)

Co-authored-by: あく <alleteam@gmail.com>
2023-11-02 22:28:39 +09:00
MX
bee48f483c
Merge branch 'ofw_dev' into nfcrefactoring 2023-11-01 21:07:33 +03:00
hedger
7bd3bd7ea4
fbt: source collection improvements (#3181)
* fbt: reduced amount of redundant compilation units
* fbt: added GatherSources() method which can reject source paths starting with "!" in sources list; optimized apps' source lists
* docs: updated on path exclusion for `sources`
* apps: examples: fixed example_advanced_plugins source list
* docs: more details on `sources`; apps: narrower sources lists
2023-11-01 13:21:31 +09:00
hedger
bbe68d6ffc
[FL-3629] fbt: SD card resource handling speedup (#3178)
* fbt: reduced size of resources dependency graphs, resulting in faster build task evaluation
* lib: flipper_app: fixed error message & error handling for plugins
2023-10-31 15:27:58 +04: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
MX
2958e5cef3
Merge branch 'ofw_dev' into dev 2023-10-23 21:40:52 +03:00
hedger
35c903494c
[FL-3627, FL-3628, FL-3631] fbt: glob & git improvements (#3151)
* fbt: optional shallow submodule checkout
* fbt: more git threads by default
* fbt: git condition fix
* fbt: renamed FBT_SHALLOW to FBT_GIT_SUBMODULE_SHALLOW
* github: enabled   FBT_GIT_SUBMODULE_SHALLOW in flows
* fbt: always compile icons' .c, even if user does not specify a proper source glob; changed glob to require files at user-specified paths to exist
* fbt: fail build for missing imports in .faps
* fbt: moved STRICT_FAP_IMPORT_CHECK to commandline options; enabled by default
* ufbt: enabled STRICT_FAP_IMPORT_CHECK

Co-authored-by: あく <alleteam@gmail.com>
2023-10-23 18:55:36 +09:00
MX
c1363a18cc
Merge branch 'ofw_dev' into dev 2023-10-08 11:43:16 +03:00
hedger
d47e5ca520
fbt: glob improvements (#3117)
* fbt: glob improvements, now treats entries with no special glob chars as files by default, not calling scons' globbing for them
* fbt: further fixes for glob
* fbt: less strict existence checks
* fbt: fixed frame_rate collection; typo fixes & comments

Co-authored-by: あく <alleteam@gmail.com>
2023-10-06 16:11:02 +09:00
Max Andreev
9898a5d0dd
Enable PVS Studio license check (#3122) 2023-10-02 18:51:41 +09:00
MX
fc1ec55a40
Merge branch 'ofw_dev' into dev 2023-09-25 16:53:05 +03:00
hedger
e1030e7999
fbt: reworked tool path handling (#3105)
* fbt: removed absolute paths from env setup; moved abs paths to cdb tool
* fbt: moved tool lookup to cdb emitter
* fbt: cdb: quote only tools with spaces in path
* typo fix
* fbt: pvs: suppress license expiration warning
2023-09-25 14:04:34 +09:00
MX
8666cdc5ef
Merge branch 'ofw_dev' into dev 2023-09-21 22:43:48 +03:00
hedger
1891d54baf
[FL-3600] Added fal_embedded parameter for PLUGIN apps (#3083)
* fbt, ufbt: added `fal_embedded` parameter for PLIGIN apps, to embed them into .fap
* fbt: fixed dependency settings for assets
* fbt: extapps: Removed unneeded casts
* fbt: extapps: code simplification
* fbt: fal_embedded: fixed dependency relations

Co-authored-by: あく <alleteam@gmail.com>
2023-09-21 21:56:00 +09:00
MX
fdb9748acc
Merge branch 'ofw_dev' into dev 2023-09-05 16:22:49 +03:00
hedger
452e27b05e
github: workflow improvements (#3032)
* github: compact build: status reporting step
* github: build: matrix strategy
* debugging
* github: added version_token to /uploadfiles request
* github: reworked main build flow
* github: suppressed non-zero cp status
* github: build: fixed comment lookup; experimental changes to apps build order
* github: removed summary step for compact builds; united map analyzer steps
* fbt: added get_apiversion target; moved ext apps processing logic to AppBuildset
* ufbt: added missing global
* fbt: Moved incompatible app list to firmware config output
* fbt: cleaner extapps processing
* github: build: added automation for SDK publishing
2023-09-05 20:49:39 +09:00
MX
20593d56c0
Merge branch 'ofw-dev' into dev 2023-08-22 21:53:50 +03:00
hedger
ace0901125
[FL-3486,FL-3392] fbt: various improvements and bug fixes (#2982)
* fbt: extapps: compact debug format for .faps
* fbt: sdk: fixed symbol cache regen logic for removed-only symbols
* lib: elf_file: early .fap file handle release
* fbt: extapps: added FAP_VERSION define for application environments
* github: added appsymbols artifact
* api: updates for f18
* github: fixed early fap_dist
* fbt: added flash_dap
* ufbt: added flash_dap
* fbt: reworked flash target; scripts: program.py->fwflash.py and changes
* vscode: updated configuration
* scripts: fwflash.py: ugly fixes for ufbt
* scripts: fwflash.py: cleanup
* fbt: flash: always use .elf file
* scripts: fwflash: fixed elf file path

Co-authored-by: あく <alleteam@gmail.com>
2023-08-23 03:33:10 +09:00