cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX with MMT: strange LD file generation

FluxPower42
Associate III

STM32CubeMX v6.17.0

While configuring an STM32CubeMX project for an STM32H753 Ethernet project on a NUCLEO-H753ZI, I observed some strange behavior.

After enabling memory management, including the checkboxes
- Apply Application Regions Settings to Peripherals and
- Apply Application Regions Settings to Linker Files,
I would have expected the memory regions to be included in the linker description file STM32H753XX_FLASH.ld.

Unfortunately, this was not the case.

However, since the STM32H753XX_FLASH.ld file had obviously been regenerated, I did not suspect the file handling itself.
After several hours of searching, I discovered that if the .ld file is deleted before regeneration, different content is generated.

Steps to reproduce this:

  1. Open STM32CubeMX
  2. File / New Project… / Board Selector
  3. Select NUCLEO-H753ZI
  4. In „Board Project Options“ dialog, click button „Unselect All“
  5. Set Project Manager / Project / Toolchain / IDE  to CMake
    and Default Compiler/Linker to ST Arm Clang
  6. File / Save Project
  7. Generate Code
  8. Check the file size of STM32H753XX_FLASH.ld file (in my case: 8671 Bytes)
  9. Make a *copy* of the STM32H753XX_FLASH.ld file to STM32H753XX_FLASH_01.ld for later compare, but don't delete the file.

  10. In STM32CubeMX Go to Tools / Memory Management
    - Switch Apply Application Regions Settings to Peripherals On
    - Switch Apply Application Regions Settings to Linker Files On
  11. File / Save Project
  12. Generate Code
  13. Check the file size of STM32H753XX_FLASH.ld file (in my case: 8651 Bytes)
  14. Make a *copy* of the STM32H753XX_FLASH.ld file to STM32H753XX_FLASH_02.ld
  15. Compare the file _01.ld file from step 9 with this _02.ld file:
    FluxPower42_0-1776966556255.png

  16. *Delete* the STM32H753XX_FLASH.ld
  17. Generate Code again and open STM32H753XX_FLASH.ld file again
  18. Check the file size of STM32H753XX_FLASH.ld file (in my case: 9119 Bytes)
  19. Make a *copy* of the STM32H753XX_FLASH.ld file to STM32H753XX_FLASH_03.ld
  20. Compare the file _01.ld file from step 9 with this _03.ld file:
    FluxPower42_1-1776966780534.png

    [...]

    FluxPower42_2-1776966817509.png

    [...]

    FluxPower42_3-1776966845387.png

     

The regions are now available.
However, according to the comment header, the controller has now much more flash memory, but zero RAM :)


In addition, when the STM32CubeMX GUI is started with command line logging, two warnings occur during code generation after the MMT tab is opened once:

2026-04-23 19:59:33,111 [INFO] CodeEngine:319 - Generated code: D:\dev\Prj\CubeMXTest\CubeMXTest\MXTmpFiles\gpio.tmp
2026-04-23 19:59:33,121 [WARN] IPConfigManager:107 - WARNING: Missing Config File for MEMORYMAP ip!!
2026-04-23 19:59:33,122 [WARN] IP:2258 - DefaultDataRegion not found: check if there is a RefParameter without a condition.
2026-04-23 19:59:33,153 [INFO] CodeEngine:295 - oldGeneratedFile, D:\dev\Prj\CubeMXTest\CubeMXTest\MXTmpFiles\cortex.tmp_save


If you click on the RAM_D2 (or other) table cell now and regenerate it without changing the content, the error "IP:2258 - DefaultDataRegion not found" will disappear:

2026-04-23 20:00:00,152 [INFO] CodeEngine:319 - Generated code: D:\dev\Prj\CubeMXTest\CubeMXTest\MXTmpFiles\gpio.tmp
2026-04-23 20:00:00,161 [WARN] IPConfigManager:107 - WARNING: Missing Config File for MEMORYMAP ip!!
2026-04-23 20:00:00,191 [INFO] CodeEngine:295 - oldGeneratedFile, D:\dev\Prj\CubeMXTest\CubeMXTest\MXTmpFiles\cortex.tmp_save



The next behavior occurs if the ETH module is switched on (to RMII) after the MMT is still activated.
The error appears in the MMT output log:

FluxPower42_4-1776967517070.png

However, if you switch to Tools / Memory Management, the output view is disabled.
When you turn it back on, the content is empty:

FluxPower42_5-1776967596399.png

until you switch the ETH off and on again, you will see both the new and old errors:

FluxPower42_6-1776967681149.png


I have a feeling that this feature is in a very beta state (or perhaps it's very KI-generated?)
ST: Thank you for fixing and testing the tool - I'm already excited for the new version!

Best wishes, Timo



4 REPLIES 4
Souhaib MAZHOUD
ST Employee

Hello @FluxPower42 

Could you please attach your ioc in order to investigate the issue?

BR, Souhaib

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.

@Souhaib MAZHOUD 

the steps to generate the .ioc file in the different states are described in my post.
To make it easy for you: attached a zip with folders of the different steps (note that the index numbers of the folders are different to the numbers in my post).
In this zip you will find the .ioc files on the journey and and all files that have been modified during generation steps.

Please keep in mind, that you have to start without active MMT. Then generate the code (and the ld file). Then switch MMT and "Apply Application Regions Settings to Linker Files" on. Generate and check the ld file. Delete the file, generate again and check the ld file again.

Best wishes,
Timo

Hello @FluxPower42 

I appreciate the detailed description you provided.
The first issue regarding the linkage file was raised internally with a dedicated team for review and correction: Internal ticket number: CDM0062400 (This is an internal tracking number and is not accessible or usable by customers.)
Concerning the error encountered when enabling ETH after using the MMT tool, this behavior is expected. The message is intentionally generated to alert the user about a memory region overlap detected by MMT:
"Error during the creation of the Rx_PoolSection region: The region you are trying to add overlaps with the RAM_D2 region"
This indicates that the Rx_PoolSection required by ETH conflicts with the existing RAM_D2 memory allocation.
To resolve this issue, please update the memory mapping before enabling ETH by applying one of the following actions:
Delete the RAM_D2 region, or Relocate the RAM_D2 region to AHB SRAM2 or AHB SRAM3
Once this adjustment is made, ETH can be enabled without triggering the overlap error.

BR, Souhaib

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.

FluxPower42
Associate III

@Souhaib MAZHOUD 
Thank you for your reply and for forwarding it internally.

Regarding the second "issue" (ETH/MMT): now I know how to handle it and what I should do.
I just wanted to report this to ST because I don't think STM32CubeMX is very user-friendly in this regard. And it took me a while to figure out what I had done wrong, since I didn’t notice the first error message and the message was no longer visible after switching between tabs.
If the error message were displayed permanently until the issue is resolved, this would be beneficial for all users.

Best regrads,
Timo