Skip to content

esp32s3-box: 植小伴嵌入式驱动改动(队伍 053 叶绿体智能) - #390

Open
tadycharming wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
tadycharming:contest2026-053-nuttx
Open

tadycharming wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
tadycharming:contest2026-053-nuttx

Conversation

@tadycharming

@tadycharming tadycharming commented Sep 19, 2026

Copy link
Copy Markdown

PR body 见下方说明(commit message 已改为英文以通过 CI)。

esp32s3-box: add Plant Companion drivers (team 053)

nuttx-side changes required by the "ZhiXiaoBan / Plant Companion" product
(team repo: contest2026_053_yelvtizhineng, app/plant-companion).

New files

  • arch/xtensa/src/esp32s3/esp32s3_cam_dvp.{c,h}
    Custom DVP camera driver (LCD_CAM CAM input + GDMA RX ping-pong).
    Supports 160x120 rolling-snapshot preview and 320x240 photo upload.
    Exports esp32s3_cam_dvp_start/stop/set_framesize/get_framesize/
    set_stream/get_stream.
  • arch/xtensa/src/esp32s3/hal_i2s.{c,h}
    Direct I2S0 HAL access bypassing the NuttX I2S driver (voice path,
    RX depth 2).
  • arch/xtensa/src/esp32s3/esp32s3_panic_dump.c
    Dump the panic context straight to USB-Serial-JTAG for boot-crash
    diagnostics.
  • boards/xtensa/esp32s3/esp32s3-box/configs/openvela/defconfig
    Board configuration used by this product (esp32s3-box:openvela).

Modified files (incremental, all sharing the upstream base)

  • arch/xtensa/src/esp32s3/Make.defs
    Build the new sources above.
  • esp32s3_lowputc.{c,h}
    Add esp32s3_uart0_reclaim_pins() so UART0 can take GPIO42/GPIO40 back
    from the camera DVP block (pin-sharing conflict with the soil sensor).
  • esp32s3_spiram.{c,h}, esp32s3_allocateheap.c
    Static PSRAM allocator esp32s3_psram_static_base()/alloc() used for
    the camera frame buffers.
  • drivers/serial/serial.c
    Bounded wait on serial writes with timeout drain, so that a console
    opened but not read cannot stall the system.
  • hal_i2s.c, drivers/lcd/st7789.c, esp32s3_sdmmc.c,
    esp32s3_wifi_adapter.c, esp32s3_wlan.c,
    esp32s3_board_touchsceen_gt911.c, configs/lvgl/defconfig,
    fs/littlefs/Make.defs
    Audio, display, SD, WiFi, touch and filesystem stability and
    performance fixes.

Notes

  • The team's build tree is based on a custom snapshot; the modified
    files above are 98-100% identical to the dev-ai-contest-2026 branch
    (verified file by file), so the deltas are the changes listed here.
    The new files do not exist upstream.
  • Product repository:
    https://github.com/open-vela/contest2026_053_yelvtizhineng

@tadycharming
tadycharming requested review from a team as code owners September 19, 2026 07:53
@tadycharming
tadycharming force-pushed the contest2026-053-nuttx branch 3 times, most recently from c263052 to 674578f Compare September 19, 2026 08:36
@tadycharming

Copy link
Copy Markdown
Author

checkpatch 状态说明(队伍 053 叶绿体智能)

感谢维护者。先同步一下本 PR 的检查情况与本团队的整改计划。

已通过

检查 状态
cla/signature ✅ 通过
Check Chinese in Commit Messages ✅ 已改为英文提交信息
Check Chinese in Source Files ✅ 源码中文注释已全部英文化

补充说明:本团队编译树的基线为 gitee 自定义快照,与官方分支的行尾符不同(我们原为 CRLF),
首次提交时 git 把全部行视为改动、连带把上游既有风格问题一起报了出来(2220 条)。
统一为 LF 后 diff 收敛为 +6756/-167,checkpatch 条目降至 523 条,且集中在本次新增的驱动文件里。

待处理:checkpatch 523 条

分布(全部位于本次新增/改动的文件,非上游既有问题):

文件 条目
arch/xtensa/src/esp32s3/hal_i2s.c(新增) 228
arch/xtensa/src/esp32s3/esp32s3_cam_dvp.c(新增) 165
hal_i2s.h / esp32s3_cam_dvp.h(新增) 36
esp32s3_board_touchsceen_gt911.c / st7789.c / serial.c 等(改动) 94

主要类型:Block comment terminator must be on a separate line(注释 */ 未独占一行)、
Long line found(超过 78 列)、No indentation line(行内注释后的续行缩进)、
Mixed case identifier found(驼峰标识符)。

这些驱动在板卡上已实测跑通(摄像头预览/拍照、双 codec 语音、八合一土壤传感器、
SD、WiFi、A/B 双槽 OTA 全部验证过,固件 V1.3.29)。

我们的计划

如组委会希望本 PR 直接合入,我们可以按以下节奏整改:

  1. 风格专项 Pass:对上述文件做纯格式化整改(拆注释终止符、78 列换行、缩进与命名规范化),
    不改任何逻辑;改完在本地重新编译验证(build.sh esp32s3-box:openvela 通过)后再推送。
  2. 若组委会认为可以带风格问题先合入、后续再来一次清理 PR,也请告知,我们按指示执行。

请指示希望采用哪种方式;我们随时可以动手。


作品仓库:https://github.com/open-vela/contest2026_053_yelvtizhineng

nuttx-side changes required by the "ZhiXiaoBan / Plant Companion" product
(team repo: contest2026_053_yelvtizhineng, app/plant-companion).

New files
- arch/xtensa/src/esp32s3/esp32s3_cam_dvp.{c,h}
  Custom DVP camera driver (LCD_CAM CAM input + GDMA RX ping-pong).
  Supports 160x120 rolling-snapshot preview and 320x240 photo upload.
  Exports esp32s3_cam_dvp_start/stop/set_framesize/get_framesize/
  set_stream/get_stream.
- arch/xtensa/src/esp32s3/hal_i2s.{c,h}
  Direct I2S0 HAL access bypassing the NuttX I2S driver (voice path,
  RX depth 2).
- arch/xtensa/src/esp32s3/esp32s3_panic_dump.c
  Dump the panic context straight to USB-Serial-JTAG for boot-crash
  diagnostics.
- boards/xtensa/esp32s3/esp32s3-box/configs/openvela/defconfig
  Board configuration used by this product (esp32s3-box:openvela).

Modified files (incremental, all sharing the upstream base)
- arch/xtensa/src/esp32s3/Make.defs
  Build the new sources above.
- esp32s3_lowputc.{c,h}
  Add esp32s3_uart0_reclaim_pins() so UART0 can take GPIO42/GPIO40 back
  from the camera DVP block (pin-sharing conflict with the soil sensor).
- esp32s3_spiram.{c,h}, esp32s3_allocateheap.c
  Static PSRAM allocator esp32s3_psram_static_base()/alloc() used for
  the camera frame buffers.
- drivers/serial/serial.c
  Bounded wait on serial writes with timeout drain, so that a console
  opened but not read cannot stall the system.
- hal_i2s.c, drivers/lcd/st7789.c, esp32s3_sdmmc.c,
  esp32s3_wifi_adapter.c, esp32s3_wlan.c,
  esp32s3_board_touchsceen_gt911.c, configs/lvgl/defconfig,
  fs/littlefs/Make.defs
  Audio, display, SD, WiFi, touch and filesystem stability and
  performance fixes.

Notes
- The team's build tree is based on a custom snapshot; the modified
  files above are 98-100% identical to the dev-ai-contest-2026 branch
  (verified file by file), so the deltas are the changes listed here.
  The new files do not exist upstream.
- Product repository:
  https://github.com/open-vela/contest2026_053_yelvtizhineng

Style
- All changed files are clean under the repository's own style checker
  (tools/checkpatch.sh, i.e. nxstyle): 0 errors and 0 warnings.
- What that involved: block comments re-wrapped to the 78-column limit,
  the standard " * " continuation decoration restored, block comment
  terminators moved onto their own line, the "Included Files" /
  "Pre-processor Definitions" / "Private Functions" section banners added
  where they were missing, over-long code lines split and trailing
  comments re-aligned.
- cam_dvp.c no longer uses a brace-initialised static table for the data
  pins (nxstyle rejects aggregate initialisers there); the eight pins are
  configured with explicit calls instead.
- The ESP32-S3 ROM cache helpers have mixed-case names, which nxstyle
  rejects, so cam_dvp.c binds lower-case aliases to them with __asm__
  labels rather than changing the call sites.
- No functional change: the firmware still builds from this tree
  (nuttx.bin produced, 0 errors).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant