cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pram
Visitor
Visitor
3,192 Views
Registered: ‎01-11-2017

Setting compiler optimization level in XSCT Tool

Hi ,

 

I am trying setup a workspace and I would like to set the optimization level for the SDK workspace.

 

I am using following command in the XSCT to setup the optimization level but tool always tells me not correct optimization.

 

xsct% configapp -app riscv_app -set compiler-optimization -O3

Value -O3 is not supported for Optimization Level. List of supported values are None (-O0), Optimize (-O1), Optimize more (-O2), Optimize most (-O3), Optimize for size (-Os)

I have all possible combinations below.

xsct% configapp -app riscv_app -set compiler-optimization {-O3}

xsct% configapp -app riscv_app -set compiler-optimization {-o3}

 

Still fails. How do I set it?

 

0 Kudos
3 Replies
wangh_xilinx
Visitor
Visitor
3,032 Views
Registered: ‎05-18-2017

why not set it manually? project>>C/C++ build>> settings>>gcc compiler>>optimization.I am new here, hope it works.
0 Kudos
mrossman
Visitor
Visitor
2,895 Views
Registered: ‎08-21-2013

I have the same issue.  I have tried with both 2016.4 and 2017.1 and no luck.

 

Also, why is there no consistency between xsct commands?  Comparing "configbsp" and "configapp", which do similar things for bsp and app, respectively, there are different options.  For example, configbsp uses "compiler_flags" and "extra_compiler_flags"  options, while configapp uses "compiler-optimization", "compiler-misc".  Different names and and even different style for naming the options, using hyphen "-" in one case, underbar "_" on the other, geez!

 

Just another example of poor quality control.

0 Kudos
arpansur
Moderator
Moderator
1,496 Views
Registered: ‎07-01-2015

Hi @pram,

 

The correct syntax is 

configapp -app riscv_app -set compiler-optimization {Optimize most (-O3)}

Thanks,
Arpan
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------