2024-09-23 06:53 PM
Hello ST Micro community,
I'm working with a NUCLEO-F746ZG board and have noticed some interesting behavior regarding memory usage. I'd like to seek your advice on the following:
Given this situation, I have two main questions:
a) What could be the reason for VTOR being set to 0x00200000? Is this a default behavior for this board or a specific configuration?
b) Using the 0x00200000 address range (RAM) could potentially be more efficient for code execution. How can I modify my project to take advantage of this? Specifically, what changes would I need to make to the linker script to utilize this memory address?
Any insights or guidance on how to optimize my setup would be greatly appreciated. Thank you in advance for your help!
Solved! Go to Solution.
2024-09-24 04:21 AM - edited 2024-09-24 04:39 AM
Hello @sungjin and welcome to the community.
0x00200000 is the start address of the Flash-ITCM. Physically, it's the same Flash on the die as the Flash-AXIM but "aliased" on another address: 0x08000000.
From AN4667:
Flash-ITCM start address: 0x00200000
Flash-AXIM start address: 0x08000000
So if you are executing from Flash-ITCM you need to relocate the VTOR base address to 0x00200000 while for Flash-AXIM it needs to be relocated to 0x08000000.
I invite you to have a look at the application note AN4667 "STM32F7 Series system architecture and performance". In this application note you will find many details of STM32F7 product architecture as well as some performance results of different typical configs with some tips and code partitioning tricks at the end.
Also refer to the related X-Cube package X-CUBE-32F7PERF downloadable from here. There you can find how to configure the linker scripts to relocate your code and the data in the desirable memory.
Hope I answered your questions.
2024-09-24 04:21 AM - edited 2024-09-24 04:39 AM
Hello @sungjin and welcome to the community.
0x00200000 is the start address of the Flash-ITCM. Physically, it's the same Flash on the die as the Flash-AXIM but "aliased" on another address: 0x08000000.
From AN4667:
Flash-ITCM start address: 0x00200000
Flash-AXIM start address: 0x08000000
So if you are executing from Flash-ITCM you need to relocate the VTOR base address to 0x00200000 while for Flash-AXIM it needs to be relocated to 0x08000000.
I invite you to have a look at the application note AN4667 "STM32F7 Series system architecture and performance". In this application note you will find many details of STM32F7 product architecture as well as some performance results of different typical configs with some tips and code partitioning tricks at the end.
Also refer to the related X-Cube package X-CUBE-32F7PERF downloadable from here. There you can find how to configure the linker scripts to relocate your code and the data in the desirable memory.
Hope I answered your questions.
2024-09-24 05:37 AM
Dear SofLit,
Thank you very much for your detailed explanation. Your answer has been incredibly helpful in understanding how the Flash-ITCM and Flash-AXIM addresses work on the STM32F7 series. The clarification about relocating the VTOR base address based on the execution memory makes perfect sense now. I appreciate your recommendation to read the AN4667 application note and to explore the X-CUBE-32F7PERF package. These resources will undoubtedly aid me in optimizing my project's performance.
Your assistance has been invaluable, and I am grateful for your support.
Best regards,
Sungjin