cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
747 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
Xilinx Employee
Xilinx Employee
715 Views
Registered: ‎10-21-2010

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
Xilinx Employee
Xilinx Employee
716 Views
Registered: ‎10-21-2010

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
Highlighted
Participant
Participant
693 Views
Registered: ‎10-22-2018

@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