From 96cb300764efabe233860aad4af4d6349ce076be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 13:16:41 +0000 Subject: [PATCH 1/5] Initial plan From 9193ac8eb88e3cf6976b7b8933f194f957b5c2bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 13:19:52 +0000 Subject: [PATCH 2/5] Fix config directory cleanup to remove .dmf and .dmd files Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com> --- modules/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 30ef569..764017f 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -30,13 +30,19 @@ endif() # ====================================================================== # Downloading configuration files from DMD # ====================================================================== +set(DMBOOT_CONFIGS_TEMP_DIR "${CMAKE_BINARY_DIR}/configs_temp") set(DMBOOT_CONFIGS_MARKER_FILE "${DMBOOT_CONFIG_DIR}/.download_complete") if(EXISTS "${DMBOOT_MODULES_DMD}") add_custom_command( OUTPUT "${DMBOOT_CONFIGS_MARKER_FILE}" + COMMAND ${CMAKE_COMMAND} -E make_directory "${DMBOOT_CONFIGS_TEMP_DIR}" COMMAND ${CMAKE_COMMAND} -E make_directory "${DMBOOT_CONFIG_DIR}" - COMMAND ${CMAKE_COMMAND} -E echo "Downloading configuration files to ${DMBOOT_CONFIG_DIR}..." - COMMAND ${DMF_GET} -d "${DMBOOT_MODULES_DMD}" -o "${DMBOOT_CONFIG_DIR}" -t "${DMOD_TOOLS_NAME}" --cpu-family "${DMBOOT_MCU_SERIES}" -y --type dmfc + COMMAND ${CMAKE_COMMAND} -E echo "Downloading configuration files to temporary directory..." + COMMAND ${DMF_GET} -d "${DMBOOT_MODULES_DMD}" -o "${DMBOOT_CONFIGS_TEMP_DIR}" -t "${DMOD_TOOLS_NAME}" --cpu-family "${DMBOOT_MCU_SERIES}" -y --type dmfc + COMMAND ${CMAKE_COMMAND} -E echo "Copying configuration files to ${DMBOOT_CONFIG_DIR}..." + COMMAND ${CMAKE_COMMAND} -E copy_directory "${DMBOOT_CONFIGS_TEMP_DIR}" "${DMBOOT_CONFIG_DIR}" + COMMAND ${CMAKE_COMMAND} -E echo "Removing .dmf, .dmd files from config directory..." + COMMAND bash -c "find ${DMBOOT_CONFIG_DIR} -type f \\( -name '*.dmf' -o -name '*.dmd' \\) -delete || true" COMMAND ${CMAKE_COMMAND} -E touch "${DMBOOT_CONFIGS_MARKER_FILE}" DEPENDS "${DMBOOT_MODULES_DMD}" COMMENT "Downloading configuration files specified in ${DMBOOT_MODULES_DMD} from DMD..." From 2a0637305de19b98d99cb2a69c0a05e0f6550396 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 13:20:48 +0000 Subject: [PATCH 3/5] Also remove .dmp files from config directory Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com> --- modules/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 764017f..f1ebec4 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -41,8 +41,8 @@ if(EXISTS "${DMBOOT_MODULES_DMD}") COMMAND ${DMF_GET} -d "${DMBOOT_MODULES_DMD}" -o "${DMBOOT_CONFIGS_TEMP_DIR}" -t "${DMOD_TOOLS_NAME}" --cpu-family "${DMBOOT_MCU_SERIES}" -y --type dmfc COMMAND ${CMAKE_COMMAND} -E echo "Copying configuration files to ${DMBOOT_CONFIG_DIR}..." COMMAND ${CMAKE_COMMAND} -E copy_directory "${DMBOOT_CONFIGS_TEMP_DIR}" "${DMBOOT_CONFIG_DIR}" - COMMAND ${CMAKE_COMMAND} -E echo "Removing .dmf, .dmd files from config directory..." - COMMAND bash -c "find ${DMBOOT_CONFIG_DIR} -type f \\( -name '*.dmf' -o -name '*.dmd' \\) -delete || true" + COMMAND ${CMAKE_COMMAND} -E echo "Removing module files (.dmf, .dmd, .dmp) from config directory..." + COMMAND bash -c "find ${DMBOOT_CONFIG_DIR} -type f \\( -name '*.dmf' -o -name '*.dmd' -o -name '*.dmp' \\) -delete || true" COMMAND ${CMAKE_COMMAND} -E touch "${DMBOOT_CONFIGS_MARKER_FILE}" DEPENDS "${DMBOOT_MODULES_DMD}" COMMENT "Downloading configuration files specified in ${DMBOOT_MODULES_DMD} from DMD..." From e802e34299af78a74740378f62baf96c7fab3164 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 13:21:37 +0000 Subject: [PATCH 4/5] Update README to clarify config directory contents Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d9f1b4..f105fc9 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ cmake --build build **Build Parameters:** - `STARTUP_DMP_FILE` (optional) - Path to a startup package file (`.dmp`) that will be automatically loaded using `Dmod_AddPackageBuffer` at boot - `USER_DATA_FILE` (optional) - Path to a user data file that will be embedded in ROM, with its address and size available via environment variables `USER_DATA_ADDR` and `USER_DATA_SIZE` -- `DMBOOT_CONFIG_DIR` (optional, defaults to `build/configs`) - Path to a directory that will be converted to a dmffs filesystem image and mounted at `/configs/` at boot time. By default, configuration files from `modules.dmd` are downloaded to this directory. +- `DMBOOT_CONFIG_DIR` (optional, defaults to `build/configs`) - Path to a directory that will be converted to a dmffs filesystem image and mounted at `/configs/` at boot time. Configuration files from `modules.dmd` are downloaded to this directory. The directory contains only configuration files (e.g., `.ini` files), not module binaries. - `DMBOOT_EMULATION` (optional) - Enable Renode simulation mode instead of hardware mode **Automatic Build-Time Embedding:** From a2ec8011c65e90565877b65a114c35a1b1b074e2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 13:26:14 +0000 Subject: [PATCH 5/5] Use --config-dir instead of -o for dmf-get config extraction Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com> --- README.md | 2 +- modules/CMakeLists.txt | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f105fc9..9d9f1b4 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ cmake --build build **Build Parameters:** - `STARTUP_DMP_FILE` (optional) - Path to a startup package file (`.dmp`) that will be automatically loaded using `Dmod_AddPackageBuffer` at boot - `USER_DATA_FILE` (optional) - Path to a user data file that will be embedded in ROM, with its address and size available via environment variables `USER_DATA_ADDR` and `USER_DATA_SIZE` -- `DMBOOT_CONFIG_DIR` (optional, defaults to `build/configs`) - Path to a directory that will be converted to a dmffs filesystem image and mounted at `/configs/` at boot time. Configuration files from `modules.dmd` are downloaded to this directory. The directory contains only configuration files (e.g., `.ini` files), not module binaries. +- `DMBOOT_CONFIG_DIR` (optional, defaults to `build/configs`) - Path to a directory that will be converted to a dmffs filesystem image and mounted at `/configs/` at boot time. By default, configuration files from `modules.dmd` are downloaded to this directory. - `DMBOOT_EMULATION` (optional) - Enable Renode simulation mode instead of hardware mode **Automatic Build-Time Embedding:** diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index f1ebec4..6a90cf6 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -30,19 +30,13 @@ endif() # ====================================================================== # Downloading configuration files from DMD # ====================================================================== -set(DMBOOT_CONFIGS_TEMP_DIR "${CMAKE_BINARY_DIR}/configs_temp") set(DMBOOT_CONFIGS_MARKER_FILE "${DMBOOT_CONFIG_DIR}/.download_complete") if(EXISTS "${DMBOOT_MODULES_DMD}") add_custom_command( OUTPUT "${DMBOOT_CONFIGS_MARKER_FILE}" - COMMAND ${CMAKE_COMMAND} -E make_directory "${DMBOOT_CONFIGS_TEMP_DIR}" COMMAND ${CMAKE_COMMAND} -E make_directory "${DMBOOT_CONFIG_DIR}" - COMMAND ${CMAKE_COMMAND} -E echo "Downloading configuration files to temporary directory..." - COMMAND ${DMF_GET} -d "${DMBOOT_MODULES_DMD}" -o "${DMBOOT_CONFIGS_TEMP_DIR}" -t "${DMOD_TOOLS_NAME}" --cpu-family "${DMBOOT_MCU_SERIES}" -y --type dmfc - COMMAND ${CMAKE_COMMAND} -E echo "Copying configuration files to ${DMBOOT_CONFIG_DIR}..." - COMMAND ${CMAKE_COMMAND} -E copy_directory "${DMBOOT_CONFIGS_TEMP_DIR}" "${DMBOOT_CONFIG_DIR}" - COMMAND ${CMAKE_COMMAND} -E echo "Removing module files (.dmf, .dmd, .dmp) from config directory..." - COMMAND bash -c "find ${DMBOOT_CONFIG_DIR} -type f \\( -name '*.dmf' -o -name '*.dmd' -o -name '*.dmp' \\) -delete || true" + COMMAND ${CMAKE_COMMAND} -E echo "Downloading configuration files to ${DMBOOT_CONFIG_DIR}..." + COMMAND ${DMF_GET} -d "${DMBOOT_MODULES_DMD}" --config-dir "${DMBOOT_CONFIG_DIR}" -t "${DMOD_TOOLS_NAME}" --cpu-family "${DMBOOT_MCU_SERIES}" -y --type dmfc COMMAND ${CMAKE_COMMAND} -E touch "${DMBOOT_CONFIGS_MARKER_FILE}" DEPENDS "${DMBOOT_MODULES_DMD}" COMMENT "Downloading configuration files specified in ${DMBOOT_MODULES_DMD} from DMD..."