Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a fix in the tc3xx HAL to correctly handle flash writes that span across multiple sectors, ensuring proper operation for ELF loading in the future.
- Implements a while-loop to process writes sector by sector.
- Updates flash programming logic to perform read-modify-write when any page in a sector is not erased.
- Activates LED indicators during programming for visual feedback.
Comments suppressed due to low confidence (1)
hal/aurix_tc3xx.c:392
- The flag 'needsSectorRmw' is declared and initialized to 0 but never updated within the for-loop when flashIsErased indicates a non-erased page. Insert an assignment such as 'needsSectorRmw = 1;' inside the if-statement to trigger the appropriate read-modify-write behavior.
for (page = startPage; page <= endPage; page += IFXFLASH_PFLASH_PAGE_LENGTH) {
Contributor
Author
|
CI Failure looks unrelated |
billphipps
approved these changes
Apr 29, 2025
Contributor
billphipps
left a comment
There was a problem hiding this comment.
Looks good to me. I'll have additional changes as we move forward, mostly to propagate errors out.
Member
|
I'll include this fix in the 2.5.0 release. Thanks! |
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.
Quick fix to the tc3xx HAL to properly handle flash writes across sector boundaries.
Note: This is not necessary for current usage, but will be necessary for ELF loading.
Splitting this fix into is own PR so @billphipps can use it for some of his unrelated feature work.