Skip to content

Commit

Permalink
Add build for Waveshare RP2040-PiZero
Browse files Browse the repository at this point in the history
  • Loading branch information
jfedor2 committed Dec 13, 2023
1 parent be9a718 commit ea6ed57
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-rp2040.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ jobs:
PICO_BOARD=feather_host cmake ..
make remapper
cd ..
mkdir build-waveshare_rp2040_pizero
cd build-waveshare_rp2040_pizero
PICO_BOARD=waveshare_rp2040_pizero cmake ..
make remapper
cd ..
mkdir artifacts
mv build/*.uf2 artifacts
mv build-boards/remapper_dual_a.uf2 artifacts/remapper_board.uf2
mv build-feather/remapper.uf2 artifacts/remapper_feather.uf2
mv build-waveshare_rp2040_pizero/remapper.uf2 artifacts/remapper_waveshare_rp2040_pizero.uf2
working-directory: ./firmware
- uses: actions/upload-artifact@v3
with:
Expand Down
31 changes: 31 additions & 0 deletions firmware/src/boards/waveshare_rp2040_pizero.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// -----------------------------------------------------
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
// -----------------------------------------------------

#ifndef _BOARDS_WAVESHARE_RP2040_PIZERO_H
#define _BOARDS_WAVESHARE_RP2040_PIZERO_H

#define WAVESHARE_RP2040_PIZERO_BOARD

#define GPIO_VALID_PINS_BASE 0b00111111111111111111111111111111

#define PICO_DEFAULT_PIO_USB_DP_PIN 6

// --- FLASH ---

#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1

#ifndef PICO_FLASH_SPI_CLKDIV
#define PICO_FLASH_SPI_CLKDIV 2
#endif

#ifndef PICO_FLASH_SIZE_BYTES
#define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024)
#endif

#ifndef PICO_RP2040_B0_SUPPORTED
#define PICO_RP2040_B0_SUPPORTED 1
#endif

#endif

0 comments on commit ea6ed57

Please sign in to comment.