Skip to main content
Senior
November 5, 2023
Solved

STM32G474RB3 Compiled code won't fit (but I show I should have about 61kB free)

Everything was going well until my compiled code exceeded 64kB.  Now, the programmer says that the code exceeds available space.  But the code is only 67kB and the available space is 128kB.

Is there an option that I need to set to allow all flash to be used?

This topic has been closed for replies.
DavidNaviauxBest answer
Senior
November 6, 2023

Thank you.  Actually, I just found the problem.  By default the option bits have the BFB2 bit checked which is the dual-bank mode allowing only 1/2 of available flash.  By unchecking that option, I can now use the entire 128kB.

 

2 replies

waclawek.jan
Super User
November 5, 2023

Maybe the same/similar problem?
@Aziz BRIGUI, can you please comment?

JW

DavidNaviauxAuthorBest answer
Senior
November 6, 2023

Thank you.  Actually, I just found the problem.  By default the option bits have the BFB2 bit checked which is the dual-bank mode allowing only 1/2 of available flash.  By unchecking that option, I can now use the entire 128kB.