From 7d2ef3afdbb8d681e9e03a5ca087254270c41a76 Mon Sep 17 00:00:00 2001 From: lewisxhe Date: Fri, 26 Jul 2024 14:23:52 +0800 Subject: [PATCH] Added custom board --- boards/T-Deck.json | 38 ++++++++++++++++++++++++++++++++++++++ platformio.ini | 31 ++++++++++++++++++++----------- 2 files changed, 58 insertions(+), 11 deletions(-) create mode 100644 boards/T-Deck.json diff --git a/boards/T-Deck.json b/boards/T-Deck.json new file mode 100644 index 0000000..b26f44e --- /dev/null +++ b/boards/T-Deck.json @@ -0,0 +1,38 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "partitions": "default_16MB.csv", + "memory_type": "qio_opi" + }, + "core": "esp32", + "extra_flags": [ + "-DARDUINO_USB_MODE=1", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x303A", "0x1001"]], + "mcu": "esp32s3", + "variant": "esp32s3" + }, + "connectivity": ["wifi"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "LilyGo T-Decl(16M Flash 8M OPI PSRAM )", + "upload": { + "flash_size": "16MB", + "maximum_ram_size": 327680, + "maximum_size": 16777216, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.lilygo.cc", + "vendor": "LilyGo" +} diff --git a/platformio.ini b/platformio.ini index 15e307d..c1d600f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,10 +13,12 @@ ; Please comment out the following when compiling the T-Keyboard -default_envs = T-Deck -; default_envs = T-Deck-868M +; default_envs = T-Deck +; default_envs = T-Deck-433M , T-Deck-868M , T-Deck-915M , T-Deck-920M , T-Deck-850M ; default_envs = T-Deck-915M ; default_envs = T-Deck-433M +; default_envs = T-Deck-850M +default_envs = T-Deck-920M ;; Examples only one is valid src_dir = examples/UnitTest @@ -33,14 +35,15 @@ src_dir = examples/UnitTest ; board = ttgo-t-oi-plus ; framework = arduino +;! Don't make changes +boards_dir = boards [env] platform = espressif32@6.3.0 -board = esp32s3box +board = T-Deck framework = arduino upload_speed = 921600 monitor_speed = 115200 -board_build.partitions = default_8MB.csv build_flags = -DBOARD_HAS_PSRAM @@ -53,12 +56,6 @@ build_flags = -DDISABLE_ALL_LIBRARY_WARNINGS - -[env:T-Deck] -extends = env -build_flags = - ${env.build_flags} - [env:T-Deck-868M] extends = env build_flags = @@ -70,10 +67,22 @@ extends = env build_flags = ${env.build_flags} -DRADIO_FREQ=915.0 - + +[env:T-Deck-920M] +extends = env +build_flags = + ${env.build_flags} + -DRADIO_FREQ=920.0 [env:T-Deck-433M] extends = env build_flags = ${env.build_flags} -DRADIO_FREQ=433.0 +[env:T-Deck-850M] +extends = env +build_flags = + ${env.build_flags} + -DRADIO_FREQ=850.0 + + \ No newline at end of file