Commit Graph

47 Commits

Author SHA1 Message Date
Skorpionm
3164184bbc
[FL-2230] SubGhz: protocol API refactoring (#969)
* SubGhz: protocols library refactoring
* SubGhz: new architecture and refactoring
* SubGhz: simplify protocol structure, remove unused types
* SubGhz: rename Subghz to SubGhz
* SubGhz: add environment concept

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2022-03-03 12:48:56 +03:00
Anna Prosvetova
46a25c295c
Decouple apps to allow smaller builds. Loader deadlock fix and refactoring. (#929)
* Lib: always include rfal
* Gui: remove screen_stream
* Input: decouple from Cli
* Loader: decouple from Cli
* Desktop: ignore missing favorite app, decouple from Archive
* Make: make Notification a Gui dependency
* Make: embed debugging information into elfs
* Loader: hide Plugins submenu when plugins ga arimasen
* Applications: update on start hook usage
* Loader: fix dead lock on menu rebuild with open rpc, new cli command.

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-12-24 21:47:48 +03:00
あく
439fb9c18d
[FL-1910, FL-2146] Update to new FreeRTOS, fix CMSIS thread flags collision with stream buffer. New cube. (#917)
* Libs: add FreeRTOS submodule. FuriHal: replace ST provided FreeRTOS with original one. FuriHal: for cmsis os hal and patch it for better compatibility with stream buffer.
* Makefile: fix svd plugin on blackmagic
* Lib: update STM32CubeWB package. Project: update project to match new cube package.
* Lib: properly rebase and upload STM32CubeWB
* BleGlue: switch ack logging level to trace
2021-12-21 15:16:25 +03:00
Oleg Kalachev
9708b30965
Fix pid and vid for dfu-util (#878) 2021-12-07 20:31:20 +03:00
Oleg Kalachev
02ba5692e4
Specify vid and pid of device for upload target (#877)
Co-authored-by: あく <alleteam@gmail.com>
2021-12-07 18:54:37 +03:00
hedger
f54ae2597e
Bootloader size optimizations (#873) 2021-12-07 17:17:08 +03:00
Anna Prosvetova
03d7476e4f
Rpc: StorageInfo, StorageRename, SystemReboot, SystemDeviceInfo (bonus: +FuriHalInfo) (#862)
* Rpc: update protobuf sources
* Rpc: rename Status to System
* Rpc: implement StorageInfoRequest
* Rpc: implement StorageRenameRequest
* Rpc: implement SystemRebootRequest
* FuriHal: introduce FuriHalInfo, refactor device_info
* Rpc: implement DeviceInfoRequest
* Rpc: use strdup where it suites the best.
* Make: add do not page align data to linker flag.

Co-authored-by: あく <alleteam@gmail.com>
2021-12-07 16:47:20 +03:00
Anna Prosvetova
4303945748
Simpler build, less dependencies (#827)
* Simpler build, less dependencies
* Follow ugly python linter
* Introduce Brewfile & Update Readme
* Make dist.sh target-specific
* Tidy up make output
* Get rid of cat and truncate (I still love cats tho)
* Suppress dd output
* Long live the cat
2021-11-18 11:46:47 +03:00
あく
1571d4ec54
Project: enum cast fix. Makefile: blackmagic rule in global makefile (#819) 2021-11-15 22:55:25 +03:00
gornekich
3225f40870
[FL-1952] BLE bonding fix (#805)
* furi-hal-bt: add mutex guarding core2 state
* ble-glue: configure ble keys storage in SRAM2
* bt: add load and save ble keys in internal storage
* bt: improve work furi_hal_bt API
* bt: rework app_entry -> ble_glue
* bt: apply changes for f6 target
* desktop: remove furi check
* ble-glue: comment NVM in SRAM2 configuration
* FuriHal: fix flash controller state corruption, fix incorrect semaphore release, implement C1-C2 flash controller access according to spec. Gui: change logging level.
* Libs: better lfs integration with lfs_config.
* Ble: switch C2 NVM to RAM.
* FuriHalCrypto: ensure that core2 is alive before sending shci commands
* Ble: fix incorrect nvm buffer size

Co-authored-by: あく <alleteam@gmail.com>
2021-11-04 20:26:41 +03:00
あく
22a4bac448
[FL-1934] Core: wipe memory after free. SubGhz: key encryption tool. (#797)
* Core: wipe memory after free. RFID,iButton: fix iterator use after invalidation.

* Debug: support unix wildcards for register matching in svd, update MCU description file and minify it.

* Toolbox: getter for File in FlipperFile.

* Makefile: conditional flashing

* SubGhz: keeloq_mfcodes encryption tool.

* FuriHal: proper IV handling on CBC in crypto. SubGhz: add support for encrypted keeloq keys. Makefile: move formatting to top Makefile.

* SubGhz: rename some function names to match naming scheme.

* SubGhz: encryption tool, fix windows line endings

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2021-11-01 16:11:25 +03:00
Anna Prosvetova
f8542af653
[FL-1989] CI: bootloader & firmware JSON manifests (#786)
* [FL-1989] CI: bootloader & firmware JSON manifests
* CI: reorder steps

Co-authored-by: あく <alleteam@gmail.com>
2021-10-26 18:33:38 +03:00
あく
2751440193
[FL-1970, FL-1965, FL-1872, FL-1689] Python framework, Scripts and fixes (#779)
* Scripts: add flipper lib, migrate ob to flipper lib, update ob.data
* Makefile: speedup build with phony target for .d files
* FuriHal,U8G2: full MGG display support and ERC contrast tuning.
* Desktop: fix dolphin rename artifact.
* Scripts: port otp.py to flipper scripting lib.
* Scripts: add wipe and core1 flashing to flash.py, remove obsolete shell scripts
* Scripts: replace core1 flashing script with global makefile.
* Scripts: final touches and migration to python. Root Makefile for everything.
2021-10-21 15:24:34 +03:00
あく
2255060d52
[FL-1961] Cli: device_info format versioning. Detach target from firmware name. #765 2021-10-16 14:25:32 +03:00
あく
06444789bb
Makefile: optimize space usage. (#761) 2021-10-13 20:33:09 +03:00
gornekich
5232d5daba
[FL-1905] Fix power off notification (#748)
* view dispatcher: add set view front API
* power: add power off notification
* Gui: rename ViewPort `send_to` API.
* Makefile: add blackmagick support

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-10-06 18:41:22 +03:00
Anna Prosvetova
08f7a290a4
CI: Fix git.mk & post a quick flash link on PR builds (#670)
* CI: Fix git.mk & post a quick flash link on PR builds
* Makefile: optimize shell invocation in git helper, conditional dependency load.
* Github: better variable naming

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-26 20:59:23 +03:00
SG
153666f73f
F6: USB glue cleanup and fixes (#666)
* USB-CDC: accepting the next data packet only if we process previous data
* USB-CDC: use USB FS packet size
* HAL-console: puts method
* Check: print assertion data
* FuriHal: rx stream free space aware CDC confirmation.
* Bootloader: pull down USB lines, leave the rest to the firmware or bootloader
* F6: cleanup and move USB code to usb-glue folder, add USB suspend/resume events to VCP, cleanup target.mk, fix missing motd message in cli when using minicom.
* F5: cleanup the rest of USB glue code, adjust LPM and Power info data in descriptor.

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-22 13:43:45 +03:00
あく
f02cec45a0
[FL-1473, FL-1651] Update STM32CubeWB to latest version. Radio firmware bundle. (#642)
* FuriHal: update STM32CubeWB to latest version.
* Makefile: debug other script
* FuriHal: correctly handle 0 size transfers in VCP
* Dolphin: cleanup and minor timer tuning.
* FuriHal: update FreeRTOS config with bigger timer command queue.
* FuriHal: delayed irq enabling, fixes missing ticks.
* FuriHal: use SFSA to determine free space for internal FS, update linker script to use as much space as theoretically possible.
* Scripts: update core2 flashing scripts and OB data.
* Github: bundle resources, core2 firmware and supplementary data.
* GitHub: versioning for supplemental artifacts
2021-08-17 12:41:08 +03:00
Anna Prosvetova
69f4858168
DFU make rule, update Readme (#650)
Co-authored-by: あく <alleteam@gmail.com>
2021-08-16 23:22:30 +03:00
SG
653295df6f
[FL-1609] Redirected malloc, calloc, realloc and free functions from newlib to freertos heap. (#604)
* Core: newlib-nano heap management functions replaced with freertos functions
* Core: replace newlib heap management functions for firmware only, not for bootloader
* Core, Linker: automatically determine available heap size at linking.

Co-authored-by: あく <alleteam@gmail.com>
2021-07-25 15:37:43 +03:00
あく
5ae3d60101
Debug: update PyCortexMDebug to latest and refactor (#574)
* Debug: update PyCortexDebug to latest and refactor.
* Debug: format sources. Dockerfile: add missing dependency. Make: switch to gdb-py.
* Debug: port PyCortexMDebug to python2
* Docker: add missing debug dependencies
* Debug: cleanup local include in svd_gdb.py
2021-07-12 05:13:01 +03:00
あく
8116bfcbab
[FL-1443, FL-1289] Move assets compilation to separate Makefile. Add scripts folder. Add OTP flashing with DFU. (#531)
* Assets: move assets compilation to separate Makefile. Move all scripts to scripts folder. Add scripts ReadMe. Add precompiled assets.
* Split assets.py into separate entities. Option bytes for FL-1289 and checker/setter.
* Cli: explicitly initialize variable befor use in api_hal_vcp_rx_with_timeout
* Rename ob_check script to ob.
2021-06-23 17:58:44 +03:00
Albert Kharisov
3114a2d4b8
[FL-1156, FL-1249] Add IRDA encoder/decoder library (#451)
* Add cscope db generation
* Add api-hal-irda, TIM2: HAL->LL
* Add libirda: pwm decoding
* Universal state machine
* Add irda decoder library
* Move IRDA capture to standalone tool
* Add encoder/decoder samsung32, NEC, fix bugs
* Port current App to new Irda lib
* Fix clang format for test data
* Port IRDA api-hal to f6

Co-authored-by: あく <alleteam@gmail.com>
2021-05-18 13:51:00 +03:00
あく
3671c68b79
[FL-1241] Build optimization (#459)
* Makefile: enable space optimization with debug, cleanup double includes, explicitly define cpp runtime options
* Toolchain: add printf support
* Toolchain: explicit standard declaration
2021-05-12 10:59:20 +03:00
Albert Kharisov
aa20a78b0e
[FL-164] Add bootloader version (#417)
* Add bootloader versioning
* Move some logic to api-hal-version
* Backport to f4
* Dolphin: update version screen layout, make it more readable

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-04-19 19:30:25 +03:00
gornekich
5eba573f43
[FL-300] Launch applications from CLI (#380)
* app_loader: release console after cli start app cmd
* furi: add thread state getter
* app_loader: check thread started before launch with cli
* app_loader: remove view port from app loader
* blink: rework blink plugin to manage view and free resources
* vibro: rework vibro plugin to manage view and free resources
* music_player: rework app to manage exit and free resources
* input_dump: rework app to manage exit and free resources
* coreglitch_demo: add app exit and free resources
* floopper-bloopper: update submodule
* app-loader: remove applications context
* rules.mk: add submodule sync
* gui-test: add exit from application
* applications: exit on back short instead of press event
2021-03-18 10:58:16 +03:00
あく
584c0962d8
[FL-781] FURI, CLI, stdlib: stdout hooks, integration between subsystems, uniform printf usage (#311)
* FURI stdglue: stdout hooks, local and global, ISR safe printf. Uniform newlines for terminal/debug output. Power: prevent sleep while core 2 has not started.
* Furi record, stdglue: check mutex allocation
* remove unused test
* Furi stdglue: buferized output, dynamically allocated state. Furi record: dynamically allocated state. Input dump: proper line ending. Hal VCP: dynamically allocated state.
* Interrupt manager: explicitly init list.
* Makefile: cleanup rules, fix broken dfu upload. F4: add compiler stack protection options.
* BLE: call debug uart callback on transmission complete
* FreeRTOS: add configUSE_NEWLIB_REENTRANT
* API HAL Timebase: fix issue with idle thread stack corruption caused by systick interrupt. BT: cleanup debug info output. FreeRTOS: disable reentry for newlib.
* F4: update stack protection CFLAGS to match used compiller
* F4: disable compiller stack protection because of incompatibility with current compiller
* Makefile: return openocd logs to gdb
* BLE: fixed pin, moar power, ble trace info.
* Prevent sleep when connection is active
* Makefile: return serial port to upload rule, add workaround for mac os
* Furi: prevent usage of stack for cmsis functions.
* F4: add missing includes, add debugger breakpoints
* Applications: per app stack size.
* Furi: honor kernel state in stdglue
* FreeRTOS: remove unused hooks
* Cleanup and format sources

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2021-01-29 03:09:33 +03:00
あく
1b78418f9f
FL-528 GUI: View, ViewDispather. Dolphin: first start. (#276)
* GUI: view. Flooper-blooper fix compilation error.
* GUI: view and viewdispatcher bones
* GUI: view implementation, view models, view dispatcher
* GUI: view navigation, model refinement. Power: use view, view dispatcher.
* HAL Flash: proper page write. Dolphin: views. Power: views
* Dolphin: transition idle scree to Views
* Dolphin: input events on stats view. Format sources.
* HAL: flash erase. Dolphin: permanent state storage.
* Dolphin: first start welcome. HAL: flash operation status, errata 2.2.9 crutch.
2021-01-08 10:42:48 +06:00
coreglitch
61cce74291
Fix OK button in F4 (#259)
* fix OK button in F4
* return DFU serial to make
2020-12-08 12:51:59 +03:00
あく
228055e4eb
OpenOCD makefile integration and Charger IC initialization fixes. (#258)
* Makefile: start openocd from gdb, boot no boot version.
* bq25896: reset before readout. Cleanup.
2020-12-04 20:30:50 +03:00
coreglitch
884dba647a
FL-409 Boot0 OK button (#257)
* update makefiles for f3-1
* add f3-1 files
* fix mk for f3
* remap OK button
* differ gpio invert
* expose full duplex spi2
* remove duplicate bq drivers
* remove bq inc
2020-12-02 16:40:06 +03:00
あく
3a6fbff8c3
FL-339: cli diagnostic interface for power subsystem. (#256)
* Core, API: add externs for c++
* Makefile: improve debug speed, flash with openocd, cleanup f2 config
* Power: add cli diagnostic.
* Local: fix api hal externs
* Local: fix externs in main and flipper_hal
* F2: power state dump stabs
* Bootloader flashing with openocd
* F3: move bq drivers to libs
* temporary do not build drivers on local
* temporary do not build drivers on f2

Co-authored-by: aanper <mail@s3f.ru>
2020-12-02 13:47:13 +03:00
あく
e348990fc6
Debug: Add PyCortexDebug. Core and peripheral register database and decoder. (#251)
* Debug: pycortexdebug
* Debug: format PyCortexMDebug source code
2020-11-19 18:48:34 +03:00
あく
3749eb0eed
USB VCP Cli (#237)
* Core: ring buffer.
* Api: usb vcp. F3: vcp glue code.
* Applications: cli draft version.
* Cli: basic working version, includes help and version commands
* HAL: vcp on f2
* Makefile: update openocd conf
* F3: vcp rx with freertos stream
* Cli: help
* Cli: standard commands, api-hal-uid
* Power: cli poweroff.
2020-11-16 13:16:34 +03:00
DrZlo13
714d732745
FL-78 Microsd test application (#230)
* variable cluster size, label info functions for targets
* app record
* init, mount, get label, get sn, get space
* enable exfat
* more stack for the stack god
* remove c app and add cpp app
* remove MULTI_PARTITION
* fix 4gb bug
* update app to new template lib, add animated waiting
* tiny buffer configuration
* write speed benchmark
* fnv1a hash library
* make DEFAULT_STACK_SIZE and MAX_TASK_COUNT defined per target
* fully functional sd card app
* build sd test app to release firmware
* cpp, not c
* light up red led if error
* flags for c++
* linking with g++
* suppres snprintf warning
* move format work area to heap

Co-authored-by: coreglitch <mail@s3f.ru>
2020-11-14 19:24:38 +03:00
DrZlo13
49fdb28871
sd detect pin feature (#222)
* test sd detect pin
* sd detect support for f2 board
2020-11-11 09:17:53 +03:00
coreglitch
748f7e4fc3
add dfu util to container, enable usb in container (#229)
* add dfu util to container, enable usb in container
* add DFU_SERIAL env
2020-11-10 19:42:18 +03:00
coreglitch
bce6f867f1
show target version, date, commit hash and branch (#221) 2020-11-06 12:31:06 +03:00
coreglitch
eb2679b982
Refactor F2/local before F3 merge (#220)
* add files from f3
* rollback lfs
* Move assets from LFS
* remove lfs from build

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2020-11-06 11:31:59 +03:00
DrZlo13
c9b921f6ce
added openocd support (#211)
openocd needs a visible uxTopUsedPriority symbol for freertos, but freertos is discarding it in v7, so I add the helper file manually
2020-10-29 08:41:44 +03:00
あく
665f6d7d9c
Assets, Icons, UI toolkit. Part 1. (#202)
* Assets: import from gdrive
* Assets: fully working build pipeline and registry
* NFC: menu icon
* Gui: layers. Irukagotchi: base app to handle input on idle screen. Makefile: reboot after flash in dfu mode.
* ValueMutex: with lambda
* Assets: proper animation frames sorting
* ValueMutex: proper furi_open usage
* Assets,GUI: split icon into icon data and icon state.
* Format source code
* Docker: add python3 and imagemagic
* Irukagotchi: cleanup
* GUI: event lock moved to gui.
* Rfid: proper gui layer
* GUI: elements. Menu: frame and scroll
* GUI, Menu: format code.
* Menu: dual font main menu
* Menu: format sources
* GUI: 0 total scrollbar
* CI: enable lfs
* Menu: pixel perfect main menu

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-10-26 20:00:17 +03:00
aanper
44bb9ee403 use arm-none-eabi-gdb from ubuntu-docker 2020-10-19 19:31:24 +03:00
Aleksandr Kutuzov
c318d54995 Debug: freertos gdb plugin. 2020-10-17 16:34:16 +03:00
coreglitch
b2a12d091a
Display and UI implementation (#169)
* Menu app. Lib: add mlib submodule.

* Menu: new startup lib dependency definition

* Menu: hierarchy in menu. Cube: fix heap1/4 inconsistency, stack protection.

* GUI: rendering pipeline initial version.

* GUI: layered widget composing, FURI record. Menu: FURI record, api.

* GUI: input dispatching. Menu: switch to input from GUI.

* GUI, MENU: code style cleanup, fix type conversion warnings.

* GUI, Menu: syntax check.

* Makefile: check and reinit submodules, format.

* Menu: lock on event processing. Makefile: proper submodule initialization.

* Menu: fix stack corruption by queue.

* GUI: refactor.

* Makefile: format rule fix, st-util pid.

* GUI, Menu, FURI: format with clang-format.

* GUI, MENU: locks in critical sections, fix stack corruption, ready signaling.

* Makefile: clang format rule cleanup.

* GUI,MENU: migrate to new API.

* Applications: PRODUCTION_HW variable, skip drivers build on local target.

* refactor production build

* add git to dockerfile

* GUI: uncomment lock block

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2020-10-14 13:21:55 +03:00
あく
2ab6f82ddf
Makefile: build flags as a target. (#163)
* Makefile: build flags as a target.

* Makefile: proper BUILD_FLAGS generation routine

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2020-10-08 12:47:12 +03:00
あく
3c2711102c
Target refactoring and cube update (#161)
* Lib: move cube to libs. Firmware: prepare for code base refactoring, detach from cube, port to cmsis_os2.

* Firmware, target f2: regenerate project with latest cube package, tim17 for os ticks.

* Firmware: unified codebase.

* Core: do not include semaphore on old targets. Firmware: dfu uplaod target.

* CI: submodules, add firmware build.

* CI: proper submodule config.

* refactor build system

* CI: update chain to use new targets. Documentation: update to match current structure.

* CI: clean before rebuild.

* Add local test

docker-compose exec dev make -C firmware TARGET=local TEST=1 run

* Makefile: target specific build directory. CI: updated artifacts path.

* Makefile: init git submodules if they don't exists.

* Makefile: debug rule now doesn't reset MCU, prevent SIGINT propagation to st-util.

* Makefile: proper rebuild sequence in zz and zzz

* Makefile: timestamp tracking for flash and upload commands.

* Apps: modular build. Input: fix flipper hal inline.

* Wiki: proper bootloader link.

* Applications: fix broken build for local targets.

* add st-flash to docker

* fix build

* force rebuild app

* move app force to firmware part

* fix build deps

* qrcode build ok

* fix example display

* add testing routine

* update build instruction

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-10-07 12:37:43 +03:00