2021-06-23 17:58:44 +03:00
# About
2021-10-21 15:24:34 +03:00
This folder contains supplementary scripts that automates routine actions.
2021-06-23 17:58:44 +03:00
Flashing scripts are based on cli version of [STM32CubeProgrammer ](https://www.st.com/en/development-tools/stm32cubeprog.html ).
You will need to add STM32_Programmer_CLI to your path to use them.
# Flashing empty MCU/Flipper
2021-12-01 02:53:53 +03:00
Always flash your device in the following sequence:
2021-06-23 17:58:44 +03:00
- OTP (Only on empty MCU)
2021-10-21 15:24:34 +03:00
- Core1 and Core2 firmware flashing
2021-06-23 17:58:44 +03:00
- Option Bytes
## Otp flashing
!!! Flashing incorrect OTP may permanently brick your device !!!
2021-10-21 15:24:34 +03:00
Normally OTP data generated and flashed at the factory.
2021-06-23 17:58:44 +03:00
In case if MCU was replaced you'll need correct OTP data to be able to use companion applications.
2021-10-21 15:24:34 +03:00
Use `otp.py` to generate and flash OTP data.
2021-12-01 02:53:53 +03:00
You will need exact main board revision to generate OTP data. It can be found on main PCB.
2021-10-21 15:24:34 +03:00
Also display type, region and etc...
2021-06-23 17:58:44 +03:00
!!! Flashing incorrect OTP may permanently brick your device !!!
2021-10-21 15:24:34 +03:00
## Core1 and Core2 firmware flashing
2021-06-23 17:58:44 +03:00
2021-10-21 15:24:34 +03:00
Core2 goes first, then Core1.
2022-12-28 17:30:20 +03:00
Never flash FUS or you will lose your job, girlfriend and keys in secure enclave.
2021-06-23 17:58:44 +03:00
## Option Bytes
2021-12-01 02:53:53 +03:00
!!! Setting incorrect Option Bytes may brick your MCU !!!
2021-06-23 17:58:44 +03:00
Defaults are mostly OK, but there are couple things that we'd like to tune.
2022-12-28 17:30:20 +03:00
Also, OB may be damaged, so we've made couple scripts to check and set option bytes.
2021-06-23 17:58:44 +03:00
2021-12-01 02:53:53 +03:00
!!! Setting incorrect Option Bytes may brick your MCU !!!
2021-06-23 17:58:44 +03:00
Checking option bytes:
2021-08-17 13:38:47 +03:00
```bash
ob.py check
```
2021-06-23 17:58:44 +03:00
Setting option bytes:
2021-08-17 13:38:47 +03:00
```bash
ob.py set
```
2021-08-20 22:56:43 +03:00
# Assets delivery
2023-10-30 18:17:30 +03:00
Build the firmware and run in the root folder of the repo:
2021-08-20 22:56:43 +03:00
```bash
2023-10-30 18:17:30 +03:00
python scripts/storage.py -p < flipper_cli_port > send build/latest/resources /ext
2022-05-06 16:37:10 +03:00
```
2022-07-26 15:44:03 +03:00
# Slideshow creation
Put fullscreen slideshow frames in .png format into `assets/slideshow/my_show` folder, named frame_xx.png, where xx is zero-padded frame number, starting with #0 .
Then run
```bash
python scripts/slideshow.py -i assets/slideshow/my_show/ -o assets/slideshow/my_show/.slideshow
```
2022-12-28 17:30:20 +03:00
Upload generated .slideshow file to Flipper's internal storage and restart it.