summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/esp32/boards/M5STACK_ATOMS3_LITE/board.json21
-rw-r--r--ports/esp32/boards/M5STACK_ATOMS3_LITE/board.md3
-rw-r--r--ports/esp32/boards/M5STACK_ATOMS3_LITE/deploy.md22
-rw-r--r--ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.cmake8
-rw-r--r--ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.h10
-rw-r--r--ports/esp32/boards/M5STACK_ATOMS3_LITE/pins.csv11
6 files changed, 75 insertions, 0 deletions
diff --git a/ports/esp32/boards/M5STACK_ATOMS3_LITE/board.json b/ports/esp32/boards/M5STACK_ATOMS3_LITE/board.json
new file mode 100644
index 000000000..d00bb673b
--- /dev/null
+++ b/ports/esp32/boards/M5STACK_ATOMS3_LITE/board.json
@@ -0,0 +1,21 @@
+{
+ "deploy": [
+ "deploy.md"
+ ],
+ "docs": "https://docs.m5stack.com/en/core/AtomS3%20Lite",
+ "features": [
+ "BLE",
+ "WiFi",
+ "RGB LED",
+ "JST-PH",
+ "USB-C"
+ ],
+ "images": [
+ "atoms3lite.jpg"
+ ],
+ "mcu": "esp32s3",
+ "product": "AtomS3 Lite",
+ "thumbnail": "",
+ "url": "https://shop.m5stack.com/products/atoms3-lite-esp32s3-dev-kit",
+ "vendor": "M5 Stack"
+}
diff --git a/ports/esp32/boards/M5STACK_ATOMS3_LITE/board.md b/ports/esp32/boards/M5STACK_ATOMS3_LITE/board.md
new file mode 100644
index 000000000..8c93b5781
--- /dev/null
+++ b/ports/esp32/boards/M5STACK_ATOMS3_LITE/board.md
@@ -0,0 +1,3 @@
+The [AtomS3 Lite](https://shop.m5stack.com/products/atoms3-lite-esp32s3-dev-kit)
+([docs](https://docs.m5stack.com/en/core/AtomS3%20Lite)) is an ESP32-S3 based
+development board from [M5Stack](https://m5stack.com/).
diff --git a/ports/esp32/boards/M5STACK_ATOMS3_LITE/deploy.md b/ports/esp32/boards/M5STACK_ATOMS3_LITE/deploy.md
new file mode 100644
index 000000000..9a20a6a43
--- /dev/null
+++ b/ports/esp32/boards/M5STACK_ATOMS3_LITE/deploy.md
@@ -0,0 +1,22 @@
+Program your board using the `esptool.py` program, found
+[here](https://github.com/espressif/esptool).
+
+To place the board in _bootloader mode_ - so `esptool`` can be used - press and
+hold the reset button for two seconds. A green LED will flash behind the reset
+button when the bootloader mode has been activated.
+
+If you are putting MicroPython on your board for the first time then you should
+first erase the entire flash using:
+
+```bash
+esptool.py --chip esp32s3 --port /dev/ttyACM0 erase_flash
+```
+
+From then on program the firmware starting at address 0:
+
+```bash
+esptool.py --chip esp32s3 --port /dev/ttyACM0 write_flash -z 0 board-20240105-v1.22.1.bin
+```
+
+After the firmware has been deployed, press the reset button to reset the device
+and start the new firmware.
diff --git a/ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.cmake b/ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.cmake
new file mode 100644
index 000000000..10608fcec
--- /dev/null
+++ b/ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.cmake
@@ -0,0 +1,8 @@
+set(IDF_TARGET esp32s3)
+
+set(SDKCONFIG_DEFAULTS
+ boards/sdkconfig.base
+ boards/sdkconfig.usb
+ boards/sdkconfig.ble
+ boards/ESP32_GENERIC_S3/sdkconfig.board
+)
diff --git a/ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.h b/ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.h
new file mode 100644
index 000000000..14bde8438
--- /dev/null
+++ b/ports/esp32/boards/M5STACK_ATOMS3_LITE/mpconfigboard.h
@@ -0,0 +1,10 @@
+#define MICROPY_HW_BOARD_NAME "M5Stack AtomS3 Lite"
+#define MICROPY_HW_MCU_NAME "ESP32S3"
+
+#define MICROPY_PY_MACHINE_DAC (0)
+
+// Enable UART REPL for modules that have an external USB-UART and don't use native USB.
+#define MICROPY_HW_ENABLE_UART_REPL (1)
+
+#define MICROPY_HW_I2C0_SCL (39)
+#define MICROPY_HW_I2C0_SDA (38)
diff --git a/ports/esp32/boards/M5STACK_ATOMS3_LITE/pins.csv b/ports/esp32/boards/M5STACK_ATOMS3_LITE/pins.csv
new file mode 100644
index 000000000..cd3276599
--- /dev/null
+++ b/ports/esp32/boards/M5STACK_ATOMS3_LITE/pins.csv
@@ -0,0 +1,11 @@
+G1,GPIO1
+G2,GPIO2
+G5,GPIO5
+G6,GPIO6
+G7,GPIO7
+G8,GPIO8
+G38,GPIO38
+G39,GPIO39
+LED_RGB,GPIO35
+LED_IR,GPIO4
+BUTTON,GPIO41