Skip to content

Commit cf39f15

Browse files
committed
Adding ESP32-C2 2M flash board
1 parent 457edc3 commit cf39f15

File tree

5 files changed

+107
-0
lines changed

5 files changed

+107
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "supervisor/board.h"
8+
9+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
// Micropython setup
8+
9+
#define MICROPY_HW_BOARD_NAME "ESP8684-DevKitC-02-N2"
10+
#define MICROPY_HW_MCU_NAME "ESP32C2"
11+
12+
#define CIRCUITPY_RGB_STATUS_INVERTED_PWM
13+
#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO0)
14+
#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO1)
15+
#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO8)
16+
17+
#define DEFAULT_UART_BUS_RX (&pin_GPIO19)
18+
#define DEFAULT_UART_BUS_TX (&pin_GPIO20)
19+
20+
#define CIRCUITPY_CONSOLE_UART_RX DEFAULT_UART_BUS_RX
21+
#define CIRCUITPY_CONSOLE_UART_TX DEFAULT_UART_BUS_TX
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CIRCUITPY_CREATOR_ID = 0x000C303A
2+
CIRCUITPY_CREATION_ID = 0x00C20000
3+
4+
IDF_TARGET = esp32c2
5+
6+
CIRCUITPY_ESP_FLASH_MODE = qio
7+
CIRCUITPY_ESP_FLASH_FREQ = 60m
8+
CIRCUITPY_ESP_FLASH_SIZE = 2MB
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include "shared-bindings/board/__init__.h"
2+
3+
static const mp_rom_map_elem_t board_module_globals_table[] = {
4+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
5+
6+
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },
7+
{ MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_GPIO0) },
8+
{ MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
9+
{ MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_GPIO1) },
10+
{ MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) },
11+
{ MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
12+
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
13+
{ MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) },
14+
{ MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) },
15+
{ MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) },
16+
{ MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) },
17+
{ MP_ROM_QSTR(MP_QSTR_LED_BLUE), MP_ROM_PTR(&pin_GPIO8) },
18+
{ MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) },
19+
{ MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },
20+
21+
{ MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },
22+
{ MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) },
23+
{ MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) },
24+
25+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO20) },
26+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO19) },
27+
28+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
29+
};
30+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Espressif IoT Development Framework Configuration
3+
#
4+
#
5+
# Serial flasher config
6+
#
7+
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
8+
# end of Serial flasher config
9+
10+
#
11+
# Component config
12+
#
13+
#
14+
# Hardware Settings
15+
#
16+
#
17+
# Main XTAL Config
18+
#
19+
CONFIG_XTAL_FREQ_26=y
20+
# CONFIG_XTAL_FREQ_40 is not set
21+
CONFIG_XTAL_FREQ=26
22+
# end of Main XTAL Config
23+
24+
# end of Hardware Settings
25+
26+
#
27+
# ESP System Settings
28+
#
29+
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
30+
# end of ESP System Settings
31+
32+
#
33+
# LWIP
34+
#
35+
# end of LWIP
36+
37+
# end of Component config
38+
39+
# end of Espressif IoT Development Framework Configuration

0 commit comments

Comments
 (0)