Add CYD BLE foundation with NimBLE Nordic UART.

Reusable ble_core (+ optional LVGL ble_ui), flashable firmware/cyd, aligned with wifitest as a base feature.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 15:43:11 +08:00
commit 8baea73c0c
23 changed files with 2338 additions and 0 deletions

57
platformio.ini Normal file
View File

@@ -0,0 +1,57 @@
; CYD ESP32-2432S028 — BLE 基础(NimBLE + Nordic UART + LVGL 状态页)
[env:cyd]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 460800
upload_speed = 460800
; LVGL+NimBLE 已近默认 1.2MB 上限;给后续 WiFi 共存留空间(约 1.9MB APP)
board_build.partitions = min_spiffs.csv
lib_deps =
bodmer/TFT_eSPI@^2.5.43
lvgl/lvgl@9.2.2
h2zero/NimBLE-Arduino@^2.3.2
build_flags =
-DCORE_DEBUG_LEVEL=0
-DUSER_SETUP_LOADED=1
-DILI9341_2_DRIVER=1
-DTFT_WIDTH=240
-DTFT_HEIGHT=320
-DTFT_MISO=12
-DTFT_MOSI=13
-DTFT_SCLK=14
-DTFT_CS=15
-DTFT_DC=2
-DTFT_RST=-1
-DTFT_BL=21
-DTFT_BACKLIGHT_ON=HIGH
-DTOUCH_CS=-1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT6=1
-DLOAD_FONT7=1
-DLOAD_FONT8=1
-DLOAD_GFXFF=1
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=40000000
-DSPI_READ_FREQUENCY=20000000
-DLV_CONF_SKIP
-DLV_COLOR_DEPTH=16
-DLV_MEM_SIZE=49152
-DLV_FONT_MONTSERRAT_14=1
-DLV_FONT_MONTSERRAT_16=1
-DLV_FONT_MONTSERRAT_18=1
-DLV_FONT_MONTSERRAT_20=1
-DLV_USE_TFT_ESPI=1
-DLV_USE_FLEX=1
-DLV_USE_BUTTON=1
-DLV_USE_LABEL=1
-DLV_USE_TEXTAREA=1
-I${PROJECT_DIR}/include
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED
extra_scripts = pre:copy_lv_conf.py