36 lines
981 B
Markdown
36 lines
981 B
Markdown
# YMF-262 Firmware for Nucleo F722ZE Board and STM32F7 MCU
|
|
|
|
|
|
## Building
|
|
|
|
To build a Flashable .elf file issue the following commands:
|
|
|
|
- Debug:
|
|
|
|
```cmake --preset Debug && cmake --build --preset Debug```
|
|
|
|
- Release:
|
|
|
|
```cmake --preset Release && cmake --build --preset Release```
|
|
|
|
## Flashing:
|
|
To flash the .elf file please issue the following command:
|
|
|
|
```openocd -f interface/stlink.cfg -f target/stm32f7x.cfg -c "program YMF262_Devboard_Firmware.elf verify reset exit"```
|
|
|
|
## Testing
|
|
|
|
The HAL logic is unit-tested on the host (x86) using GoogleTest, with a `FakeGpio` mock that records the GPIO operations instead of touching hardware. This verifies the YMF262 write choreography (two-cycle address/data sequence and timing) without needing the physical chip.
|
|
|
|
To build and run the tests:
|
|
|
|
````cd Tests
|
|
cmake -B build
|
|
cmake --build build
|
|
./build/run_tests```
|
|
|
|
GoogleTest is fetched automatically via CMake FetchContent on the first configure (requires internet).
|
|
````
|
|
|
|
|