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!

Reply

Xilinx SDK adding folder with source

Highlighted
Visitor
Posts: 10
Registered: ‎11-08-2016

Xilinx SDK adding folder with source

[ Edited ]

Hello

 

What is correct way to do when new folder with source is created and added to application project so I won't see compilation errors such "No such file or directory" "Undefined reference..."etc?

 

I'm used to from other Eclipse forks (for qt C MinGW, STM32...) that the internal Makefile is updated with modified source tree or I have to do some stuff in Project>Properties>C/C++ Buld>Directories/Libraries/Paths and Symbols

 

Let's say in SDK I create simple project what have default tree with "src" folder, ldscript.ld and some internal Makefile what I don't see so I don't know what is changed when build settings are modified. Then I create folder "xxx" in "src" folder and create/copy/import some source stuff into it. Then project cannot be compiled without errors. :(

 

I'm playing with build settings like adding include/source paths to this "xxx" folder but project is even more broken as I get errors with missing stuff from BSP layer.

 

 

Regards,

longin

Explorer
Posts: 172
Registered: ‎04-13-2015

Re: Xilinx SDK adding folder with source

hi @longin

The easiest and safest way to add a new folder:

- right click on the project --> New --> folder

you can then move the folder inside another folder etc

To add new files , same procedure but select source file / header instead fo folder.

Then replace the new files with yours.

You need to do these because what is visible in the folders is not what Elipse is aware of.

 

 

Visitor
Posts: 10
Registered: ‎11-08-2016

Re: Xilinx SDK adding folder with source

hi

 

I tried your way and no success. :(

XILINX_SDK.png

 

ofc I can make it work with "#include "some_folder/foo.h". My question is about making these h/c files known across the project so I don't have to specify absolute or relative paths in #include directive.

 

Explorer
Posts: 172
Registered: ‎04-13-2015

Re: Xilinx SDK adding folder with source

Hi @longin

 

You need to inform the compiler where to find these includes,.

To set the path of these includes:

Right click on the project

Select Properties

expand "C/C++ Build"

under "setting"

"Tool setting" tab

compiler

directory

add the paths in there

 

Visitor
Posts: 10
Registered: ‎11-08-2016

Re: Xilinx SDK adding folder with source

Thanks,

 

this was the thing what I was looking for.