cancel
Showing results for 
Search instead for 
Did you mean: 

section placement failed

sfukui-wbj
Associate II

STM32H7S78-DK

linker error occured.

estimated minimum size of 0x1'3456 bytes ...

Using IAR EWARM 9.60.2.

What should I do?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,


@sfukui-wbj wrote:

 unable to allocate space for sections/blocks with a total estimated minimum size of 0x1'3456 bytes (max align 0x8) in <[0x800'0000-0x800'ffff]> (total uncommited space 0xfd50).


That indeed means you exceeded the internal Flash size which is 64KB. So you need either to split your program between the internal and an external memory or simply use the internal flash to boot and the external memory for your application. Here you need to handle the linker file and the flash loader of the external flash memory.

 


@sfukui-wbj wrote:

I would like to be able to place the code in memory exceeding that and execute it. Since the SYSTEM FLASH is 128KB, I set ,


Sorry, which System Flash? the system flash has 64KB size.

 


@sfukui-wbj wrote:

I am using the serial flash connected to xspi2, but since it is a software that operates it, I do not want to use it in XIP, but I will consider it if I should use it. Also, there are Template_XIP_ExtMemLoader, Template_XIP_Boot, and Template_XIP_Appli in the subprojects of the project, and I am only using the Template_XIP_Boot subproject. I do not know how to use the other subprojects.


If you have an issue with the external memory, you need to open a new thread as it's a new question ad close this thread by marking Accepted as Solution the comment that answered your original question.

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.

View solution in original post

6 REPLIES 6
TDK
Guru

Use less memory if you're getting out of memory issues. Hard to help more without details.

> estimated minimum size of 0x1'3456 bytes

Is this really the exact error message?

If you feel a post has answered your question, please click "Accept as Solution".
mƎALLEm
ST Employee

Hello @sfukui-wbj and welcome to the ST community.

Need to look at your linker file and the map file. Knowing that STM32H7S3 device has 64KB of internal Flash:

mALLEm_0-1741873301593.png

But "estimated minimum size" doesn't make sense. It could throw a message in the sense of you've exceeded the memory but "estimated minimum size" is something weird/new to me.. may be you truncated the message?

Are you using an external memory? 

You need to provide more details and give the complete error message.

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.
sfukui-wbj
Associate II

Thank you for 2 replies.

The exact message is

error[Lp011]:section placement failed

   unable to allocate space for sections/blocks with a total estimated minimum size of 0x1'3456 bytes (max align 0x8) in <[0x800'0000-0x800'ffff]> (total uncommited space 0xfd50).

 

I understand that it exceeds 64KB and cannot be placed in the 64KB built-in flash memory. I would like to be able to place the code in memory exceeding that and execute it. Since the SYSTEM FLASH is 128KB, I set it to that area in the Memory Mapping settings, run the build, and when I start it with the debugger, the debugger does not work. The target program appears to be running. In fact, I am using the serial flash connected to xspi2, but since it is a software that operates it, I do not want to use it in XIP, but I will consider it if I should use it. Also, there are Template_XIP_ExtMemLoader, Template_XIP_Boot, and Template_XIP_Appli in the subprojects of the project, and I am only using the Template_XIP_Boot subproject. I do not know how to use the other subprojects.

 

Best Regards,

Hello,


@sfukui-wbj wrote:

 unable to allocate space for sections/blocks with a total estimated minimum size of 0x1'3456 bytes (max align 0x8) in <[0x800'0000-0x800'ffff]> (total uncommited space 0xfd50).


That indeed means you exceeded the internal Flash size which is 64KB. So you need either to split your program between the internal and an external memory or simply use the internal flash to boot and the external memory for your application. Here you need to handle the linker file and the flash loader of the external flash memory.

 


@sfukui-wbj wrote:

I would like to be able to place the code in memory exceeding that and execute it. Since the SYSTEM FLASH is 128KB, I set ,


Sorry, which System Flash? the system flash has 64KB size.

 


@sfukui-wbj wrote:

I am using the serial flash connected to xspi2, but since it is a software that operates it, I do not want to use it in XIP, but I will consider it if I should use it. Also, there are Template_XIP_ExtMemLoader, Template_XIP_Boot, and Template_XIP_Appli in the subprojects of the project, and I am only using the Template_XIP_Boot subproject. I do not know how to use the other subprojects.


If you have an issue with the external memory, you need to open a new thread as it's a new question ad close this thread by marking Accepted as Solution the comment that answered your original question.

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.
sfukui-wbj
Associate II

The System flash is from 0x1FF0 0000 to 0x1FF1 FFFF described on the page 151 of RM0477 Rev 8 manual.

This is the bootloader. You don't have the access to program it:

mALLEm_0-1741941729639.png

The only access you have is the user Flash: 0x0800 0000 - 0x0800 FFFF

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.