Closed
Conversation
e45371d to
aee4042
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for testing bootloader self-update functionality in the simulator environment. The self-update feature allows wolfBoot to update itself in RAM, which requires special handling in the simulator since flash memory is memory-mapped at runtime rather than at linker-time addresses.
Key changes:
- Added simulator-specific self-update test that verifies the bootloader can update itself by swapping a dummy payload to the bootloader region
- Implemented conditional logic in the self-update code to use runtime flash offsets instead of linker symbols when running in the simulator
- Added arch_reboot() implementation for the simulator to properly exit after self-update
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/test.mk | Adds test-sim-self-update target that creates a dummy bootloader update, assembles flash partitions, runs the simulator, and verifies the update was applied correctly |
| src/update_flash.c | Adds ARCH_SIM conditional compilation to use ARCH_FLASH_OFFSET instead of _start_text linker symbol for flash writes in both EXT_FLASH and internal flash code paths |
| hal/sim.c | Implements arch_reboot() function that calls exit(0) to terminate the simulator after self-update |
| config/examples/sim-self-update.config | Provides configuration for simulator self-update testing with appropriate partition sizes and addresses |
| .github/workflows/test-sim-self-update.yml | Adds CI workflow to automatically run the self-update test on ubuntu-latest with sources.list workaround for reliability |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ec9f9d0 to
d661c2a
Compare
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.
No description provided.