mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
Git: set git attributes to automatically manage line endings. (#771)
* Git: set git attributes to automatically manage line endings. * Git: cleanup gitignore file
This commit is contained in:
parent
f390060922
commit
bde3a47078
179 changed files with 42218 additions and 42254 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1 +1,2 @@
|
|||
* text=auto
|
||||
|
||||
|
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -9,22 +9,18 @@ compile_commands.json
|
|||
# JetBrains IDEs
|
||||
.idea/
|
||||
|
||||
|
||||
# Python VirtEnvironments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
|
||||
|
||||
# Python Byte-compiled / optimized files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
.obj/
|
||||
target_lo/build/
|
||||
target_*/build/
|
||||
bindings/
|
||||
.DS_Store
|
||||
.mxproject
|
||||
|
@ -35,4 +31,3 @@ bindings/
|
|||
# legendary cmake's
|
||||
build
|
||||
CMakeLists.txt
|
||||
firmware/targets/f2/CMakeLists.txt
|
||||
|
|
|
@ -5,21 +5,18 @@ What it does?
|
|||
- [x] Hardware initialization
|
||||
- [x] Boot process LED indicators
|
||||
- [x] Firmware update
|
||||
- [ ] Firmware CRC check
|
||||
- [ ] Interactive UI
|
||||
- [ ] FS check
|
||||
- [x] Errata crutches
|
||||
- [ ] Recovery mode
|
||||
- [ ] Errata crutches
|
||||
|
||||
# Targets
|
||||
|
||||
| Name | Bootloader | Firmware | Reset | DFU |
|
||||
| | Address | Address | Combo | Combo |
|
||||
-----------------------------------------------------------------------------
|
||||
| f4 | 0x08000000 | 0x00008000 | L+Back | L+Back, hold L |
|
||||
| f7 | 0x08000000 | 0x00008000 | L+Back | L+Back, hold L |
|
||||
|
||||
Also there is a ST bootloader combo available on empty device: L+Ok+Back, release Back,Left.
|
||||
Target independend code and headers in `src`and `target/include` folders.
|
||||
Target independend code and headers in `src` and `target/include` folders.
|
||||
|
||||
# Building
|
||||
|
||||
|
@ -38,16 +35,16 @@ Target independend code and headers in `src`and `target/include` folders.
|
|||
|
||||
# Flashing
|
||||
|
||||
Using stlink(st-flash):
|
||||
Using SWD (STLink):
|
||||
|
||||
`make -C bootloader flash`
|
||||
|
||||
Or use ST bootloader:
|
||||
Or use DFU (USB):
|
||||
|
||||
`make -C bootloader upload`
|
||||
|
||||
# Debug
|
||||
|
||||
Using stlink (st-util + gdb):
|
||||
Using SWD (STLink):
|
||||
|
||||
`make -C bootloader debug`
|
||||
`make -C bootloader debug`
|
||||
|
|
|
@ -1,79 +1,50 @@
|
|||
# Project structure
|
||||
# Flipper firmware
|
||||
|
||||
```
|
||||
.
|
||||
├── applications # Flipper applications
|
||||
├── assets # Assets: icons, animation
|
||||
├── bootloader # Bootloader make project
|
||||
├── core # Main feature like OS, HAL (target-independed)
|
||||
├── core-rs # Rust code
|
||||
├── debug # Debug helpers, configs and plugins
|
||||
├── docker # Docker toolchain container
|
||||
├── firmware # Firmware make project
|
||||
├── lib # Libs and 3rd parties
|
||||
├── make # Makefile scripts
|
||||
```
|
||||
What it does?
|
||||
|
||||
# Bootloader
|
||||
- [x] RTOS
|
||||
- [x] FuriHAL
|
||||
- [x] FuriCore
|
||||
- [x] Services
|
||||
- [x] Applications
|
||||
|
||||
Bootloader must be flashed first.
|
||||
Detailed instruction on how to compile and flash it you can find in `bootloader` folder.
|
||||
# Targets
|
||||
|
||||
# OS
|
||||
| Name | Bootloader | Firmware | Reset | DFU |
|
||||
| | Address | Address | Combo | Combo |
|
||||
-----------------------------------------------------------------------------
|
||||
| f7 | 0x08000000 | 0x00008000 | L+Back | L+Back, hold L |
|
||||
|
||||
CMSIS-RTOS2 over FreeRTOS
|
||||
Also there is a ST bootloader combo available on empty device: L+Ok+Back, release Back,Left.
|
||||
Target independend code and headers in `target/include` folders.
|
||||
|
||||
## Platform code
|
||||
# Building
|
||||
|
||||
CMSIS, Freertos and HAL files are generated by CubeMX.
|
||||
You can find platform code for STM32WB55 version in `f4` folder:
|
||||
## With dev docker image:
|
||||
|
||||
```
|
||||
├── Inc # CubeMX generated headers
|
||||
├── Src # CubeMX generated code
|
||||
├── furi-hal # Our HAL wrappers and platform specifics
|
||||
├── ble-glue # BLE specific code(Glue for STMWPAN)
|
||||
├── f4.ioc # CubeMX project file
|
||||
├── startup_stm32wb55xx_cm4.s # Board startup/initialization assembler code
|
||||
├── stm32wb55xx_flash_cm4*.ld # Linker scripts
|
||||
├── target.mk # Makefile include
|
||||
`docker-compose exec dev make -C firmware`
|
||||
|
||||
```
|
||||
## With toolchain installed in path:
|
||||
|
||||
Working with CubeMX:
|
||||
1. Download CubeMX from [st.com](https://www.st.com/en/development-tools/stm32cubemx.html)
|
||||
2. Open `*.ioc` file
|
||||
3. Do whatever you want to
|
||||
3. Click `generate code`
|
||||
4. After regenerating, look at git status, regeneration may brake some files.
|
||||
5. Check one more time that things that you've changes are not covered in platform furi-hal. Because you know...
|
||||
`make -C firmware`
|
||||
|
||||
# Flipper Universal Registry Implementation (FURI)
|
||||
## Build Options
|
||||
|
||||
FURI is used to:
|
||||
- `DEBUG` - 0/1 - enable or disable debug build. Default is 1.
|
||||
- `TARGET` - string - target to build. Default is `f7`.
|
||||
|
||||
* application control (start, exit, switch between active)
|
||||
* data exchange between application (create/open channel, subscribe and push messages or read/write values)
|
||||
* non-volatile data storage for application (create/open value and read/write)
|
||||
# Flashing
|
||||
|
||||
Read more at [FURI page](FURI)
|
||||
Using SWD (STLink):
|
||||
|
||||
# FS (not implemented)
|
||||
`make -C firmware flash`
|
||||
|
||||
File system is used to volaile storage some files (config, application data, etc.). There are some folders mounted to different volumes:
|
||||
Or use DFU (USB):
|
||||
|
||||
* `/usr` for store static data like assets, menu items. Build system add files to usr while building. It can be useful for exchange some static data between application. For example, your app can add link to itself to Plugins menu items file, user will see your app and can call it from this menu.
|
||||
* Specially `/usr/etc-default` folder contains default configs for apps. Bootloader has `factory default` options to reset applications config. Also when new app is bootstapping, system copy files from default config folder to `/etc`.
|
||||
* `/etc` for store configs of application. This volume not overwrite during flashing.
|
||||
* `/var` for store some application data (saved keys, application database, logs). This volume also not overwrite during flashing.
|
||||
* `/media/*` mounted if SD card is inserted.
|
||||
`make -C firmware upload`
|
||||
|
||||
# Flipper applications
|
||||
# Debug
|
||||
|
||||
Each flipper functionality except OS/HAL/FURI doing by Flipper application. Some application are called at startup, the rest are called by the user (for example, from menu).
|
||||
Using SWD (STLink):
|
||||
|
||||
(you can see some [examples](Application-examples))
|
||||
|
||||
For exchange data between application each app expose own record in FURI. You can subscribe on/read record to get data from application and write to record to send data to application.
|
||||
|
||||
**[List of FURI records](FURI-records-list)**
|
||||
`make -C firmware debug`
|
||||
|
|
Loading…
Reference in a new issue