Commit Graph

35 Commits

Author SHA1 Message Date
あく
37d7870e52
[FL-1666] Bootloader: info screen when we going to DFU. FuriHal: port SPI to LL. Cleanup. (#634)
* FuriHal: port spi to ll. Bootloader: add spi and display.
* Makefile: rollback disabled freertos introspection
* FuriHal: spi lock asserts. F6: minor cleanup port sdcard shenanigans to furi_hal_gpio.
* SdCard: port missing bits to furi-hal-gpio
* FuriHal: fix broken RX in SPI, update SPI API usage. RFAL: more asserts in SPI platform code.
* GUI: clear canvas on start. FuriHal: no pullup on radio spi bus.
* FuriHal: use check instead of assert in spi lock routines
* FuriHal: remove timeouts
* SdHal: add guard time to SDCARD CS PIN control.
* FuriHal: proper name for SPI device reconfigure routine. SdHal: one more enterprise delay and better documentation.
* Bootloader: update DFU text and add image.
* FuriHal: drop unused ST HAL modules.
* SdHal: fixed swapped hal_gpio_init_ex arguments
* SpiHal: fixed swapped hal_gpio_init_ex arguments
* IrdaHal: use hal_gpio_init instead of hal_gpio_init_ex
* RfidHal: fixed swapped hal_gpio_init_ex arguments

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2021-08-12 11:48:05 +03:00
あく
0a97d6913c
Rename api-hal to furi-hal (#629) 2021-08-08 21:03:25 +03:00
あく
e9e29e0e0c
ApiHal: initialize clock in parallel, switch LSE driving to high, enable EXTI line 18 to fix LSECSS, move some interrupts service routines to api-hal-interrupts. (#614) 2021-07-30 13:13:18 +03:00
gornekich
ebd158a823
[FL-1542], [FL-1603] Generate random name (#602)
* Lib: add random name library
* Text_input: add default text clearing
* All: rework all applications with new text_input API
* Nfc: fix removing dev file on save_name scene enter
* Lib: move all free radicals to toolbox and update API usage.

Co-authored-by: あく <alleteam@gmail.com>
2021-07-25 14:34:54 +03:00
あく
f25d000d53
[FL-1558] Technical Debt: console, bootloader, targets, stdglue, etc... (#590)
* ApiHal: console abstraction, change uart baud rate to 230400. Bootloader: drop F5. Furi: prevent thread local output to serial console in stdglue.
* ApiHal: take control over system initialization, reorder some subsystems in a hope of fixing USB issues.
* Main: cleanup dead code. ISR: take care of HSECSS by our self. USB: leave clock configuration alone.
* F6 cube: switch RCC to LL.
* Cli: rollback return behavior.
2021-07-20 20:14:42 +03:00
あく
421a0f6b97
[FL-1546, FL-1534, FL-1550] Drop F5, Certification preparation, Global application start lock (#585)
* Firmware: drop F5 target
* Rename app-loader to loader
* Update code owners file
* Loader: global application start lock API, minor refactoring
* Archive: update loader usage
* Cli: Command flags, global application start lock
* Apps: update cli API usage
* Bootloader: minor refactoring
* Firmware: minor build refactoring
* SubGhz: GUI packet test
* SubGhz: drop packet transmission and unused presets
* Github: drop F5 from build
* Archive: favorites
* Archive: a little bit more of Favorites
2021-07-18 21:09:00 +03:00
あく
b6d5b5cb74
Bootloader: always treat initial state as tainted. Firmware: mark boot state as tainted on boot. (#558) 2021-07-02 16:02:36 +03:00
あく
6c9be3755c
Bootloader: cleanse system if tainted (#554)
* Bootloader: cleanse system if tainted
* Bootloader: correctly set VTOR before jump to firmware
2021-07-02 04:04:37 +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
あく
6d648da003
[FL-835] Factory reset. Cli refactoring. (#466)
* ApiHal: add boot flags. Internal storage: add factory reset.
* Bootloader: correct doxygen comment format.
* Cli: change cli callback signature. Applications: update API usage. Add factory_reset cli command.
2021-05-18 16:57:39 +03:00
あく
734820c137
[FL-1196] Targets: add F6 (#427)
* Targets: add F6
* F6: Update linker script for use with internal storage
* F6: synchronize with F5, add all changes arriving in V9 board, update cube project. Github workflow: add multi-target build, add F6 to build targets.
* CI: fix full assembly
* CI: better artifact naming scheme
* CI: fix artifacts wildcard
* F6: Swap C10 - A15, vibro and sdcard detect pins
2021-05-18 12:23:14 +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
gornekich
b405a22cd1
[FL-1167] Rework GPIO and EXTI with LL lib (#424)
* api-hal-gpio: rework gpio on ll
* one_wire_slave: rework gpio initialization
* interrupts: add attribute weak to hal exti interrupts handlers
* api-hal-gpio: add exti interrupt handlers
* input: rework with api-hal-gpio interrupts
* one_wire_slave: rework with api-hal-gpio interrupts
* api-hal-gpio: fix incorrect exti line config
* api-hal-gpio: add doxygen documentation
* api-hal-gpio: add enable / disable interrupts
* api-hal-gpio: add get_rfid_level
* core: remove api-gpio
* applications: rework gpio with api-hal-gpio
* lib: rework gpio with api-hal-gpio
* rfal: disable exti interrupt when rfal is inactive
* rfal: add interrupt gpio reinitialization
* api-hal-gpio: hide setting speed and pull mode LL implementation
* stm32wbxx_it: remove unused EXTI handlers
* api-hal-gpio: guard set, enable, disable and remove interrupt
* Drop F4 target
* Accessor: update gpio api usage

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-04-29 11:51:48 +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
あく
616b7325c6
[FL-952] I2C: correctly handle STOP flags. Apps: increase cli_app stack size. (#408)
* I2C: correctly handle STOP flags. Apps: increase cli_app stack size.
* API HAL Power: simplify api_hal_power_dump_state. Format sources.
2021-04-12 21:09:38 +03:00
gornekich
6375f21cf5
[FL-185] Gauge calibration (#391)
* api-hal-power: add design capacity parameter
* bq27220: fix control command and initialization
* bq27220: add cedv configuration
* power: add cedv configuration parameters
* bootloader: add only used drivers sources for build
* main: init DWT before api-hal

Co-authored-by: あく <alleteam@gmail.com>
2021-03-26 14:23:31 +03:00
あく
2f14f6dac5
API HAL I2C: add timeout support. Update I2C API usage by drivers. (#374)
* API HAL I2C: add timeout support. Update I2C API usage by drivers.
* F4: Add missing API HAL Vibro implementation.
2021-03-10 16:23:54 +03:00
あく
9df4d8e2ed
[FL-635] Enable LSE CSS (#371)
* LSE CSS: explicitly configure and start LSE + LSI1 and enable LSECSS at boot, enable LSECSS interrupt in firmware.
* F4: backport LSE CSS shenanigans.
* Split LSE/HSE CSS handling routines, add TODO for missing notification.
2021-03-08 18:55:51 +03:00
あく
f4f8ef59fd
[FL-933] API HAL I2C: initialize bus on start (#360)
* API HAL I2C: initialize bus on start
* API HAL I2C: move timing register to resources, explain its value. Update cube project.
2021-03-03 12:21:14 +03:00
あく
38011e88f3
API HAL: takeover i2c initialization and abstraction. Update I2C drivers to match new api. Back port API HAL to bootloader and enable light support for F5. (#356)
Co-authored-by: coreglitch <mail@s3f.ru>
2021-03-02 14:45:47 +03:00
あく
68a3f6b4b7
[FL-873] Add F5 target, lp5562 driver and api-hal-light (#347)
* Add F5 target, lp5562 driver and api-hal-light. Update api-usage, switch to F5 by default.
* API HAL: add i2c and hardware version api. Dolphin: show hardware version.
* OTP version generator and flashing utility.
* Assets script: fix code formatting
* Backport F5 changes to F4
* F4: disable insomnia, prevent damage to BLE RX path
* F5 HAL API Light: remove magic delay to fix magic BLE
* Dolphin: HW target validation on start
* invert RSSI indication in sub-1
* API HAL: rename board to body in version api
* Gpio tester: detach and release viewport on exit

Co-authored-by: aanper <mail@s3f.ru>
2021-02-18 15:49:32 +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
あく
f070815535
Bootloader: LSE/RTC shenanigans, morse error codes, new LED color scheme (#293)
* Bootloader: LSE and RTS shenanigans, LED control, morse code for LSE failure error.
* Bootloader: add errata fix for flash controller
* Bootloader: target spelling
2021-01-07 01:45:31 +06:00
あく
4a9e4074f7
Remove obsolete target. Cleanup and update ReadMe. (#279) 2020-12-28 11:52:35 +06:00
あく
8de7083981
Bootloader: delay before boot key sampling. (#277) 2020-12-24 17:22:17 +06:00
あく
dde163fa61
Bootloader: do not configure clock on start, just minimum LL init. (#269)
* Bootloader: do not configure clock on start, just minimum LL init.
2020-12-18 23:51:08 +06:00
coreglitch
c1c069e95f
F2 F3 deprecate (#267)
* move f3-1 to f4, remove f3
* remove f2
* remove firmware F3 for pipeline
* remove patch for F4 makefile
* fix fw makefile
* migrate bootloader to f4
2020-12-14 19:36:07 +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
あく
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
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
b3dddc645d
change user boot pin to left (#228) 2020-11-09 13:39:43 +03:00
あく
76e3fd3060
Firmware, Bootloader: add f3 target. (#215)
* Firmware, Bootloader: add f3 target. Refactor code to be portable across targets.
* Firmware: remove bkpt
* Makefile: debug agent. Debug: f3 platform throw openocd.
* freertos-openocd helper
* separate hal resources
* return of input_dump app
* using hew target resources abstration layer for backlight and blink
* dirty hack for input driver, f3 has no charging pin
* worked input interrupts
* working display
* F3: switch to 32mHz resonator
* F3: configure SD_CS pin
* NFC: port to F3.
* fat uart app
* sd card hal api
* separate CC1101 spi config
* faster spi gpio for sd card
* Assets: disable LFS
* Cube: disable css on LSE
* Input: format code
* Make: add bootloader source code to formatting rule
* F3: enable rf by default, adjust clock settings, map all pins where they should be.
* libs for coreglitch_demo_0
* nvic priority
* bus clocks all to 64
* lf-rfid timer and pin
* irda
* ir rx setup
* tim2 irq handler
* Makefile: environment aware mkdir
* Makefile, Irukagotchi: commit seq number.
* split falling and rising ir rx events
* Makefile: proper git branch detect on old git. Firmware: api fix.
* fix irda
* Makefile,Irukagotchi: date timestamp.
* NFC: adjust SPI speed
* Irukagotchi: format code
* Make: add blackmagic debug in host mode
* Makefile: detach blackmagic from terminal signals
* Makefile,Irukagotchi: stamp target
* add F3 bootloader/firmware to CI

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-11-06 13:52:50 +03:00
coreglitch
bce6f867f1
show target version, date, commit hash and branch (#221) 2020-11-06 12:31:06 +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
あく
805bb886c0
Implement bootloader #137 (#142)
* Boot: switch to DFU routines. Implements #132 part 1 of 2.

* Boot: boot to DFU shortcut, hard reset USB on each boot. Implements #132 part 2 of 2.

* Deploy scripts: fix path for deploy dfu.

* Bootloader: initial version. Target_f2: rebase, update deployment scripts.

* Bootloader: cleanup, refactor switch2 proc. Readme,wiki: document bootloader.

* Wiki: deploy symlinks as files, bootloader info.

* Target_f2: valid flash size in linker script.

* Github CI: bootloader build and artifacts.

* Bootloader: rename platforms to targets.

* Bootloader: change dfu/os colors.

* disable set -e

* lint code

* add bootloader testing page

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-10-01 02:05:04 +03:00