Skip to content

Commit 6f8055f

Browse files
Add a board definition for the RP Debug Probe (#2940)
* Add a board definition for the RP Debug Probe This minimal configuration will (hopefully) allow the Raspberry Pi Debug Probe firmware to be configured and built using the SDK's board identification and configuration framework. * Add defines for each Debug Probe LED. These board-specific defines will make it easier for clients (e.g. the debug probe firmware) to properly configure all of the board's LEDs.
1 parent 7e3784f commit 6f8055f

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
// -----------------------------------------------------
8+
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
9+
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
10+
// -----------------------------------------------------
11+
12+
// This header may be included by other board headers as "boards/debug_probe.h"
13+
14+
#ifndef _BOARDS_DEBUG_PROBE_H
15+
#define _BOARDS_DEBUG_PROBE_H
16+
17+
pico_board_cmake_set(PICO_PLATFORM, rp2040)
18+
19+
// For board detection
20+
#define RASPBERRYPI_DEBUG_PROBE
21+
22+
// --- BOARD SPECIFIC ---
23+
#define DEBUG_PROBE_USB_CONNECTED_LED_PIN 2
24+
#define DEBUG_PROBE_DAP_CONNECTED_LED_PIN 15
25+
#define DEBUG_PROBE_DAP_RUNNING_LED_PIN 16
26+
#define DEBUG_PROBE_UART_RX_LED_PIN 7
27+
#define DEBUG_PROBE_UART_TX_LED_PIN 8
28+
29+
// --- UART ---
30+
#ifndef PICO_DEFAULT_UART
31+
#define PICO_DEFAULT_UART 1
32+
#endif
33+
#ifndef PICO_DEFAULT_UART_TX_PIN
34+
#define PICO_DEFAULT_UART_TX_PIN 4
35+
#endif
36+
#ifndef PICO_DEFAULT_UART_RX_PIN
37+
#define PICO_DEFAULT_UART_RX_PIN 5
38+
#endif
39+
40+
// --- LED ---
41+
#ifndef PICO_DEFAULT_LED_PIN
42+
#define PICO_DEFAULT_LED_PIN DEBUG_PROBE_USB_CONNECTED_LED_PIN
43+
#endif
44+
45+
// --- FLASH ---
46+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
47+
48+
#ifndef PICO_FLASH_SPI_CLKDIV
49+
#define PICO_FLASH_SPI_CLKDIV 2
50+
#endif
51+
52+
pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024))
53+
#ifndef PICO_FLASH_SIZE_BYTES
54+
#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024)
55+
#endif
56+
57+
#ifndef PICO_RP2040_B0_SUPPORTED
58+
#define PICO_RP2040_B0_SUPPORTED 1
59+
#endif
60+
61+
#endif

0 commit comments

Comments
 (0)