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..cefe9a3 160000 --- a/lib/dmod +++ b/lib/dmod @@ -1 +1 @@ -Subproject commit 336a6281325b513c5b91d6ba3a37d7a1d696fce4 +Subproject commit cefe9a33874e2049d1cf1cb0be2074ed8840e583