From 74b2c9bbadc2f0086e46dd2bbbc3f0f88574d3db Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Wed, 24 Jan 2024 14:03:17 +1100 Subject: [PATCH] esp32/boards/ESP32_GENERIC_C6: Add support for esp32c6. Signed-off-by: Andrew Leech --- .../esp32/boards/ESP32_GENERIC_C6/board.json | 19 +++++++++++++++++++ .../ESP32_GENERIC_C6/mpconfigboard.cmake | 9 +++++++++ .../boards/ESP32_GENERIC_C6/mpconfigboard.h | 12 ++++++++++++ .../boards/ESP32_GENERIC_C6/sdkconfig.board | 7 +++++++ 4 files changed, 47 insertions(+) create mode 100644 ports/esp32/boards/ESP32_GENERIC_C6/board.json create mode 100644 ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.cmake create mode 100644 ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.h create mode 100644 ports/esp32/boards/ESP32_GENERIC_C6/sdkconfig.board diff --git a/ports/esp32/boards/ESP32_GENERIC_C6/board.json b/ports/esp32/boards/ESP32_GENERIC_C6/board.json new file mode 100644 index 0000000000..963d9515be --- /dev/null +++ b/ports/esp32/boards/ESP32_GENERIC_C6/board.json @@ -0,0 +1,19 @@ +{ + "deploy": [ + "../deploy_c6.md" + ], + "docs": "", + "features": [ + "BLE", + "WiFi" + ], + "id": "esp32c6", + "images": [ + "esp32c6_devkitmini.jpg" + ], + "mcu": "esp32c6", + "product": "ESP32-C6", + "thumbnail": "", + "url": "https://www.espressif.com/en/products/modules", + "vendor": "Espressif" +} diff --git a/ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.cmake b/ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.cmake new file mode 100644 index 0000000000..31ec4f4ad9 --- /dev/null +++ b/ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.cmake @@ -0,0 +1,9 @@ +set(IDF_TARGET esp32c6) + +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.ble + boards/ESP32_GENERIC_C6/sdkconfig.board +) + +#set(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE "y") diff --git a/ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.h b/ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.h new file mode 100644 index 0000000000..b5b06b955b --- /dev/null +++ b/ports/esp32/boards/ESP32_GENERIC_C6/mpconfigboard.h @@ -0,0 +1,12 @@ +// This configuration is for a generic ESP32C6 board with 4MiB (or more) of flash. + +#define MICROPY_HW_BOARD_NAME "ESP32C6 module" +#define MICROPY_HW_MCU_NAME "ESP32C6" + +#define MICROPY_HW_ENABLE_SDCARD (0) +#define MICROPY_PY_MACHINE_DAC (0) +#define MICROPY_PY_MACHINE_I2S (0) + +// #define MICROPY_PY_BLUETOOTH (1) +// #define MICROPY_BLUETOOTH_NIMBLE (1) +// #define MICROPY_BLUETOOTH_NIMBLE_BINDINGS_ONLY (1) diff --git a/ports/esp32/boards/ESP32_GENERIC_C6/sdkconfig.board b/ports/esp32/boards/ESP32_GENERIC_C6/sdkconfig.board new file mode 100644 index 0000000000..a67a13abfd --- /dev/null +++ b/ports/esp32/boards/ESP32_GENERIC_C6/sdkconfig.board @@ -0,0 +1,7 @@ +CONFIG_ESP32C6_BROWNOUT_DET=y +CONFIG_ESP32C6_BROWNOUT_DET_LVL_SEL_7= +CONFIG_ESP32C6_BROWNOUT_DET_LVL_SEL_4=y +CONFIG_ESP32C6_BROWNOUT_DET_LVL=4 +CONFIG_ESP_CONSOLE_UART_DEFAULT= +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y