AnsweredAssumed Answered

PGO Linker (BF516)

Question asked by mjames2393 on Feb 26, 2013
Latest reply on Mar 14, 2013 by CraigG

System Info:

Windows 7 Professional 64-bit

Service Pack 1


VDSP Product version:, IDDE Ver (July 5, 2011).




I read about the PGO linker in this article:


I have a project group consisting of several projects. One project is the start-up project and the other projects are library projects.


I have run profile guided optimization on one of the library projects in a simulator (a software audio codec). I then used the .pgo file to optimize that library project.


Now I want to make sure that code and data is placed in an optimal way, and that's when I stumbled into the above mentioned note about the PGO linker. How do I use the PGO linker to make sure that the code and data in the library project is placed optimally in memory ?


The code in the project group normally runs on a hardware board. One of the projects in the project group is a proprietary RTOS. The project that I want to optimize is used by some of the other projects in the project group when audio has to be encoded/decoded.


I followed these instructions in the EE-note, but I couldn't get it to work. It also seems that the instructions are outdated ?? I uploaded the DXE to H/W and ran the code for a while and then I manually halted the CPU and proceeded to step 5. I'm not sure if the PGO linker can only be used for code running in a simulator??



1. Load the program in VisualDSP++.


2. Choose Tools->Profiler to open the

Profiler window. (Not present in my version of VDSP. Why?)


3. Run the program with a sample input data

set. (Does this mean that the DXE has to be executed in a simulator???)


4. Wait until the program halts or is halted

manually. (I halted it manually)


5. Open a Windows Command Prompt window.  (OK)


6. Execute the PGO Linker utility with the

appropriate command-line arguments

(Listing 1). The tool produces an .asm file. (Tool hangs)



7. Include the generated .asm file in the project.

8. Rebuild the project.



Here's the console output:


C:\Program Files (x86)\Analog Devices\VisualDSP 5.0>PGOLinker.exe "C:\code\program.dxe" "program.asm"

The command line options are configured as follows:-


DSP Executable --> C:\code\program.dxe


Linker directive Map File --> program.asm


Minimum L1 size selected --> 4


Maximum L1 size selected --> 80


L1 memory incremented in steps of --> 4


Algorithm Selected--> O2


Connecting to the IDDE and loading Program

This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team for more information.