[skip ci] readme update

pull/30/head
Piotr Lewandowski 2023-07-14 00:26:02 +02:00
rodzic ff8b808c49
commit 8e326bb852
1 zmienionych plików z 28 dodań i 16 usunięć

Wyświetl plik

@ -1,17 +1,18 @@
# UV_K5_playground
To support ongoing work, you can make a [donation](https://paypal.me/sq9p).
## src/messenger ![auto release build](https://github.com/piotr022/UV_K5_playground/actions/workflows/c-cpp.yml/badge.svg)
![messenger](./docs/messenger.gif)
AFSK messenger with T9 typing support
* download mod [uv_k5_01_26_cold_messenger_encoded.bin](https://github.com/piotr022/UV_K5_playground/releases/latest)
* to enable messenger view press **flash light button**
* use keyboard to type message
* use keyboard to type message
* press **MENU** to send message
* press **EXIT** to clear message
* if message is cleared use **EXIT** to exit messenger view
* There is no timeout for the button. If you want to type letters located on the same button in a row, use an asterisk (*) to confirm the selected character
To show your appreciation and support for ongoing work, you can make a [donation](https://paypal.me/sq9p).
## src/spectrum ![auto release build](https://github.com/piotr022/UV_K5_playground/actions/workflows/c-cpp.yml/badge.svg)
![spectrum](./docs/spectrum.gif)
**update**
Spectrum scanner. It prints a spectrum graph. Zoom in well as resolution can be controled via keyboard.
@ -47,14 +48,15 @@ Chinese mcu DP32G030 has feature called flash masking, here is how it works:
![original_memory layout](./docs/memory-map-original-fw.png)
## libs/k5_uv_system (par_runner)
The idea is to run this firmware 'parallel' with the original Quencheng firmware. This can be achieved by relocating the original vector table to the end of the original firmware, and placing a new vector table at the beginning, with entities pointing to the par_runner functions that wrap the original firmware handlers.
Every interrupt is first processed by the par_runner handlers, which can perform tasks like responding to a button press(todo), before invoking the original firmware handler
Every interrupt is first processed by the par_runner handlers, which can perform some tasks, before invoking the original firmware handler
#### flash memory layout
When building the "par_runner" target automaticly "bootloader" target will be build
![memory layout](./docs/memory-map.png)
building par_runner target will result in following outputs:
* par_runner.bin / .hex - right part of image, can be used to generate encrypted firmware compatible with orginal Quescheng update tool
building UV_K5_Playground target will result in following outputs:
* target.bin / .hex - right part of image, can be used to generate encrypted firmware compatible with orginal Quescheng update tool
* bootloader.bin - stripped bootloader from orginal firmware
* par_runner_with_bootloader.bin - complete firmware image
* target_with_bootloader.bin - complete firmware image
* target_encoded.bin - encrypted binary that can be uploaded through quancheng upload tool
To change the original firmware that will be wrapped and placed into the original firmware section, replace `./original_fw/original_fw.bin` or set the variable
```CMakeLists.txt set(ORGINAL_FW_BIN orginal_fw.bin)```
@ -71,27 +73,37 @@ currently tested on windows, requred:
All folders with executables of the above programs should be added to the PATH environment variable.
After cloning repo init submodules:
```$ git submodule update --init --recursive```
install dependencies needed by [fw_pack.py](https://github.com/amnemonic/Quansheng_UV-K5_Firmware)
```$ pip install pyserial```
for debugging:
* vs code
* Cortex-Debug plugin
* CMake plugin
### building
##### via terminal
#### via terminal
```$ mkdir build```
```$ cd build```
```$ cmake ../ -G Ninja```
```$ ninja par_runner```
outputs ./build/src/par_runner/par_runner.bin / hex / elf
###### uploading
```$ ninja par_runner_flash```
```$ cmake ../ -G Ninja```
**for all targets:**
```$ ninja```
**for specific target:**
```$ ninja target_name```
current targets: pong, rssi_printer, rssi_sbar, messenger, most_useless_mod, spectrum
to build binary that can be uploaded by quancheng fw update tool use *_encoded* suffix for example:
```$ ninja rssi_sbar_encoded```
###### uploading via openocd
```$ ninja rssi_sbar_flash```
##### via VS Code
Select the par_runner build target in the bottom bar and press build.
#### via VS Code
Select the specific build target in the bottom bar and press build.
###### uploading
Enter the 'Run & Debug' tab, select 'kwaczek DBG', and press run.
## useful links
## links
* currently firmare that is wrapped by par_runner comes from Tunas1337 mod
k5_26_encrypted_18to1300MHz.bin [UV-K5-Modded-Firmwares](https://github.com/Tunas1337/UV-K5-Modded-Firmwares)
* crypting/encrypting/modding py tools [amnemonic repo](https://github.com/amnemonic/Quansheng_UV-K5_Firmware)