cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
guden49
Visitor
Visitor
569 Views
Registered: ‎11-09-2018

BSP and APP configuration via tcl commands in Xilinx SDK

Jump to solution

Hello everyone,

I am trying to create a SDK project totally with tcl commands. I have two problems. First, I need to add xilffs library to my BSP 

I have used setlib command for adding xilffs to my bsp,sw_bsp; but after the command xilffs library was not added under sw_bsp/libsrc . 

setlib -bsp sw_bsp -lib xilffs

 When I checked the libraries via getlibs command I see xilffs library but associated files were not available under sw_bsp/libsrc.

xsct% getlibs -bsp sw_bsp
========================
LIBRARY VERSION
========================
xilffs 4.0

Secondly, I am using math.h in my project so I have to add -lm option to software platform inferred flags. Normally I am doing it by hand but I want to do it via tcl command. How can I achieve both of these?

Thanks in advance

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
guden49
Visitor
Visitor
285 Views
Registered: ‎11-09-2018
5 Replies
stephenm
Moderator
Moderator
501 Views
Registered: ‎09-12-2007

You need to regenerate the BSP:

  • bsp regenerate
0 Kudos
guden49
Visitor
Visitor
491 Views
Registered: ‎11-09-2018

Thanks for the idea of regenerating the BSP. I looked for the command for regenerating the BSP for SDK and it is as follows:

regenbsp -bsp <bsp_name>

When I run this command after adding the xilffs library I saw that associated files are available under sw_bsp/libsrc.

Now there is only one problem left. How can I modify the Software Platform Inferred Flags with TCL command?

0 Kudos
stephenm
Moderator
Moderator
490 Views
Registered: ‎09-12-2007

Yes, the command I gave above is for the later vitis version. 

For the compiler options, you can see an example of this in the wiki below:

 

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841693/HSI+debugging+and+optimization+techniques

0 Kudos
guden49
Visitor
Visitor
475 Views
Registered: ‎11-09-2018

Problem does not seem to be related wtih compiler options. It is rather related with linker options. There is configapp command for application configuration settings.

https://www.xilinx.com/html_docs/xilinx2019_1/SDK_Doc/xsct/sdk/reference_sdk_configapp.html

I can change the configuration parameters with this command but there is not any option for Software Platform Inferred Flags.

To see the available options with this command we need to run the configapp command. Output of command is below

xsct% configapp
assembler-flags Miscellaneous flags for assembler
build-config Get/set build configuration
compiler-misc Compiler miscellaneous flags
compiler-optimization Optimization level
define-compiler-symbols Define symbols. Ex. MYSYMBOL
include-path Include path for header files
libraries Libraries to be added while linking
library-search-path Search path for the libraries added
linker-misc Linker miscellaneous flags
linker-script Linker script for linking the program sections
undef-compiler-symbols Undefine symbols. Ex. MYSYMBOL

As you see there is no option related with Inferred Options.

SPIF.JPG

SPIF.JPG
0 Kudos
guden49
Visitor
Visitor
286 Views
Registered: ‎11-09-2018