fix: re-enable config_fs_size guard in mount_config_filesystem and document dmgpio hard fault#90
Draft
fix: re-enable config_fs_size guard in mount_config_filesystem and document dmgpio hard fault#90
Conversation
…t FLASH_FS env vars
The if(config_fs_size > 0) check was commented out, causing dmffs to be
invoked even when no config filesystem was embedded in ROM (size=0).
dmffs reads flash location from FLASH_FS_ADDR/FLASH_FS_SIZE env vars
and would hang when those were unset and size was 0, causing the Renode
CI test to timeout without ever printing DMOD-Boot started.
Changes:
- Re-enable size guard so dmffs is only mounted when config_fs_size > 0
- Set FLASH_FS_ADDR and FLASH_FS_SIZE env vars via dmenv_seti before
calling dmvfs_mount_fs("dmffs") - this is what dmffs actually reads
- Thread dmenv_ctx through mount_embedded_filesystems and
mount_config_filesystem function signatures
- Remove now-unused mount_opts snprintf
- Add docs/dmgpio-renode-hard-fault.md documenting the hard fault that
occurs when dmgpio_port accesses STM32 GPIO hardware in Renode after
dmdevfs is mounted with a proper config filesystem
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix problems on renode CI
fix: re-enable config_fs_size guard in mount_config_filesystem and document dmgpio hard fault
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two Renode CI issues: the test permanently times out (infinite loop) due to a commented-out size guard, and — once that is fixed — a hard fault fires when
dmdevfsinitialisesdmgpio_portagainst STM32 GPIO hardware registers.Fix: infinite loop in
mount_config_filesystemThe
if(config_fs_size > 0)guard was commented out, sodmffswas always invoked even when no config FS was embedded (size=0 in the emulation build).dmffsreads flash location fromFLASH_FS_ADDR/FLASH_FS_SIZEenv vars — notmount_optsas the old code assumed — and hung when both were unset and size was 0.dmenv_ctxis now threaded throughmount_embedded_filesystems()→mount_config_filesystem().Documentation: dmgpio hard fault in Renode
Added
docs/dmgpio-renode-hard-fault.mdwith reproduction steps, root cause analysis, and proposed fixes for the external repository. The fault occurs insidedmvfs_mount_fs("dmdevfs", "/dev", "/configs")whendmgpio_portv0.4 writes to STM32 GPIO/RCC MMIO registers that Renode'sstm32f7_discovery-bb.repldoes not fully emulate. The fix belongs indmgpio(guard hardware access under emulation) ordmdevfs(tolerate driver init failure instead of propagating the exception).Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.