cancel
Showing results for 
Search instead for 
Did you mean: 
Advisor
Advisor
660 Views
Registered: ‎02-12-2013

Vitis bare metal revision control

Jump to solution

Hello,

I need to use Vitis in bare metal mode to test some fpga logic using an R5 processor on an MPSOC.  I am just a casual user but still I want to keep these test programs and Vitis projects under version control for future use.

In the old XSDK days I was able to just commit my couple of C source files and an XSCT project setup script.  The setup script created all the supporting BSP and such that my code needed to build.  Vitis still has XSCT but I have not been able to make this work.

What is the correct way to revision control little bare metal projects like this that have only one or two C source files? 

I use Git.  I did a file count on the workspace and there are 2099 files in there.

 

----------------------------------------
DSP in hardware and software
-----------------------------------------
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
592 Views
Registered: ‎11-09-2015

Re: Vitis bare metal revision control

Jump to solution

Hi @pedro_uno 

You can use XSCT as well with Vitis. The commands are a bit different but still quite close. I was able to build a quick SDK flow application following the Vitis documentation and more specifically the XSCT Use Cases page.

This is the steps I used for a embedded design on Zynq-7000 (of course you will need to adapt it depending on your target)

  1. First set the workspace for the project
    setws ./workspace
    cd ./workspace
  2. Then create your application referring your XSA (this will automatically create the platform and the domain)
    app create -name my_app -hw ../system.xsa -os standalone -proc ps7_cortexa9_0 -template {Empty Application}
  3. Then import your sources
    importsources -name my_app -path ../src/
  4. And finally build the application
    app build -name my_app
  5. DONE ;)

So as with SDK, you will be able to simply commit a TCL script and the c sources


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

5 Replies
Highlighted
Moderator
Moderator
593 Views
Registered: ‎11-09-2015

Re: Vitis bare metal revision control

Jump to solution

Hi @pedro_uno 

You can use XSCT as well with Vitis. The commands are a bit different but still quite close. I was able to build a quick SDK flow application following the Vitis documentation and more specifically the XSCT Use Cases page.

This is the steps I used for a embedded design on Zynq-7000 (of course you will need to adapt it depending on your target)

  1. First set the workspace for the project
    setws ./workspace
    cd ./workspace
  2. Then create your application referring your XSA (this will automatically create the platform and the domain)
    app create -name my_app -hw ../system.xsa -os standalone -proc ps7_cortexa9_0 -template {Empty Application}
  3. Then import your sources
    importsources -name my_app -path ../src/
  4. And finally build the application
    app build -name my_app
  5. DONE ;)

So as with SDK, you will be able to simply commit a TCL script and the c sources


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

Highlighted
Advisor
Advisor
516 Views
Registered: ‎02-12-2013

Re: Vitis bare metal revision control

Jump to solution
Thanks,
The importsources command was the missing piece for me.
Have a good day.
Pete
----------------------------------------
DSP in hardware and software
-----------------------------------------
0 Kudos
Highlighted
189 Views
Registered: ‎01-15-2019

Re: Vitis bare metal revision control

Jump to solution

The solution of version control of the tcl script and the source files is all well and good.

However the importsources command copies your versioned source files to the un-version controlled  workspace, just created by the tcl script.

This means that there are now two copies of the source files, so changes will be made to the temporary copied files rather than the original files.  This can lead to problems if your changes are not copied back to the version controlled files(the original source files copied to the project).

Have I missed something here?  This there a straight forward way to save a Vitis project in a version control system without making copies for the source files?  Perhaps someone can list all the Vitis files important to have under version control and the ones not required.  Thank you.

0 Kudos
Highlighted
Observer
Observer
148 Views
Registered: ‎08-29-2017

Re: Vitis bare metal revision control

Jump to solution

According to UG1400 Chapter 23, the importsources Tcl command does not include the ability to 'link' source files the way that you can by the Import Sources IDE flow.

One way to handle this is to never edit the version of source file that is copied into the Vitis project. You would edit the source in your Git tree instead. When you are ready to test your code, you run your Tcl script to create a fresh project and build the source and run your tests. When satisfied, blow away the Vitis project. Repeat. The more advanced players can optimize this flow to reduce project-level overhead, which with Vitis, is significant. I consider this an industry-standard approach.

Or you can get savvy with the .project file...and dynamically, or otherwise create your own. If you go through the IDE flow to Import Sources, and then look at the .project. file, you will see how the IDE handles this case. This appears to be an IDE feature that rides on top of XSCT. It would be nice if XSCT importsources will add this capability in the future, but I think that most people just do what I describe in the previous paragraph.

See attached Tcl for how I build an FSBL in XSCT. It's early days for my flow, but the basic commands work.

Note that building from XSCT 2019.2 on Windows requires a patch: Link

0 Kudos
Highlighted
Newbie
Newbie
72 Views
Registered: ‎03-16-2019

Re: Vitis bare metal revision control

Jump to solution

Yikes, I assumed that importsources command only created a link in the project to your actual source files.   If it makes a copy of the files that is unacceptable.

0 Kudos