Skip to main content
NGune.1
Associate III
Mar 19, 2023 11:16 PM UTC
Solved

STM32CubeIDE - Why all these functions occupy flash areas 2 times?

Hi,

After compiling my project I noticed that I have the flash on my H743 is almost full. When I checked the Memory Details under the Build Analyser I found that all of my screen functions repeated two times. The attached sreenshot shows more clearly what I mean. Could anyone tell if it is a necessity for some reason or am I doing something wrong?

Many thanks,

Namik

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
Mar 20, 2023 7:18 AM UTC

The addresses for each "function pair" are identical, though, so I'd say the functions are not doubled, only the tool you use to display them is confused.

Try to enable compiler optimization.

JW

5 replies

Pavel A.
Mar 19, 2023 11:40 PM UTC

Can you show the linker script?

waclawek.jan
waclawek.janBest answer
Super User
Mar 20, 2023 7:18 AM UTC

The addresses for each "function pair" are identical, though, so I'd say the functions are not doubled, only the tool you use to display them is confused.

Try to enable compiler optimization.

JW

NGune.1
NGune.1Author
Associate III
Mar 20, 2023 7:34 AM UTC

I am using CubeIDE. Here is my linker script.

Romain DIELEMAN
ST Employee
Mar 20, 2023 9:01 AM UTC

I agree with @waclaweck.jan the functions do not seem to be doubled, just displayed twice (maybe flashed twice at the same addresses ? which would increase the flashing time for no reason). Could you add the "STM32CubeIDE" tag to your post ? Maybe someone with more knowledge on the tool will chip in.

/Romain

NGune.1
NGune.1Author
Associate III
Mar 22, 2023 11:26 AM UTC

Many thanks