cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
2,660 Views
Registered: ‎06-28-2016

SDK: How to make a "Custom Build Step"

Jump to solution

Hello,

 

i wish to make a so called "Custom Build Step" while i'am compiling my own c-code with the SDK. If i try it, then it seems not to work; i do not get the expected results.

 

For example:

 

If i write the following Command: "notepad.exe test.txt" in the edit box from the Settings Dialog C/C++ Build (right click on resource example.txt source file in the Project tree) then nothing happens.

 

Expected result is: Notepad opens with test.txt (new or existing)

 

What should i do to achive this?

 

Thank you...

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
3,260 Views
Registered: ‎06-28-2016

Hello @ibaie,

 

in my opinion, the SDK needs this Feature to become a "real" IDE. A pre-build step is not good because we are talking about real source code. That means, it is recommended to edit it. What where if the c-source code must build in the pre build step? No one would like this.

 

But i will accept your answer :-)

 

Regards

 

View solution in original post

5 Replies
Highlighted
Xilinx Employee
Xilinx Employee
2,616 Views
Registered: ‎10-06-2016

Hi @deppenkaiser

 

I guess that you are using "" in the build steps field, which might generate an invalid call in the command line. Check the console output for the build process as it will give you more details of what's going wrong.

build step1.JPG

 

So I changed the Build step setting to not use "":

build step2.JPG

build step3.JPG

 

and notepad is launched succesfully :)

 

Regards,

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Contributor
Contributor
2,606 Views
Registered: ‎06-28-2016

Hello @ibaie,

 

you show me the way to make a "General pre- or post build". This is not what i mean. I mean the possibility to assign an individual build step to a given resource e.g. "example.txt" in the regular Project tree for source files. I got the individual file preferences when i right click on a given file in that tree (e.g. in the "src" folder).

 

If i have that possibility then i could execute per file (file type/Extension) different Tools. That is what normaly an IDE should make happen. Visual Studio is able to do that.

 

A General pre- or post build is not the same as an individual (custom) build step.

 

I will Show you the reason why i Need this Feature. I have source code in an other language, which must compiled with an other Compiler (not C or C++); it will generate C-Code (not object files). This generated c-code is an include for the regular c-code.

 

I have many files like this. But, i could also use the pre build step - this would be a work around :-(.

 

Thank you...

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
2,599 Views
Registered: ‎10-06-2016

Hi @deppenkaiser

 

Thanks for the detailed explaination, now it's more clear what are you looking for :)

 

To be honest, I do not have experience with such use case, so I have been taking a look how could be used in Xilinx SDK. The tool does allow to individually select the tool that you want to be used, but only allow you to select between the available toolchains.

 

i.e. change the compiler to ARMCC for a certain .c file

custom 1.JPG

This settings at the end of the day are used by the tool to generate the Makefile to build the application. This makefile is generated automatically and does not include txt files, so to be honest I'm not sure if your use case is supported this way.

 

Nevertheless the fact that your "custom" files are used to generate header files, so you need to generate those before the compilation process of the C files to ensure that headers are there. So the fact of using pre-build step might take much more sense for me.

 

Regards

Ibai

 


Ibai
Don’t forget to reply, kudo, and accept as solution.
Highlighted
Contributor
Contributor
3,261 Views
Registered: ‎06-28-2016

Hello @ibaie,

 

in my opinion, the SDK needs this Feature to become a "real" IDE. A pre-build step is not good because we are talking about real source code. That means, it is recommended to edit it. What where if the c-source code must build in the pre build step? No one would like this.

 

But i will accept your answer :-)

 

Regards

 

View solution in original post

Highlighted
Contributor
Contributor
2,534 Views
Registered: ‎06-28-2016

Hello @ibaie,

 

sorry, i thought that i did it by giving you a "kudo"...

 

Best Regards,

Deppenkaiser

0 Kudos