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: 
Highlighted
Newbie maartenheld
Newbie
877 Views
Registered: ‎09-13-2017

Build in batch mode *doesn't* fail.

I have a small tcl script that is used on our build server to generate a bsp and a fsbl, import our main project, build everything, and generate a '.BIN' file. (I call it through xsct, but the same problem exists with xsdk -batch). When nothing's wrong, everything is fine, but when I make a mistake, the build doesn't fail.

 

I do get a line that states "make: *** [src/main.o] Error 1", and of course, the .elf file does not appear, but the script continues its run, and it will exit without an error code. This will result in a "green" build on the buildserver, and the error can go unnoticed.

 

The problem seems to be that "projects -build" doesn't return an error when the build fails. (The documentation states that it should do that.) Is this a known issue? I couldn't find it in the list.

 

I have a workaround that will "cd" to the project directory and run "exec >$@stdout make". This is possible since our project is a makefile project that is included in the XSDK project, but I would like to build the xilinx way, also because I generate an fsbl project the xilinx way that can't be build with make. (This workaround also proofs that a command that does return an error will cause the script to terminate in a way that the buildserver recognises)

 

p.s. the same problem exists when I introduce an error in the generated fsbl project, so I don't think it's a problem with inported makefile projects.

 

XSDK 2016.4, both on ubuntu16.06 and on Windows 10.

 

Tags (4)
0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
853 Views
Registered: ‎10-21-2010

Re: Build in batch mode *doesn't* fail.

Hi,

This is a known issue, but I'm not sure where its documented. We're working on a fix. Until then you can check the output of the make or if the binaries are actually generated to know if the build is successful. This is not so convinient but issue should be resolved soon

0 Kudos
Newbie maartenheld
Newbie
848 Views
Registered: ‎09-13-2017

Re: Build in batch mode *doesn't* fail.

Thanks for your reply, I'll use the workaround with the make command for now.

 

Just to be complete for any future readers: the ">$@stdout" in my "exec >$@stdout make" command is the tcl way of saying that all the output of the command should go to the normal stdout, in stead of being swallowed by tcl.

This also solves the issue that the make command seems to fail, when it only has warnings and no errors. (caused by gcc putting warnings on the stderr stream and tcl exec considering that an error.)

 

And 16.06 was a typo off course, I use 16.04.