cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
519 Views
Registered: ‎05-22-2018

Customizing default SDK Application builds/scripts FSBL

Jump to solution

Good day! I'm hoping I can make clear, the question for which I seek answers. We have a project on a custom board, based off the ZCU102 platform. We have created XSCT scripts to build our FSBL with applications for each processor. The default build, however, creates a lot of excess that we do not need to have in our code/solution. We are trying to find a way to customize the Xilinx Build Scripts, or whatever, to have our build be tailored, from the script, upon build, so we do not need to go back and remove/edit 1000s of lines of code. 

I was pointed to some links for creating Procs for FSBL creation and watching the script do its work shined SOME light on the backend building of the FSBL. This could be of help, but I'm unable to see what the input commands, from the build, are. If anyone knows how to turn on/activate a setting in XSCT to display what a script is sending to the XSCT, not just the outputs (puts, printf, etc), that would also be of great assistance.

I hope I was able to explain what we're after; however, if I did not, please let me know and I will work to clarify.

 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
372 Views
Registered: ‎10-06-2016

Hi @masheeen 

I'm not sure what do you mean with unnecessary code on the FSBL, I mean, whatever peripheral on the PS side you disable in the Vivado design will disable the corresponding driver in BSP project within the SDK. It's clear that the FSBL code has some generic code (i.e. code related to SD boot mode, code related to QSPI boot mode...) but in general I don't think it should be a big amount. Anyway the custom repository option is the one you need to follow for customizing the default application code.

What you have to do is to copy the whole zynqmp_fsbl folder in the repository (embeddedsw/lib/sw_apps) and paste in a custom location (inside a folder called sw_apps!!!). Then just modify the code in that FSBL copy (remove code from .c and .h files as required) and in your SDK project add the custom repository to the repository list. After that is done, any new project created with the FSBL template will use the custom copy rather than the default installation library.

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.

View solution in original post

0 Kudos
4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
460 Views
Registered: ‎10-06-2016

Hi @masheeen 

Without knowing the type of changes you are applying, I would say there are two main ways to configure your FSBL build:

Build settings: There is a configapp comand in XSCT that allows you to modify build settings in the similar way you do in the GUI selecting the project properties. The APP creationg wizard/scripts populates the build settings with some default values but someting you might want to change those ones:

Source code: The easy way to handle this use case is creating a custom FSBL template (copy the original and modify) and using the repository feature built in SDK. This allows you to either override exisiting templates (or drivers) or create a new ones, without modifying the installation folder files (as the custom repository can be located anywhere).

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Observer
Observer
434 Views
Registered: ‎05-22-2018

Thank you, a lot, for your response. I am somewhat familiar with the configapp command in XSCT, however it doesn't seem to quite have the ability to do as much as we're after.

The second option you provided is definitely in line with what we're after. I was able to find the repository and the files that SDK uses to build from. I am, however, having some trouble in deciphering where to make the changes at.

I'll try to explain a little further in what we're after. We get our *.hdf from out FPGA team with the IO build, etc etc, that we'll be able to use within our software build. A lot of features in the PL side of the SoC are turned off, ie CAN, I2C, etc. so we do not need to have these features, related code, created with the FSBL, if possible. Instead of having to go back and remove all of the unnecessary code, the goal is to find a way to only create the necessary portion of code without all of the excess.

I've found the zynqmp_fsbl tcl and mss files and related .c and .h files held in the repository that we use, presently, for our build. I'm not finding in the build/script files where these are determined to be build into the FSBL application.

If you may be able to provide a little further guidance, it would be epically appreciated.

 

Thanks

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
373 Views
Registered: ‎10-06-2016

Hi @masheeen 

I'm not sure what do you mean with unnecessary code on the FSBL, I mean, whatever peripheral on the PS side you disable in the Vivado design will disable the corresponding driver in BSP project within the SDK. It's clear that the FSBL code has some generic code (i.e. code related to SD boot mode, code related to QSPI boot mode...) but in general I don't think it should be a big amount. Anyway the custom repository option is the one you need to follow for customizing the default application code.

What you have to do is to copy the whole zynqmp_fsbl folder in the repository (embeddedsw/lib/sw_apps) and paste in a custom location (inside a folder called sw_apps!!!). Then just modify the code in that FSBL copy (remove code from .c and .h files as required) and in your SDK project add the custom repository to the repository list. After that is done, any new project created with the FSBL template will use the custom copy rather than the default installation library.

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.

View solution in original post

0 Kudos
Highlighted
Observer
Observer
362 Views
Registered: ‎05-22-2018

Thank you for the elaboration on how to go about this. Also, "unnecessary" may not be the correct word choice, but I'm a recent EE grad starting my career as an embedded software engineer. Been at it for about 6 months now, so I'm still picking up a lot of things. 

Thanks again. This will definitely get us in the right direction for getting our customization where we want it.

0 Kudos