UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant mberemand
Participant
357 Views
Registered: ‎10-22-2018

Adding external include path to a BSP

Jump to solution

I'm trying to include a new header file in boot.S that exists in a directory outside my workspace. I've tried adding an external include path to my BSP via Properties -> C/C++ Include Paths and Symbols -> Add External Include Path, and the path with its files shows up in BSP's Includes tree in the Project Explorer.

BSP_includes.PNG

But the compiler still complains that there is no such file. The GUI for adding includes to a BSP is very different than for adding includes to any other kind of project, so it's very unintuitive. Do I need to be doing something different? I'm using XSDK 2017.2.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
325 Views
Registered: ‎10-21-2010

Re: Adding external include path to a BSP

Jump to solution

Hi @mberemand,

Include paths added like this are not being passed to the compiler. We'll investigate this

In the meantime, you can add the include paths through BSP Settings => expand drivers => select cpu driver and add -Iinclude_path to extra_compiler_flags. Please replace include_path with the correct path. For multiple paths, you can use -I option for each path

You are right about this not being intuitive. We'll work on this

View solution in original post

0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
326 Views
Registered: ‎10-21-2010

Re: Adding external include path to a BSP

Jump to solution

Hi @mberemand,

Include paths added like this are not being passed to the compiler. We'll investigate this

In the meantime, you can add the include paths through BSP Settings => expand drivers => select cpu driver and add -Iinclude_path to extra_compiler_flags. Please replace include_path with the correct path. For multiple paths, you can use -I option for each path

You are right about this not being intuitive. We'll work on this

View solution in original post

0 Kudos
Participant mberemand
Participant
303 Views
Registered: ‎10-22-2018

Re: Adding external include path to a BSP

Jump to solution

@sadanan wrote:

In the meantime, you can add the include paths through BSP Settings => expand drivers => select cpu driver and add -Iinclude_path to extra_compiler_flags.


For anyone viewing this question, it is important to note that updating the extra_compiler_flags field will regenerate BSP sources and overwrite any changes, so stash them with git or save a copy elsewhere before doing this.

0 Kudos