From a3f546f3b392b55892429f61e3d39828dfc3d108 Mon Sep 17 00:00:00 2001 From: Patryk Kubiak Date: Sun, 11 Oct 2026 21:43:57 +0200 Subject: [PATCH 1/2] STM32F746G-DISCO: the car HMI demo out of the box The board's flash.dmd starts what carhmi-demo needs - dmaudio (its service and rules, on the WM8994), dmview 0.10 (the channel of a claim, given on each of its lines: a line without a version would install the older one over it) and the carhmi service -, its sdcard.dmd downloads carhmi_view. ymodem joins the common flash modules: upload-files / install-all type `ymodem recv`, which no image had. lib/dmod: Dmod_Run() no longer holds the module's mutex while main() runs - with it, every service ran at systemd's priority (4) and the player's decoder was starved by the drawing of the view. Co-Authored-By: Claude Opus 5.5 --- README.md | 26 +++++++++++++++++++++++ configs/board/stm32f746g-disco/flash.dmd | 21 ++++++++++++++++++ configs/board/stm32f746g-disco/sdcard.dmd | 6 ++++++ configs/common/flash.dmd | 1 + lib/dmod | 2 +- 5 files changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 543c1ac..9314b73 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,32 @@ cmake --build build Board configuration files are located in `configs/board//board.cmake`. When `BOARD` is set, the `TARGET` parameter is ignored. +### STM32F746G-DISCO: the Car HMI Demo + +The `stm32f746g-disco` board runs the [car HMI demo](https://github.com/choco-technologies/carhmi-demo) +out of the box: its `flash.dmd` starts the display (`dmview`), audio +(`dmaudio`, on the WM8994 codec) and the `carhmi` service, and its +`sdcard.dmd` downloads the view, which is too big for the flash, to +`build/sdcard`. Flash the firmware, then send the view to the card in the slot +(FAT, first partition): + +```bash +cmake -DBOARD=stm32f746g-disco -S . -B build +cmake --build build +cmake --build build --target install-all # the firmware, then build/sdcard over the console +``` + +The player plays the MP3 files of `music/` on the card. Copy them there on a +PC, or send them over the console: + +```bash +scripts/ymodem_send.py --dest /mnt/dmsdio0_0p1/music *.mp3 +``` + +carhmi reads the directory when it starts: restart it (`service restart carhmi`) +or the board after adding files - a few seconds after the transfer, so FAT has +written them to the card. + ### Building for LILYGO T-Deck Pro The T-Deck Pro is based on the **ESP32-S3FN16R8** (Xtensa LX7 dual-core, 240 MHz, 16 MB flash, 8 MB PSRAM). diff --git a/configs/board/stm32f746g-disco/flash.dmd b/configs/board/stm32f746g-disco/flash.dmd index 7e336ad..f4c2f14 100644 --- a/configs/board/stm32f746g-disco/flash.dmd +++ b/configs/board/stm32f746g-disco/flash.dmd @@ -74,3 +74,24 @@ dmft5336 driver=board/stm32f746g-disco/touch.ini # dmsai dmwm8994 driver=board/stm32f746g-disco/codec-with-touch.ini +# +# The audio service: dmaudio.rules starts a dmaudio@ for every audio +# device dmdevfs reports - here /dev/wm8994 -, mixing what the applications +# play (libdmaudio) into it. +# +dmaudio service=dmaudio@.ini +dmaudio rules=dmaudio.rules +# +# The display service: dmview.rules starts a dmview@ for the LCD +# (/dev/dmlcdtft0), which shows what the applications claim for it - with +# the channel between an application and its view (0.10), which carhmi needs. +# +dmview@>=0.10 +dmview@>=0.10 service=dmview@.ini +dmview@>=0.10 rules=dmview.rules +# +# The car HMI demo (choco-technologies/carhmi-demo): a service that claims the +# display for its view - on the SD card, see sdcard.dmd - and plays the MP3 +# files of the card's music/ directory through dmaudio. +# +carhmi service=carhmi.ini diff --git a/configs/board/stm32f746g-disco/sdcard.dmd b/configs/board/stm32f746g-disco/sdcard.dmd index d751c90..b2c5569 100644 --- a/configs/board/stm32f746g-disco/sdcard.dmd +++ b/configs/board/stm32f746g-disco/sdcard.dmd @@ -1,3 +1,9 @@ # # STM32F746G Discovery board sdcard modules - board-specific modules for sdcard # +# +# The car HMI's view (carhmi.dmv with its fonts and images, ~320 kB - too big +# for the flash): installed to build/sdcard/views/carhmi_view/, it goes to +# /views/carhmi_view/ (upload-files), where carhmi.ini looks for it. +# +carhmi_view diff --git a/configs/common/flash.dmd b/configs/common/flash.dmd index 7bca59c..08b3c3c 100644 --- a/configs/common/flash.dmd +++ b/configs/common/flash.dmd @@ -12,6 +12,7 @@ mount umount cat catini +ymodem tty memory systemd diff --git a/lib/dmod b/lib/dmod index 336a628..476ce3e 160000 --- a/lib/dmod +++ b/lib/dmod @@ -1 +1 @@ -Subproject commit 336a6281325b513c5b91d6ba3a37d7a1d696fce4 +Subproject commit 476ce3ed6f92040e0583b7aa7b961ba06d06fe25 From b7b8f5e046b0c8db303d43984cb7bfaea0ee014b Mon Sep 17 00:00:00 2001 From: Patryk Kubiak Date: Sun, 11 Oct 2026 23:35:50 +0200 Subject: [PATCH 2/2] lib/dmod: develop with Dmod_Run() not holding the module's mutex (#330) Co-Authored-By: Claude Opus 5.5 --- lib/dmod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dmod b/lib/dmod index 476ce3e..cefe9a3 160000 --- a/lib/dmod +++ b/lib/dmod @@ -1 +1 @@ -Subproject commit 476ce3ed6f92040e0583b7aa7b961ba06d06fe25 +Subproject commit cefe9a33874e2049d1cf1cb0be2074ed8840e583