From 315e2e4a9f166d028d1c80a19e2a793c5b1c0674 Mon Sep 17 00:00:00 2001 From: yair Date: Wed, 18 Feb 2026 09:52:19 +0200 Subject: [PATCH] Set vga_monoscope default boot mode to PAL 720x576 and add build instructions --- BUILD_INSTRUCTIONS.md | 61 +++++++++++++++++++++++++++++ examples/vga_monoscope/src/main.cpp | 6 +-- 2 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 BUILD_INSTRUCTIONS.md diff --git a/BUILD_INSTRUCTIONS.md b/BUILD_INSTRUCTIONS.md new file mode 100644 index 0000000..b656e95 --- /dev/null +++ b/BUILD_INSTRUCTIONS.md @@ -0,0 +1,61 @@ +# Build Instructions + +This project uses CMake with the Raspberry Pi Pico SDK and an ARM cross-toolchain. + +## Prerequisites (Ubuntu/Debian) + +Install required packages: + +```bash +sudo apt-get update +sudo apt-get install -y \ + cmake \ + ninja-build \ + gcc-arm-none-eabi \ + binutils-arm-none-eabi +``` + +## Configure + +From the repository root: + +```bash +cmake -S . -B build -G Ninja -DPICO_SDK_FETCH_FROM_GIT=ON +``` + +Notes: +- `PICO_SDK_FETCH_FROM_GIT=ON` automatically downloads the Pico SDK into `build/_deps`. +- If you already have a local Pico SDK, set `PICO_SDK_PATH` instead. + +## Build the Monoscope Example + +```bash +cmake --build build --target vga_monoscope -j +``` + +## Output Artifacts + +After a successful build, files are generated here: + +- `build/examples/vga_monoscope/vga_monoscope.uf2` +- `build/examples/vga_monoscope/vga_monoscope.hex` +- `build/examples/vga_monoscope/vga_monoscope.bin` +- `build/examples/vga_monoscope/build/vga_monoscope.elf` + +## Rebuild + +To rebuild after source changes: + +```bash +cmake --build build --target vga_monoscope +``` + +## Clean Build + +To start from a clean state: + +```bash +rm -rf build +cmake -S . -B build -G Ninja -DPICO_SDK_FETCH_FROM_GIT=ON +cmake --build build --target vga_monoscope -j +``` diff --git a/examples/vga_monoscope/src/main.cpp b/examples/vga_monoscope/src/main.cpp index 32c954d..af5eef8 100644 --- a/examples/vga_monoscope/src/main.cpp +++ b/examples/vga_monoscope/src/main.cpp @@ -53,7 +53,7 @@ u16 Rows[962]; // RLE rows u8 Img[180000] __attribute__ ((aligned(4))); // RLE image -int MonoSel = 22; // selected videomode +int MonoSel = 1; // selected videomode (PAL 720x576) // monoscope descriptor typedef struct { @@ -262,8 +262,8 @@ int main() // run VGA core StartVgaCore(); - // run default video mode VGA 640x480 - MonoInit(22); + // run default video mode PAL 720x576 + MonoInit(1); while (true) {