In order to keep costs, power consumption, and size to a minimum, many embedded products based on ARM Cortex-R cores have limited on-chip memory. In particular, the size of the Tightly Coupled Memory (TCM) can be restricted. Because TCM has very low latency, significant performance gains can be realised when running code in TCM. Therefore limiting TCM size can impose performance challenges: a trade-off to be considered by the SoC design team.
One way to reduce the impact of restricted TCM is to use an overlay manager. Code is organised into a number of overlays which share the same memory area. When executing code in the same overlay, no changes are necessary and the overlay stays resident in low-latency TCM. However when a call is made to a non-resident overlay, the overlay manager needs to load the correct overlay into the TCM. This load needs to be performed as efficiently as possible, and the debugger needs to be overlay-aware and present the correct information to the user. For example, the debugger needs to step over overlay veneers: effectively making the overlay manager invisible to the debugger user. In DS-5 v5.25 we’ve added overlay support to both the ARM Compiler and the DS-5 debugger. When overlays are enabled, the compiler leaves overlay information in the symbol file. The debugger reads this information when the symbol file is loaded, and can enable overlay support automatically. As well as handling the debug implications of overlays and automatically stepping over the overlay veneers, DS-5 debugger presents overlay information through additional debugger commands or through the new Overlays view.
Here we can see the address and size of a number of overlays, and we can see instantly which overlays are currently loaded. Information has been expanded for one of the overlays, so that we can see at a glance the functions contained in that overlay. The matching overlay support in the ARM Compiler and DS-5 debugger makes it easy to manage overlays and drive significant performance enhancements from efficient use of fast on-chip memory.
For details of other changes in DS-5 v5.25, take a look at Key Changes in DS-5 Debugger v5.25