Intel Software: Intel FPGA SDK for OpenCL

Type: Answers

Area: Tools

Last Modified: November 21, 2016
Version Found: v16.1
Bug ID: FB: 412812;

Does the OpenCL tool chain generate an AOCX file with debug information and source code embedded in it?


Yes, when you compile a kernel file without the “-g0” aoc command option, the Intel® FPGA SDK for OpenCL™ offline compiler will generate a final .aocx file with embedded debugging information and source code. This occurs in the 16.1 version of the tool.

When profiling your kernel, if you include both the --profile and the -g0offline compiler command options in your aoc command, the source code of your kernel and IP will still appear in the resulting .aocx file.


Use the “-g0” flag when running the aoc compile to prevent the debug information and source code being embedded in the .aocx file

Example:  aoc -g0 <>

To manually remove the source code from .aocx files after building with default options:

1. Run the aocl binedit <.aocx file> list command and find all sections that start with ".acl.source" or ".acl.clang_ir".

2. Run the aocl binedit <.aocx file> update <section> <null> command for every section identified in Step 1.

- For Windows, <null> is nul

- For Linux, <null> is /dev/null

To remove the source code automatically using the Intel-provided Perl script:

1. Download the strip_source Perl script

2. Unzip the file in the current working directory and then run the perl <.aocx file> command.

Note: To run the script on Windows, you must have Perl available on the command line.  Ensure that you add the path to Perl to the PATH user environment variable setting.

This problem is scheduled to be fixed in a future release of the Intel FPGA SDK for OpenCL offline compiler.