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

Incorrect generated flash size for STM32G030K8 #218

Closed
Sizurka opened this issue Jul 5, 2023 · 2 comments
Closed

Incorrect generated flash size for STM32G030K8 #218

Sizurka opened this issue Jul 5, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Sizurka
Copy link

Sizurka commented Jul 5, 2023

A STM32G030K8 has 64 KB flash, but the generated definitions list 32 KB. This gets propagated into the metapac definitions and ends up making the memory.x define less flash than is actually available, resulting in link failures when the resulting firmware is larger than 32 KB.

This appears to be happening because the STM32Cubeprog definition has two configurations, but the second one is the one with the full flash (the 0x20 occurence) size while stm32-data-gen uses the first unconditionally. Then it ends up limiting the region size to less than the total flash size (since there's no 2nd bank). I haven't looked to see if this is actually coming up with any other chips; this is just the one I stumbled on.

@Dirbaio Dirbaio added the bug Something isn't working label Jul 5, 2023
@Dirbaio
Copy link
Member

Dirbaio commented Jul 5, 2023

Yes, there is a lot of chips with this issue.

I think the cubeprog xmls are not a good data source for this. It's impossible to know which "configuration" is the right one without actually reading registers from a live connected chip. We have to get the data from somewhere else or enter it manually...

@Dirbaio
Copy link
Member

Dirbaio commented Nov 1, 2023

tracking in #301

@Dirbaio Dirbaio closed this as completed Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants