diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/board.cmake b/ports/espressif/boards/waveshare_esp32s2_pico/board.cmake new file mode 100644 index 0000000..6d7173e --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32s2_pico/board.cmake @@ -0,0 +1,2 @@ +# Apply board specific content here +set(IDF_TARGET "esp32s2") diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/board.h b/ports/espressif/boards/waveshare_esp32s2_pico/board.h new file mode 100644 index 0000000..e23b9e3 --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32s2_pico/board.h @@ -0,0 +1,56 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef WAVESHARE_ESP32_S2_PICO_ +#define WAVESHARE_ESP32_S2_PICO_ + +//--------------------------------------------------------------------+ +// Button +//--------------------------------------------------------------------+ + +#define PIN_BUTTON_UF2 0 + +//--------------------------------------------------------------------+ +// LED +//--------------------------------------------------------------------+ + + +#define LED_PIN 9 +#define LED_STATE_ON 0 + +//--------------------------------------------------------------------+ +// USB UF2 +//--------------------------------------------------------------------+ + +#define USB_VID 0x2E8A +#define USB_PID 0x101F +#define USB_MANUFACTURER "Waveshare Electronics" +#define USB_PRODUCT "ESP32-S2-Pico" + +#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT +#define UF2_BOARD_ID "ESP32-S2-Pico" +#define UF2_VOLUME_LABEL "ESP32S2PICO" +#define UF2_INDEX_URL "http://www.waveshare.com/wiki/ESP32-S2-Pico" + +#endif diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig new file mode 100644 index 0000000..33a8c77 --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig @@ -0,0 +1,7 @@ +# Board Specific Config + +# Partition Table +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv" + +# Serial flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y