diff --git a/ports/esp32/boards/DENEYAP_KART/board.json b/ports/esp32/boards/DENEYAP_KART/board.json new file mode 100644 index 0000000000..4d7145b0e3 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART/board.json @@ -0,0 +1,30 @@ +{ + "deploy": [ + "../deploy.md" + ], + "docs": "", + "features": [ + "BLE", + "WiFi", + "SPIRAM", + "IMU", + "Microphone", + "Battery Charging", + "STEMMA QT/QWIIC", + "RGB LED", + "USB-MICRO", + "Breadboard friendly" + ], + "id": "dydk_mpv10", + "images": [ + "deneyapkart.jpg" + ], + "mcu": "esp32", + "product": "Deneyap Kart", + "thumbnail": "", + "url": "https://deneyapkart.org/", + "variants": { + "idf3": "Compiled with IDF 3.x" + }, + "vendor": "T3 Foundation" +} diff --git a/ports/esp32/boards/DENEYAP_KART/board.md b/ports/esp32/boards/DENEYAP_KART/board.md new file mode 100644 index 0000000000..9440fc1f1a --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART/board.md @@ -0,0 +1,2 @@ +The following files are daily firmware for Deneyap Kart. +This firmware is compiled using ESP-IDF v4.x. Some older releases are also provided that are compiled with ESP-IDF v3.x. diff --git a/ports/esp32/boards/DENEYAP_KART/manifest.py b/ports/esp32/boards/DENEYAP_KART/manifest.py new file mode 100644 index 0000000000..7ae2ed15d9 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +freeze("modules") diff --git a/ports/esp32/boards/DENEYAP_KART/modules/deneyapkart.py b/ports/esp32/boards/DENEYAP_KART/modules/deneyapkart.py new file mode 100644 index 0000000000..b44b6b0875 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART/modules/deneyapkart.py @@ -0,0 +1,34 @@ +# Deneyap Kart Helper Library + +from micropython import const +from machine import Pin + +# Pin Assignments + +# SPI +SPI_MOSI = const(5) +SPI_MISO = const(18) +SPI_CLK = const(19) + +# I2C +I2C_SDA = const(4) +I2C_SCL = const(15) + +# DAC +DAC1 = const(25) +DAC2 = const(26) + +# RGB LED +LEDR = const(3) +LEDG = const(1) +LEDB = const(4) + +# BUTTON +GPKEY = const(0) + +# Built-in peripherals + +ledr = Pin(LEDR, Pin.OUT, value=0) +ledg = Pin(LEDG, Pin.OUT, value=0) +ledb = Pin(LEDB, Pin.OUT, value=0) +gpkey = Pin(GPKEY, Pin.IN, Pin.PULL_UP) diff --git a/ports/esp32/boards/DENEYAP_KART/mpconfigboard.cmake b/ports/esp32/boards/DENEYAP_KART/mpconfigboard.cmake new file mode 100644 index 0000000000..18da741be5 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART/mpconfigboard.cmake @@ -0,0 +1,9 @@ +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.ble + boards/sdkconfig.240mhz + boards/sdkconfig.spiram + boards/DENEYAP_KART/sdkconfig.board +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/esp32/boards/DENEYAP_KART/mpconfigboard.h b/ports/esp32/boards/DENEYAP_KART/mpconfigboard.h new file mode 100644 index 0000000000..4a63f50672 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART/mpconfigboard.h @@ -0,0 +1,10 @@ +#define MICROPY_HW_BOARD_NAME "Deneyap Kart" +#define MICROPY_HW_MCU_NAME "ESP32" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "DeneyapKart" + +#define MICROPY_HW_I2C0_SCL (15) +#define MICROPY_HW_I2C0_SDA (4) + +#define MICROPY_HW_SPI1_SCK (19) +#define MICROPY_HW_SPI1_MOSI (5) +#define MICROPY_HW_SPI1_MISO (18) diff --git a/ports/esp32/boards/DENEYAP_KART/sdkconfig.board b/ports/esp32/boards/DENEYAP_KART/sdkconfig.board new file mode 100644 index 0000000000..98dc8178f1 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART/sdkconfig.board @@ -0,0 +1,8 @@ +CONFIG_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_SPIRAM_SPEED_80M=y +CONFIG_ESP32_REV_MIN_1=y +CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKart" + +# SPIRAM increases the size of the firmware, use -Os to reduce it again to fit in iram +CONFIG_COMPILER_OPTIMIZATION_SIZE=y diff --git a/ports/esp32/boards/DENEYAP_KART_1A/board.json b/ports/esp32/boards/DENEYAP_KART_1A/board.json new file mode 100644 index 0000000000..117e80a9d0 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A/board.json @@ -0,0 +1,28 @@ +{ + "deploy": [ + "../deploy.md" + ], + "docs": "", + "features": [ + "BLE", + "WiFi", + "SPIRAM", + "Battery Charging", + "STEMMA QT/QWIIC", + "RGB LED", + "USB-MICRO", + "Breadboard friendly" + ], + "id": "dydk1a_mpv10", + "images": [ + "deneyapkart1a.jpg" + ], + "mcu": "esp32", + "product": "Deneyap Kart 1A", + "thumbnail": "", + "url": "https://deneyapkart.org/", + "variants": { + "idf3": "Compiled with IDF 3.x" + }, + "vendor": "T3 Foundation" +} diff --git a/ports/esp32/boards/DENEYAP_KART_1A/board.md b/ports/esp32/boards/DENEYAP_KART_1A/board.md new file mode 100644 index 0000000000..52fe5f91d9 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A/board.md @@ -0,0 +1,2 @@ +The following files are daily firmware for Deneyap Kart 1A. +This firmware is compiled using ESP-IDF v4.x. Some older releases are also provided that are compiled with ESP-IDF v3.x. diff --git a/ports/esp32/boards/DENEYAP_KART_1A/manifest.py b/ports/esp32/boards/DENEYAP_KART_1A/manifest.py new file mode 100644 index 0000000000..7ae2ed15d9 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +freeze("modules") diff --git a/ports/esp32/boards/DENEYAP_KART_1A/modules/deneyapkart1a.py b/ports/esp32/boards/DENEYAP_KART_1A/modules/deneyapkart1a.py new file mode 100644 index 0000000000..2d042cd25b --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A/modules/deneyapkart1a.py @@ -0,0 +1,30 @@ +# Deneyap Kart 1A Helper Library + +from micropython import const +from machine import Pin + +# Pin Assignments + +# SPI +SPI_MOSI = const(5) +SPI_MISO = const(18) +SPI_CLK = const(19) + +# I2C +I2C_SDA = const(4) +I2C_SCL = const(15) + +# DAC +DAC1 = const(25) +DAC2 = const(26) + +# RGB LED +RGBLED = const(13) + +# BUTTON +GPKEY = const(0) + +# Built-in peripherals + +rgbled = Pin(RGBLED, Pin.OUT, value=0) +gpkey = Pin(GPKEY, Pin.IN, Pin.PULL_UP) diff --git a/ports/esp32/boards/DENEYAP_KART_1A/mpconfigboard.cmake b/ports/esp32/boards/DENEYAP_KART_1A/mpconfigboard.cmake new file mode 100644 index 0000000000..3c0265939b --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A/mpconfigboard.cmake @@ -0,0 +1,9 @@ +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.ble + boards/sdkconfig.240mhz + boards/sdkconfig.spiram + boards/DENEYAP_KART_1A/sdkconfig.board +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/esp32/boards/DENEYAP_KART_1A/mpconfigboard.h b/ports/esp32/boards/DENEYAP_KART_1A/mpconfigboard.h new file mode 100644 index 0000000000..95f65ec663 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A/mpconfigboard.h @@ -0,0 +1,10 @@ +#define MICROPY_HW_BOARD_NAME "Deneyap Kart 1A" +#define MICROPY_HW_MCU_NAME "ESP32" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "DeneyapKart1A" + +#define MICROPY_HW_I2C0_SCL (15) +#define MICROPY_HW_I2C0_SDA (4) + +#define MICROPY_HW_SPI1_SCK (19) +#define MICROPY_HW_SPI1_MOSI (5) +#define MICROPY_HW_SPI1_MISO (18) diff --git a/ports/esp32/boards/DENEYAP_KART_1A/sdkconfig.board b/ports/esp32/boards/DENEYAP_KART_1A/sdkconfig.board new file mode 100644 index 0000000000..357e7ae238 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A/sdkconfig.board @@ -0,0 +1,8 @@ +CONFIG_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_SPIRAM_SPEED_80M=y +CONFIG_ESP32_REV_MIN_1=y +CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKart1A" + +# SPIRAM increases the size of the firmware, use -Os to reduce it again to fit in iram +CONFIG_COMPILER_OPTIMIZATION_SIZE=y diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/board.json b/ports/esp32/boards/DENEYAP_KART_1A_V2/board.json new file mode 100644 index 0000000000..c1b7ea82dd --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/board.json @@ -0,0 +1,25 @@ +{ + "deploy": [ + "../deploy_s3.md" + ], + "docs": "", + "features": [ + "Battery Charging", + "RGB LED", + "SPIRAM", + "USB-C", + "WiFi", + "BLE", + "STEMMA QT/QWIIC", + "Breadboard friendly" + ], + "id": "dydk1a_mpv20", + "images": [ + "deneyapkart1av2.jpg" + ], + "mcu": "esp32s3", + "product": "Deneyap Kart 1A v2", + "thumbnail": "", + "url": "https://deneyapkart.org/", + "vendor": "T3 Foundation" +} diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/board.md b/ports/esp32/boards/DENEYAP_KART_1A_V2/board.md new file mode 100644 index 0000000000..bc272ec158 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/board.md @@ -0,0 +1,2 @@ +The following files are daily firmware for the Deneyap Kart 1A v2. +This firmware is compiled using ESP-IDF v4.4 or later. diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/deploy.md b/ports/esp32/boards/DENEYAP_KART_1A_V2/deploy.md new file mode 100644 index 0000000000..281e297068 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/deploy.md @@ -0,0 +1,52 @@ +Program your board using the latest version of the esptool.py program, found [here](https://github.com/espressif/esptool). + +To flash or erase your Deneyap Kart 1A v2, you have to first put it into download mode. +To do this, follow these steps: + +- Press and hold the [BOOT] button +- Press and release the [RESET] button +- Release the [BOOT] button + +Now the board is in download mode and the native USB will have enumerated as a serial device. + +If you are putting MicroPython on your board for the first time then you should +first erase the entire flash using: + +### Linux +```bash +esptool.py --chip esp32s3 --port /dev/ttyACM0 erase_flash +``` + +### Mac +Please do a `ls /dev/cu.usbm*` to determine the port your board has enumerated as. +```bash +esptool.py --chip esp32s3 --port /dev/cu.usbmodem01 erase_flash +``` + +### Windows +Change (X) to whatever COM port is being used by the board +```bash +esptool --chip esp32s3 --port COM(X) erase_flash +``` + +Now download the version of the firmware you would like to install from the options below, +then use the following command to program the firmware starting at address 0x0, +remembering to replace `dydk1a_mpv20-micropython-firmware-version.bin` with the name of +the firmware you just downloaded: + +### Linux +```bash +esptool.py --chip esp32s3 --port /dev/ttyACM0 write_flash -z 0x0 dydk1a_mpv20-micropython-firmware-version.bin +``` + +### Mac +Please do a `ls /dev/cu.usbm*` to determine the port your board has enumerated as. +```bash +esptool.py --chip esp32s3 --port /dev/cu.usbmodem01 write_flash -z 0x0 dydk1a_mpv20-micropython-firmware-version.bin +``` + +### Windows +Change (X) to whatever COM port is being used by the board +```bash +esptool --chip esp32s3 --port COM(X) write_flash -z 0x0 dydk1a_mpv20-micropython-firmware-version.bin +``` diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/manifest.py b/ports/esp32/boards/DENEYAP_KART_1A_V2/manifest.py new file mode 100644 index 0000000000..7ae2ed15d9 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +freeze("modules") diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/modules/deneyapkart1a_v2.py b/ports/esp32/boards/DENEYAP_KART_1A_V2/modules/deneyapkart1a_v2.py new file mode 100644 index 0000000000..21eb2f957c --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/modules/deneyapkart1a_v2.py @@ -0,0 +1,30 @@ +# Deneyap Kart 1A v2 Helper Library + +from micropython import const +from machine import Pin + +# Pin Assignments + +# SPI +SPI_MOSI = const(39) +SPI_MISO = const(40) +SPI_CLK = const(41) + +# I2C +I2C_SDA = const(47) +I2C_SCL = const(21) + +# UART +UART_TX = const(43) +UART_RX = const(44) + +# RGB LED +RGBLED = const(48) + +# BUTTON +GPKEY = const(0) + +# Built-in peripherals + +rgbled = Pin(RGBLED, Pin.OUT, value=0) +gpkey = Pin(GPKEY, Pin.IN, Pin.PULL_UP) diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/mpconfigboard.cmake b/ports/esp32/boards/DENEYAP_KART_1A_V2/mpconfigboard.cmake new file mode 100644 index 0000000000..a171cacebd --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/mpconfigboard.cmake @@ -0,0 +1,13 @@ +set(IDF_TARGET esp32s3) + +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.usb + boards/sdkconfig.ble + boards/sdkconfig.240mhz + boards/sdkconfig.spiram_sx + boards/sdkconfig.spiram_oct + boards/DENEYAP_KART_1A_V2/sdkconfig.board +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/mpconfigboard.h b/ports/esp32/boards/DENEYAP_KART_1A_V2/mpconfigboard.h new file mode 100644 index 0000000000..efddce0361 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/mpconfigboard.h @@ -0,0 +1,12 @@ +#define MICROPY_HW_BOARD_NAME "Deneyap Kart 1A v2" +#define MICROPY_HW_MCU_NAME "ESP32S3" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "DeneyapKart1A_v2" + +#define MICROPY_PY_MACHINE_DAC (0) + +#define MICROPY_HW_I2C0_SCL (21) +#define MICROPY_HW_I2C0_SDA (47) + +#define MICROPY_HW_SPI1_MOSI (39) +#define MICROPY_HW_SPI1_MISO (40) +#define MICROPY_HW_SPI1_SCK (41) diff --git a/ports/esp32/boards/DENEYAP_KART_1A_V2/sdkconfig.board b/ports/esp32/boards/DENEYAP_KART_1A_V2/sdkconfig.board new file mode 100644 index 0000000000..d4079090a6 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_1A_V2/sdkconfig.board @@ -0,0 +1,23 @@ +CONFIG_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_AFTER_NORESET=y + +CONFIG_SPIRAM_MEMTEST= + +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE_8MB= +CONFIG_ESPTOOLPY_FLASHSIZE_16MB= +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MiB.csv" + +CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKart1A_v2" + +# CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID is not set +CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A +# CONFIG_TINYUSB_DESC_USE_DEFAULT_PID is not set +CONFIG_TINYUSB_DESC_CUSTOM_PID=0x8148 +CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100 +CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="T3 Foundation" +CONFIG_TINYUSB_DESC_PRODUCT_STRING="Deneyap_Kart_1A_v2" +CONFIG_TINYUSB_DESC_SERIAL_STRING="_dydk1a_v2_" diff --git a/ports/esp32/boards/DENEYAP_KART_G/board.json b/ports/esp32/boards/DENEYAP_KART_G/board.json new file mode 100644 index 0000000000..06e562a862 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_G/board.json @@ -0,0 +1,23 @@ +{ + "deploy": [ + "../deploy_c3.md" + ], + "docs": "", + "features": [ + "BLE", + "WiFi", + "STEMMA QT/QWIIC", + "RGB LED", + "USB-C", + "Breadboard friendly" + ], + "id": "dyg_mpv10", + "images": [ + "deneyapkartg.jpg" + ], + "mcu": "esp32c3", + "product": "Deneyap Kart G", + "thumbnail": "", + "url": "https://deneyapkart.org/", + "vendor": "T3 Foundation" +} diff --git a/ports/esp32/boards/DENEYAP_KART_G/board.md b/ports/esp32/boards/DENEYAP_KART_G/board.md new file mode 100644 index 0000000000..59e0657bec --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_G/board.md @@ -0,0 +1,2 @@ +The following files are daily firmware for Deneyap Kart G. +This firmware is compiled using ESP-IDF v4.x. diff --git a/ports/esp32/boards/DENEYAP_KART_G/manifest.py b/ports/esp32/boards/DENEYAP_KART_G/manifest.py new file mode 100644 index 0000000000..f993d4fa6b --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_G/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +freeze("./modules") diff --git a/ports/esp32/boards/DENEYAP_KART_G/modules/deneyapkartg.py b/ports/esp32/boards/DENEYAP_KART_G/modules/deneyapkartg.py new file mode 100644 index 0000000000..348d181daf --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_G/modules/deneyapkartg.py @@ -0,0 +1,30 @@ +# Deneyap Kart G MicroPython Helper Library + +from micropython import const +from machine import Pin + +# Pin Assignments + +# SPI +SPI_MOSI = const(6) +SPI_MISO = const(5) +SPI_CLK = const(4) + +# I2C +I2C_SDA = const(8) +I2C_SCL = const(2) + +# UART +UART_TX = const(21) +UART_RX = const(20) + +# RGB LED +RGBLED = const(10) + +# BUTTON +GPKEY = const(9) + +# Built-in peripherals + +rgbled = Pin(RGBLED, Pin.OUT, value=0) +gpkey = Pin(GPKEY, Pin.IN, Pin.PULL_UP) diff --git a/ports/esp32/boards/DENEYAP_KART_G/mpconfigboard.cmake b/ports/esp32/boards/DENEYAP_KART_G/mpconfigboard.cmake new file mode 100644 index 0000000000..54a4933da4 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_G/mpconfigboard.cmake @@ -0,0 +1,9 @@ +set(IDF_TARGET esp32c3) + +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.ble + boards/DENEYAP_KART_G/sdkconfig.board +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/esp32/boards/DENEYAP_KART_G/mpconfigboard.h b/ports/esp32/boards/DENEYAP_KART_G/mpconfigboard.h new file mode 100644 index 0000000000..5c9ab14b74 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_G/mpconfigboard.h @@ -0,0 +1,14 @@ +#define MICROPY_HW_BOARD_NAME "DENEYAP_KART_G" +#define MICROPY_HW_MCU_NAME "ESP32-C3FN4" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "DeneyapKartG" + +#define MICROPY_HW_ENABLE_SDCARD (0) +#define MICROPY_PY_MACHINE_DAC (0) +#define MICROPY_PY_MACHINE_I2S (0) + +#define MICROPY_HW_I2C0_SCL (2) +#define MICROPY_HW_I2C0_SDA (8) + +#define MICROPY_HW_SPI1_MOSI (6) +#define MICROPY_HW_SPI1_MISO (5) +#define MICROPY_HW_SPI1_SCK (4) diff --git a/ports/esp32/boards/DENEYAP_KART_G/sdkconfig.board b/ports/esp32/boards/DENEYAP_KART_G/sdkconfig.board new file mode 100644 index 0000000000..f0cbad00e4 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_KART_G/sdkconfig.board @@ -0,0 +1,9 @@ +CONFIG_ESP32C3_REV_MIN_3=y +CONFIG_ESP32C3_REV_MIN=3 +CONFIG_ESP32C3_BROWNOUT_DET=y +CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7= +CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4=y +CONFIG_ESP32C3_BROWNOUT_DET_LVL=4 +CONFIG_ESP_CONSOLE_UART_DEFAULT= +CONFIG_ESP_CONSOLE_USB_CDC= +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y diff --git a/ports/esp32/boards/DENEYAP_MINI/board.json b/ports/esp32/boards/DENEYAP_MINI/board.json new file mode 100644 index 0000000000..e35b6cb065 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/board.json @@ -0,0 +1,22 @@ +{ + "deploy": [ + "../deploy_s2.md" + ], + "docs": "", + "features": [ + "RGB LED", + "Breadboard Friendly", + "STEMMA QT/QWIIC", + "WiFi", + "USB-MICRO" + ], + "id": "dym_mpv10", + "images": [ + "deneyapmini.jpg" + ], + "mcu": "esp32s2", + "product": "Deneyap Mini", + "thumbnail": "", + "url": "https://deneyapkart.org/", + "vendor": "T3 Foundation" +} diff --git a/ports/esp32/boards/DENEYAP_MINI/board.md b/ports/esp32/boards/DENEYAP_MINI/board.md new file mode 100644 index 0000000000..2f50229987 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/board.md @@ -0,0 +1 @@ +The following files are daily firmware for the Deneyap Mini. This firmware is compiled using ESP-IDF v4.3 or later. diff --git a/ports/esp32/boards/DENEYAP_MINI/deploy.md b/ports/esp32/boards/DENEYAP_MINI/deploy.md new file mode 100644 index 0000000000..6b431ae0b6 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/deploy.md @@ -0,0 +1,50 @@ +Program your board using the esptool.py program, found [here](https://github.com/espressif/esptool). + +To flash or erase your Deneyap Mini, you have to first put it into download mode. +To do this, follow these steps: + +- Press and hold the [BOOT] button +- Press and release the [RESET] button +- Release the [BOOT] button + +Now the board is in download mode and the native USB will have enumerated as a serial device. + +If you are putting MicroPython on your board for the first time then you should +first erase the entire flash using: + +### Linux +```bash +esptool.py --chip esp32s2 --port /dev/ttyACM0 erase_flash +``` + +### Mac +```bash +esptool.py --chip esp32s2 --port /dev/cu.usbmodem01 erase_flash +``` + +#### Windows +Change (X) to whatever COM port is being used by the board +```bash +esptool --chip esp32s2 --port COM(X) erase_flash +``` + +Now download the version of the firmware you would like to install from the options below, +then use the following command to program the firmware starting at address 0x1000, +remembering to replace `dym_mpv10-micropython-firmware-version.bin` with the name of the +firmware you just downloaded: + +#### Linux +```bash +esptool.py --chip esp32s2 --port /dev/ttyACM0 write_flash -z 0x1000 dym_mpv10-micropython-firmware-version.bin +``` + +#### Mac +```bash +esptool.py --chip esp32s2 --port /dev/cu.usbmodem01 write_flash -z 0x1000 dym_mpv10-micropython-firmware-version.bin +``` + +#### Windows +Change (X) to whatever COM port is being used by the board +```bash +esptool --chip esp32s2 --port COM(X) write_flash -z 0x1000 dym_mpv10-micropython-firmware-version.bin +``` diff --git a/ports/esp32/boards/DENEYAP_MINI/manifest.py b/ports/esp32/boards/DENEYAP_MINI/manifest.py new file mode 100644 index 0000000000..7ae2ed15d9 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +freeze("modules") diff --git a/ports/esp32/boards/DENEYAP_MINI/modules/deneyapmini.py b/ports/esp32/boards/DENEYAP_MINI/modules/deneyapmini.py new file mode 100644 index 0000000000..18a23848c1 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/modules/deneyapmini.py @@ -0,0 +1,39 @@ +# Deneyap Mini MicroPython Helper Library + +from micropython import const +from machine import Pin + + +# Pin Assignments + +# SPI +SPI_MOSI = const(40) +SPI_MISO = const(39) +SPI_CLK = const(38) + +# I2C +I2C_SDA = const(36) +I2C_SCL = const(37) + +# UART +UART_TX = const(43) +UART_RX = const(44) + +# DAC +DAC0 = const(17) +DAC1 = const(18) + +# RGB LED +LEDR = const(34) +LEDG = const(33) +LEDB = const(35) + +# BUTTON +GPKEY = const(0) + +# Built-in peripherals + +ledr = Pin(LEDR, Pin.OUT, value=0) +ledg = Pin(LEDG, Pin.OUT, value=0) +ledb = Pin(LEDB, Pin.OUT, value=0) +gpkey = Pin(GPKEY, Pin.IN, Pin.PULL_UP) diff --git a/ports/esp32/boards/DENEYAP_MINI/mpconfigboard.cmake b/ports/esp32/boards/DENEYAP_MINI/mpconfigboard.cmake new file mode 100644 index 0000000000..3032f64a67 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/mpconfigboard.cmake @@ -0,0 +1,8 @@ +set(IDF_TARGET esp32s2) + +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.usb +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/esp32/boards/DENEYAP_MINI/mpconfigboard.h b/ports/esp32/boards/DENEYAP_MINI/mpconfigboard.h new file mode 100644 index 0000000000..d529332e12 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/mpconfigboard.h @@ -0,0 +1,13 @@ +#define MICROPY_HW_BOARD_NAME "Deneyap Mini" +#define MICROPY_HW_MCU_NAME "ESP32-S2FH4" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "DeneyapMini" + +#define MICROPY_PY_BLUETOOTH (0) +#define MICROPY_HW_ENABLE_SDCARD (0) + +#define MICROPY_HW_I2C0_SCL (37) +#define MICROPY_HW_I2C0_SDA (36) + +#define MICROPY_HW_SPI1_MOSI (40) +#define MICROPY_HW_SPI1_MISO (39) +#define MICROPY_HW_SPI1_SCK (38) diff --git a/ports/esp32/boards/DENEYAP_MINI/sdkconfig.board b/ports/esp32/boards/DENEYAP_MINI/sdkconfig.board new file mode 100644 index 0000000000..f6f8af52b7 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI/sdkconfig.board @@ -0,0 +1,6 @@ +CONFIG_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_USB_AND_UART=y +# LWIP +CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapMini" +# end of LWIP diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/board.json b/ports/esp32/boards/DENEYAP_MINI_V2/board.json new file mode 100644 index 0000000000..fa9b83d19b --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/board.json @@ -0,0 +1,23 @@ +{ + "deploy": [ + "../deploy_s2.md" + ], + "docs": "", + "features": [ + "RGB LED", + "Breadboard Friendly", + "STEMMA QT/QWIIC", + "WiFi", + "SPIRAM", + "USB-C" + ], + "id": "dym_mpv20", + "images": [ + "deneyapminiv2.jpg" + ], + "mcu": "esp32s2", + "product": "Deneyap Mini v2", + "thumbnail": "", + "url": "https://deneyapkart.org/", + "vendor": "T3 Foundation" +} diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/board.md b/ports/esp32/boards/DENEYAP_MINI_V2/board.md new file mode 100644 index 0000000000..04393f3c50 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/board.md @@ -0,0 +1 @@ +The following files are daily firmware for the Deneyap Mini v2. This firmware is compiled using ESP-IDF v4.3 or later. diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/deploy.md b/ports/esp32/boards/DENEYAP_MINI_V2/deploy.md new file mode 100644 index 0000000000..75861e4176 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/deploy.md @@ -0,0 +1,50 @@ +Program your board using the esptool.py program, found [here](https://github.com/espressif/esptool). + +To flash or erase your Deneyap Mini v2, you have to first put it into download mode. +To do this, follow these steps: + +- Press and hold the [BOOT] button +- Press and release the [RESET] button +- Release the [BOOT] button + +Now the board is in download mode and the native USB will have enumerated as a serial device. + +If you are putting MicroPython on your board for the first time then you should +first erase the entire flash using: + +### Linux +```bash +esptool.py --chip esp32s2 --port /dev/ttyACM0 erase_flash +``` + +### Mac +```bash +esptool.py --chip esp32s2 --port /dev/cu.usbmodem01 erase_flash +``` + +#### Windows +Change (X) to whatever COM port is being used by the board +```bash +esptool --chip esp32s2 --port COM(X) erase_flash +``` + +Now download the version of the firmware you would like to install from the options below, +then use the following command to program the firmware starting at address 0x1000, +remembering to replace `dym_mpv20-micropython-firmware-version.bin` with the name of the +firmware you just downloaded: + +#### Linux +```bash +esptool.py --chip esp32s2 --port /dev/ttyACM0 write_flash -z 0x1000 dym_mpv20-micropython-firmware-version.bin +``` + +#### Mac +```bash +esptool.py --chip esp32s2 --port /dev/cu.usbmodem01 write_flash -z 0x1000 dym_mpv20-micropython-firmware-version.bin +``` + +#### Windows +Change (X) to whatever COM port is being used by the board +```bash +esptool --chip esp32s2 --port COM(X) write_flash -z 0x1000 dym_mpv20-micropython-firmware-version.bin +``` diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/manifest.py b/ports/esp32/boards/DENEYAP_MINI_V2/manifest.py new file mode 100644 index 0000000000..7ae2ed15d9 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +freeze("modules") diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/modules/deneyapmini_v2.py b/ports/esp32/boards/DENEYAP_MINI_V2/modules/deneyapmini_v2.py new file mode 100644 index 0000000000..30c23e54ec --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/modules/deneyapmini_v2.py @@ -0,0 +1,35 @@ +# Deneyap Mini v2 MicroPython Helper Library + +from micropython import const +from machine import Pin + + +# Pin Assignments + +# SPI +SPI_MOSI = const(40) +SPI_MISO = const(39) +SPI_CLK = const(38) + +# I2C +I2C_SDA = const(36) +I2C_SCL = const(37) + +# UART +UART_TX = const(43) +UART_RX = const(44) + +# DAC +DAC0 = const(17) +DAC1 = const(18) + +# LED +RGBLED = const(33) + +# BUTTON +GPKEY = const(0) + +# Built-in peripherals + +rgbled = Pin(RGBLED, Pin.OUT, value=0) +gpkey = Pin(GPKEY, Pin.IN, Pin.PULL_UP) diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/mpconfigboard.cmake b/ports/esp32/boards/DENEYAP_MINI_V2/mpconfigboard.cmake new file mode 100644 index 0000000000..dc9abd7478 --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/mpconfigboard.cmake @@ -0,0 +1,9 @@ +set(IDF_TARGET esp32s2) + +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.spiram_sx + boards/sdkconfig.usb +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/mpconfigboard.h b/ports/esp32/boards/DENEYAP_MINI_V2/mpconfigboard.h new file mode 100644 index 0000000000..1f075b996c --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/mpconfigboard.h @@ -0,0 +1,13 @@ +#define MICROPY_HW_BOARD_NAME "Deneyap Mini v2" +#define MICROPY_HW_MCU_NAME "ESP32-S2FN4R2" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "DeneyapMini_v2" + +#define MICROPY_PY_BLUETOOTH (0) +#define MICROPY_HW_ENABLE_SDCARD (0) + +#define MICROPY_HW_I2C0_SCL (37) +#define MICROPY_HW_I2C0_SDA (36) + +#define MICROPY_HW_SPI1_MOSI (40) +#define MICROPY_HW_SPI1_MISO (39) +#define MICROPY_HW_SPI1_SCK (38) diff --git a/ports/esp32/boards/DENEYAP_MINI_V2/sdkconfig.board b/ports/esp32/boards/DENEYAP_MINI_V2/sdkconfig.board new file mode 100644 index 0000000000..6c09e32c9d --- /dev/null +++ b/ports/esp32/boards/DENEYAP_MINI_V2/sdkconfig.board @@ -0,0 +1,6 @@ +CONFIG_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_USB_AND_UART=y +# LWIP +CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapMini_v2" +# end of LWIP