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: 
Scholar trenz-al
Scholar
8,550 Views
Registered: ‎11-09-2013

hsi:generate_target -compile fails on app

I am trying to make a script that:

 

1) creates a template application, say "hello_world" without compiling it

2) modifies the bsp parameters

3) compiler the application

 

EVERYTHING works well, except the last step

 

hsi::generate_target -dir $appdir -compile -verbose app

 

this line just RETURNS without doing anything, and not giving any message either!!

 

well, actually the line causes FATAL error in HSI, that causes FULL lockdown and freeze on next command, no matter the next command would be, so as example

 

puts [hsi::generate_target -dir $appdir -compile -verbose app]

 

this would never return, and I would need to KILL HSI process from task manager..

 

 

 

 

0 Kudos
13 Replies
Scholar pratham
Scholar
8,539 Views
Registered: ‎06-05-2013

Re: hsi:generate_target -compile fails on app

@trenz-al 2015.3 HSI? Can you post your script here?

-Pratham

----------------------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------------------
0 Kudos
Scholar trenz-al
Scholar
8,536 Views
Registered: ‎11-09-2013

Re: hsi:generate_target -compile fails on app

2015.2, but 2015.3 it think makes same error

 

the second puts after the last generate_target always crashes!

 

==========================

cd workspace
set appdir hello_world
set hw [hsi::open_hw_design test_board.hdf]
set cpu [get_cells -filter {IP_TYPE==PROCESSOR}]

set swdesign [hsi::create_sw_design system -proc $cpu -app hello_world]
hsi::current_sw_design $swdesign

# generate hello world, but do not compile!
hsi::generate_app -hw $hw -sw $swdesign -app hello_world -proc $cpu -dir $appdir -verbose
# compile BSP, works OK
hsi::generate_target -dir $appdir/hello_world_bsp -compile -verbose bsp $swdesign
#
# CRASH, eg does nothing
#
hsi::generate_target -dir $appdir -compile -verbose app $swdesign
#
puts "This does always get printed"
puts "if generate target (app) is called, then GARBAGE is printed here, and HSI FREEZE CRASH!"

====================================================

0 Kudos
Scholar stephenm
Scholar
8,502 Views
Registered: ‎05-06-2012

Re: hsi:generate_target -compile fails on app

The line (below) looks incorrect.

hsi::generate_target -dir $appdir/hello_world_bsp -compile -verbose bsp $swdesign

 

Should this not be:

hsi::generate_target -dir ${appdir}/hello_world_bsp -compile -verbose bsp $swdesign

 

Also, if you want to compile the bsp, then use the generate_bsp. However you dont need this as you 

are using generate_app (the bsp will be built here too). So, you can just add the -compile here.

 

For example:

cd workspace
set appdir hello_world
set hw [hsi::open_hw_design ../design_1_wrapper.hdf]
set cpu [hsi::get_cells -filter {IP_TYPE==PROCESSOR}]
set swdesign [hsi::create_sw_design system -proc $cpu -app hello_world]
hsi::generate_app -hw $hw -sw $swdesign -app hello_world -proc $cpu -dir $appdir -compile

 

This will create the executable.elf for you. 

 

0 Kudos
Scholar trenz-al
Scholar
8,489 Views
Registered: ‎11-09-2013

Re: hsi:generate_target -compile fails on app

Hi in my original post I said:

 

1) creates a template application, say "hello_world" without compiling it

 

this is NEEDED, I have no issues creating and compiling in one-go, but this is not an option.

 

As soon as create template app without -compile, and try to compile it later, then HSI CRASHES

 

Please help!

0 Kudos
Scholar stephenm
Scholar
8,483 Views
Registered: ‎05-06-2012

Re: hsi:generate_target -compile fails on app

oh, right. I see. I never use this generate_target API. I just exec the make files (which is essentially what this should do if it worked i guess)

 

I have attached an example script that I created that builds the socket_app in xapp1026. This uses HSI to build the hw_platform, bsp (changes the bsp settings), sets the compiler options, then builds the elf.

 

Note: There looks like a bug with the APP_LINKER_FLAGS though. I couldn’t get this to work.

So, I worked around this by setting it manually in the makefile.

 

To test, download the zip, and run the script.tcl from XSCT (you will need to navigate to the unzipped folder)

 

Or, just see the proc build_ws as this is the main proc.

 

In the mean time, I ll check on this generate_target API to see what this is meant to do.

Scholar trenz-al
Scholar
8,478 Views
Registered: ‎11-09-2013

Re: hsi:generate_target -compile fails on app

thanks I try

 

I can change BSP settings, but what I need todo is:

 

change one .h in the template appliction, to change the srec_spi_bootloader

flash load address, the only way to todo would be that the compile is invoked LAST, but this CRASHes :(

0 Kudos
Scholar stephenm
Scholar
8,472 Views
Registered: ‎05-06-2012

Re: hsi:generate_target -compile fails on app

Do you have the hdf file?

I can create a script for you

0 Kudos
Scholar trenz-al
Scholar
8,466 Views
Registered: ‎11-09-2013

Re: hsi:generate_target -compile fails on app

I have, but the problem is generic, not related to specific design.

 

So if you take any HDF with microblaze, and try to create say hello_world

while NOT specifiying the -compile at the creation of the template

 

and if after that you can run generate_target

that compiles the template app, then the problem is solved.

 

I have 2 workarounds, that I do not like:

 

1) I make local copy of the template_app, and use -compile as "one pass"

2) I run SDK make :(

 

I do not like them.. so I am trying to fix the HSI bug..

 

Or, let me say the reason, goal:

 

do_it_all.tcl

*************

1) create project, export hwdef

2) create_app, build elf

3) assot .elf

4) build bitfile with the elf merged into bram by vivado, not SDK (there is SDK bug that erases timestamp in bit file)

 

ideally this should run as single TCL script

 

I can currently do it as sequence of batch files that execute different TCL in a sequence

 

***

Your script MANY thank you already ! really, thank I looked and there are several nice tricks inside..

0 Kudos
Scholar stephenm
Scholar
8,463 Views
Registered: ‎05-06-2012

Re: hsi:generate_target -compile fails on app

I tried this real quick. My script is attached. I used a stock SPI KC705 design that I had on my machine. This creates the project, and it manually changes the blconfig.h to change the baseaddress (I guessed it was this you wanted changing??). I then use the make to build the ELF:

 

To test, just download the zip, and source the script.tcl:

 

Scholar trenz-al
Scholar
6,869 Views
Registered: ‎11-09-2013

Re: hsi:generate_target -compile fails on app

Hi

 

you are using my workaround 2, what I also wanted to avoid. with

 

make

 

there are no issue, it works, yes.

but I assumed the generate_target should also work, as generate_target works for bsp, but not for app, CRASH

 

thank a lot again, for trying and helping and script example, I can only give kudos online.. so here you go again..

0 Kudos
Scholar stephenm
Scholar
6,863 Views
Registered: ‎05-06-2012

Re: hsi:generate_target -compile fails on app

For now it seems to be the only workaround. I'll check up on the issue to see what's wrong.
Scholar trenz-al
Scholar
6,857 Views
Registered: ‎11-09-2013

Re: hsi:generate_target -compile fails on app

Ok, yes seems so.

 

I will try once one 2015.4 just got it installed, but I guess the issue persists..

0 Kudos
Scholar stephenm
Scholar
6,849 Views
Registered: ‎05-06-2012

Re: hsi:generate_target -compile fails on app

Unlikely to be addressed here. But worth a shot since you are installing anyway
0 Kudos