Skip to content

Add configurable main module name and extra DMD file inputs via CMake parameters#61

Merged
JohnAmadis merged 2 commits intomasterfrom
copilot/extend-module-customization-options-again
Feb 25, 2026
Merged

Add configurable main module name and extra DMD file inputs via CMake parameters#61
JohnAmadis merged 2 commits intomasterfrom
copilot/extend-module-customization-options-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 25, 2026

The main module (dmell) was hardcoded in the todmp command, and there was no way to inject additional flash.dmd or sdcard.dmd files outside of the standard common/MCU/board lookup paths.

Changes

CMakeLists.txt

Three new cache variables:

  • DMBOOT_MAIN_MODULE (default: "dmell") — overrides the main module passed to todmp
  • DMBOOT_EXTRA_FLASH_DMD_FILES — semicolon-separated list of additional flash.dmd files
  • DMBOOT_EXTRA_SDCARD_DMD_FILES — semicolon-separated list of additional sdcard.dmd files

modules/CMakeLists.txt

  • Replaced hardcoded dmell in the todmp invocation with ${DMBOOT_MAIN_MODULE}
  • Added loops that append validated extra flash/sdcard DMD files to DMBOOT_FLASH_DMD_FILES / DMBOOT_SDCARD_DMD_FILES (warns on missing paths)

Usage

cmake \
  -DDMBOOT_MAIN_MODULE=myapp \
  -DDMBOOT_EXTRA_FLASH_DMD_FILES="/path/to/extra/flash.dmd;/another/flash.dmd" \
  -DDMBOOT_EXTRA_SDCARD_DMD_FILES="/path/to/extra/sdcard.dmd" \
  ...
Original prompt

This section details on the original issue you should resolve

<issue_title>Rozszerzyć możliwości personalizacji modułów</issue_title>
<issue_description>Aktualnie mamy zahardcodowany moduł dmell jako główny, który będzie wystartowany po uruchomieniu systemu.

Teraz potrzebujemy czegoś takiego:

  1. Moduł główny domyślnie ma być dmell, ale powinna być też możliwość podania w cmake jako parametr innego modułu (innej nazwy modułu)
  2. Potrzebujemy możliwości podania poprzez parametr cmake dodatkowych plików flash.dmd oraz sdcard.dmd, które by mogły zawierać dodatkowe moduły, które powinny zostać umieszczone w pamięci flash lub na karcie SD (dmboot by je automatycznie pobrał i umieścił razem z innymi)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…CARD_DMD_FILES cmake parameters

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance module customization capabilities Add configurable main module name and extra DMD file inputs via CMake parameters Feb 25, 2026
Copilot AI requested a review from JohnAmadis February 25, 2026 16:59
@JohnAmadis JohnAmadis marked this pull request as ready for review February 25, 2026 17:22
@JohnAmadis JohnAmadis merged commit f28da0e into master Feb 25, 2026
5 checks passed
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.

Rozszerzyć możliwości personalizacji modułów

2 participants