cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zeros
Visitor
Visitor
2,474 Views
Registered: ‎12-22-2018

how to compile app projcet on 64-bit microblaze use sdk ?

Jump to solution

Right now , I use a 64-bit microblaze to do something.

After I compiled my app project I find it doesn't work.  Even if I use -m64 flag for build and link.

But if I change the microblaze to 32-bit, compile  the app project without -m64 flag, it works well.

Why?

 

1 Solution

Accepted Solutions
miker
Xilinx Employee
Xilinx Employee
1,911 Views
Registered: ‎11-30-2007

The following solution assumes Vitis 2019.2 and MicroBlaze 64-bit.

Verify you have the barrel shifter enabled on your MicroBlaze LogiCORE IP configuration.

forums_uB64_1.jpg

forums_uB64_2.jpg

forums_uB64_3.jpg

forums_uB64_4.jpg

forums_uB64_5.jpg

One thing to note is that Vitis does not automatically build… unlike SDK, which automatically rebuilds everything. Therefore, you need to make sure you build your platform first and then your application.

Below are my steps:

  • Export Hardware with Bitstream from Vivado (with Implemented Design Checkpoint open; File > Export > Export Hardware...)
  • Launch Vitis (Tools > Launch Vitis)
  • Create a new application project (i.e. Hello World) (File > New > Application Project...)
  • Point to XSA file
  • Select Hello World application template
  • Right-click the application name and select "Properties"

forums_uB64_6.jpg

  • Select C/C++ Build > Settings in the left navigator bar and select MicroBlaze gcc compiler and add the "-m64" flag. Next select the MicroBlaze gcc linker and add the "-m64" flag. Finally, Select Apply and Close.

forums_uB64_7.jpg

forums_uB64_8.jpg

  • Select the platform and “Build Project” (this will take a little while)

forums_uB64_9.jpg

  • Select the application under “debug” and “build”

forums_uB64_10.jpg

  • Program the FPGA prior to loading MicroBlaze (Xilinx > Program FPGA)
  • Select the BIT file for your implemented FPGA (either in the <proj_name>.runs/impl/ directory or in the same location as the XSA if you exported with bitstream).
  • Launch Hello World on target (Select Run As > Launch on Hardware (System Project Debug))

forums_uB64_11.jpg

  • Monitor terminal for successful run

forums_uB64_12.jpg

Please Reply, Kudos, and Accept as Solution.

View solution in original post

6 Replies
zeros
Visitor
Visitor
2,435 Views
Registered: ‎12-22-2018

In addition, i used sdk2018.3 

0 Kudos
petersmith69
Newbie
Newbie
2,381 Views
Registered: ‎03-22-2019

 Faced the sme issue.hope we get a solution anytime soon.

hope this community won't disappoint us.

Regards.

0 Kudos
borial
Observer
Observer
2,210 Views
Registered: ‎05-14-2013

sdk 2019.1, the same issue.

and for the 64bit microblaze, why its AXI bus still 32bit?

0 Kudos
sm7ed
Observer
Observer
1,945 Views
Registered: ‎05-16-2018
I'm struggling with this same problem, a basic 32-bit MicroBlaze works, but advancing to 64-bit fails. I am running it on an Alveo board in the 2019.2 suite (Vivado, Vitis). It would be great for anyone to post a solution. Will keep investigating what fails and will post a solution if it works.
0 Kudos
miker
Xilinx Employee
Xilinx Employee
1,912 Views
Registered: ‎11-30-2007

The following solution assumes Vitis 2019.2 and MicroBlaze 64-bit.

Verify you have the barrel shifter enabled on your MicroBlaze LogiCORE IP configuration.

forums_uB64_1.jpg

forums_uB64_2.jpg

forums_uB64_3.jpg

forums_uB64_4.jpg

forums_uB64_5.jpg

One thing to note is that Vitis does not automatically build… unlike SDK, which automatically rebuilds everything. Therefore, you need to make sure you build your platform first and then your application.

Below are my steps:

  • Export Hardware with Bitstream from Vivado (with Implemented Design Checkpoint open; File > Export > Export Hardware...)
  • Launch Vitis (Tools > Launch Vitis)
  • Create a new application project (i.e. Hello World) (File > New > Application Project...)
  • Point to XSA file
  • Select Hello World application template
  • Right-click the application name and select "Properties"

forums_uB64_6.jpg

  • Select C/C++ Build > Settings in the left navigator bar and select MicroBlaze gcc compiler and add the "-m64" flag. Next select the MicroBlaze gcc linker and add the "-m64" flag. Finally, Select Apply and Close.

forums_uB64_7.jpg

forums_uB64_8.jpg

  • Select the platform and “Build Project” (this will take a little while)

forums_uB64_9.jpg

  • Select the application under “debug” and “build”

forums_uB64_10.jpg

  • Program the FPGA prior to loading MicroBlaze (Xilinx > Program FPGA)
  • Select the BIT file for your implemented FPGA (either in the <proj_name>.runs/impl/ directory or in the same location as the XSA if you exported with bitstream).
  • Launch Hello World on target (Select Run As > Launch on Hardware (System Project Debug))

forums_uB64_11.jpg

  • Monitor terminal for successful run

forums_uB64_12.jpg

Please Reply, Kudos, and Accept as Solution.

View solution in original post

sm7ed
Observer
Observer
1,881 Views
Registered: ‎05-16-2018

Thank you, miker, your detailed instructions were great to figure out what I was doing wrong, which was not enabling the barrel shifter.

0 Kudos