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

Wrong flash size for STM32F412xE #1047

Closed
newbrain opened this issue Jan 14, 2021 · 0 comments
Closed

Wrong flash size for STM32F412xE #1047

newbrain opened this issue Jan 14, 2021 · 0 comments

Comments

@newbrain
Copy link
Collaborator

While adding an STM32F411xx target, and using some "inspiration" (Ctrl-C Ctrl-V) from the STM32F412xx one, I noticed the following:

class STM32F412xE(CoreSightTarget):
VENDOR = "STMicroelectronics"
MEMORY_MAP = MemoryMap(
FlashRegion( start=0x08000000, length=0x10000, sector_size=0x4000,
page_size=0x1000,
is_boot_memory=True,
algo=FLASH_ALGO),
FlashRegion( start=0x08010000, length=0x10000, sector_size=0x10000,
page_size=0x1000,
algo=FLASH_ALGO),
FlashRegion( start=0x08020000, length=0x20000, sector_size=0x20000,
page_size=0x1000,
algo=FLASH_ALGO),
RamRegion( start=0x20000000, length=0x40000)
)

At line 76 the third flash region is given a size of 0x20000, with base 0x08020000, for a total of 0x40000 B = 256 KiB.
The STM32F4xxxE parts, including the F412, have a 512 KiB flash.
The length param should be 0x60000, giving three sectors of 128 KiB each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants