Skip to content
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

Fix AT32F405 flash size/map #2032

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

ALTracer
Copy link
Contributor

Detailed description

  • The F_SIZE readout and usage as implemented in Feature: Add support for Arterytek MCU AT32F405, F402 #1949 is incomplete and results in failure to reprogram internal flash of AT32F405RC.
  • This PR solves that by factoring in the kibibytes multiplier, for both AT32F402/405 and AT32F423 added in that commit.

For a (C) 256 KiB flash part, the F_SIZE "register" contains not 262144 but 256, which (as used in PR1949 26d27b9) generates a target flash map of 256 byte length and 2048 (or 1024) byte erase-sectors, which is broken.

Assumed tested on some BMD-derivative platform.

Your checklist for this pull request

Closing issues

@dragonmux dragonmux added this to the v2.0 release milestone Dec 22, 2024
@dragonmux dragonmux added the Bug Confirmed bug label Dec 22, 2024
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merging. Thank you for the contribution and this fix!

@dragonmux dragonmux merged commit 1e0457b into blackmagic-debug:main Dec 22, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants