-
Notifications
You must be signed in to change notification settings - Fork 0
Add support for simulator self-update test #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
e45371d to
aee4042
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.