Merge branch 'main' of github.com:piotr022/UV_K5_playground

pull/1/head
Piotr Lewandowski 2023-06-25 14:29:54 +02:00
commit f53edd686b
1 zmienionych plików z 44 dodań i 0 usunięć

44
README.md 100644
Wyświetl plik

@ -0,0 +1,44 @@
# UV_K5_playground
## src/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.
#### flash memory layout
making "par_runner" target will result binary with sectons in the following order:
1. par_runner vector table
2. orginal firmware
3. relocated orginal fw vector table
4. .text and other flash sections of par_runner
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)```
in ./orginal_fw/CMakeLists.txt
and rebuild par_runner
## build system installation
currently tested on windows, requred:
* arm-none-eabi-gcc
* python (i have newest version)
* cmake
* ninja
* open-ocd
All folders with executables of the above programs should be added to the PATH environment variable.
for debugging:
* vs code
* Cortex-Debug plugin
* CMake plugin
### building
##### 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```
##### via VS Code
Select the par_runner build target in the bottom bar and press build.
###### uploading
Enter the 'Run & Debug' tab, select 'kwaczek DBG', and press run.