Skip to content

Commit c51081c

Browse files
Paul Graysondpgeorge
authored andcommitted
rp2/boards: Add support for Pololu 3pi+ and Zumo robots.
Signed-off-by: Paul Grayson <[email protected]>
1 parent fbf079d commit c51081c

File tree

9 files changed

+175
-0
lines changed

9 files changed

+175
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"USB-C",
8+
"IMU",
9+
"RGB LED",
10+
"Display",
11+
"Dual-core",
12+
"External Flash"
13+
],
14+
"images": [
15+
"pololu_3pi_2040_robot.jpg"
16+
],
17+
"mcu": "rp2040",
18+
"product": "Pololu 3pi+ 2040 Robot",
19+
"thumbnail": "",
20+
"url": "https://www.pololu.com/3pi",
21+
"vendor": "Pololu"
22+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# cmake file for Pololu 3pi+ 2040 Robot
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
3+
// Board and hardware specific configuration
4+
#define MICROPY_HW_BOARD_NAME "Pololu 3pi+ 2040 Robot"
5+
#define MICROPY_HW_FLASH_STORAGE_BYTES (15 * 1024 * 1024)
6+
7+
#define MICROPY_HW_USB_MSC (1)
8+
#define MICROPY_HW_USB_VID (0x1FFB)
9+
#define MICROPY_HW_USB_PID (0x2043)
10+
#define MICROPY_HW_USB_DESC_STR_MAX (40)
11+
#define MICROPY_HW_USB_MANUFACTURER_STRING "Pololu Corporation"
12+
#define MICROPY_HW_USB_PRODUCT_FS_STRING MICROPY_HW_BOARD_NAME " MicroPython"
13+
14+
#define MICROPY_BANNER_MACHINE MICROPY_HW_BOARD_NAME
15+
16+
#define MICROPY_HW_I2C_NO_DEFAULT_PINS (1)
17+
#define MICROPY_HW_SPI_NO_DEFAULT_PINS (1)
18+
#define MICROPY_HW_UART_NO_DEFAULT_PINS (1)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
GP0,GPIO0
2+
GP1,GPIO1
3+
GP2,GPIO2
4+
GP3,GPIO3
5+
GP4,GPIO4
6+
GP5,GPIO5
7+
GP6,GPIO6
8+
GP7,GPIO7
9+
GP8,GPIO8
10+
GP9,GPIO9
11+
GP10,GPIO10
12+
GP11,GPIO11
13+
GP12,GPIO12
14+
GP13,GPIO13
15+
GP14,GPIO14
16+
GP15,GPIO15
17+
GP16,GPIO16
18+
GP17,GPIO17
19+
GP18,GPIO18
20+
GP19,GPIO19
21+
GP20,GPIO20
22+
GP21,GPIO21
23+
GP22,GPIO22
24+
GP23,GPIO23
25+
GP24,GPIO24
26+
GP25,GPIO25
27+
GP26,GPIO26
28+
GP27,GPIO27
29+
GP28,GPIO28
30+
GP29,GPIO29
31+
LED,GPIO25
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"USB-C",
8+
"JST-SH",
9+
"IMU",
10+
"RGB LED",
11+
"Display",
12+
"Dual-core",
13+
"External Flash"
14+
],
15+
"images": [
16+
"pololu_zumo_2040_robot.jpg"
17+
],
18+
"mcu": "rp2040",
19+
"product": "Pololu Zumo 2040 Robot",
20+
"thumbnail": "",
21+
"url": "https://www.pololu.com/zumo",
22+
"vendor": "Pololu"
23+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# cmake file for Pololu Zumo 2040 Robot
2+
3+
# This board is not yet in upstream pico-sdk, so define it here
4+
# See also: https://github.com/raspberrypi/pico-sdk/tree/master/src/boards/include/boards
5+
list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR})
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
3+
// Board and hardware specific configuration
4+
#define MICROPY_HW_BOARD_NAME "Pololu Zumo 2040 Robot"
5+
#define MICROPY_HW_FLASH_STORAGE_BYTES (15 * 1024 * 1024)
6+
7+
#define MICROPY_HW_USB_MSC (1)
8+
#define MICROPY_HW_USB_VID (0x1FFB)
9+
#define MICROPY_HW_USB_PID (0x2044)
10+
#define MICROPY_HW_USB_DESC_STR_MAX (40)
11+
#define MICROPY_HW_USB_MANUFACTURER_STRING "Pololu Corporation"
12+
#define MICROPY_HW_USB_PRODUCT_FS_STRING MICROPY_HW_BOARD_NAME " MicroPython"
13+
14+
#define MICROPY_BANNER_MACHINE MICROPY_HW_BOARD_NAME
15+
16+
#define MICROPY_HW_I2C_NO_DEFAULT_PINS (1)
17+
#define MICROPY_HW_SPI_NO_DEFAULT_PINS (1)
18+
#define MICROPY_HW_UART_NO_DEFAULT_PINS (1)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
GP0,GPIO0
2+
GP1,GPIO1
3+
GP2,GPIO2
4+
GP3,GPIO3
5+
GP4,GPIO4
6+
GP5,GPIO5
7+
GP6,GPIO6
8+
GP7,GPIO7
9+
GP8,GPIO8
10+
GP9,GPIO9
11+
GP10,GPIO10
12+
GP11,GPIO11
13+
GP12,GPIO12
14+
GP13,GPIO13
15+
GP14,GPIO14
16+
GP15,GPIO15
17+
GP16,GPIO16
18+
GP17,GPIO17
19+
GP18,GPIO18
20+
GP19,GPIO19
21+
GP20,GPIO20
22+
GP21,GPIO21
23+
GP22,GPIO22
24+
GP23,GPIO23
25+
GP24,GPIO24
26+
GP25,GPIO25
27+
GP26,GPIO26
28+
GP27,GPIO27
29+
GP28,GPIO28
30+
GP29,GPIO29
31+
LED,GPIO25
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2023 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+
#ifndef _POLOLU_ZUMO_2040_ROBOT_H
13+
#define _POLOLU_ZUMO_2040_ROBOT_H
14+
15+
// For board detection
16+
#define POLOLU_ZUMO_2040_ROBOT
17+
18+
#define PICO_DEFAULT_LED_PIN 25
19+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
20+
#define PICO_FLASH_SPI_CLKDIV 2
21+
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
22+
23+
// All boards have at least the B1 revision
24+
#define PICO_RP2040_B0_SUPPORTED 0
25+
26+
#endif

0 commit comments

Comments
 (0)