Skip to main content
Associate
April 11, 2025
Question

How to use extend FLASH?

  • April 11, 2025
  • 1 reply
  • 484 views

I have just started learning X-CUBE-AI and encountered an issue when deploying a large model. Currently, I am trying to deploy a model of approximately 4 Mb on the STM32F4ZGT6, but its internal FLASH is only 1 Mb. To address this, I plan to use an external W25Q128 FLASH chip. However, I couldn't find any relevant tutorials, and after compiling the code, I received the following errors:
ResNet.axf: Error: L6406E: No space in execution regions with .ANY selector matching main.o(.bss).
ResNet.axf: Error: L6407E: Sections of aggregate size 0x21540 bytes could not fit into .ANY selector(s).

1 reply

Julian E.
Technical Moderator
April 11, 2025

Hello @pienasc ,

 

Can you please look at this topic and let me know if it helps:

Solved: How to use the extended Flash on X-CUBE-AI - STMicroelectronics Community

 

Have a good day,

Julian

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
pienascAuthor
Associate
April 14, 2025

Hello ,

I followed the method in the document and indeed generated the bin file. However, as a beginner, I don't know how to burn the bin file into the external FLASH. Will X-CUBE-AI automatically help me solve this problem? In addition, should I set anything for the external FLASH? Moreover, an error occurred after "validation on target". Could you please provide a more detailed solution? The error messages are as follows:

ResNet.axf: Error: L6406E: No space in execution regions with .ANY selector matching main.o(.bss).
ResNet.axf: Error: L6407E: Sections of aggregate size 0x21540 bytes could not fit into .ANY selector(s).