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: 
Contributor
Contributor
941 Views
Registered: ‎09-02-2013

Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

I have just ported my design from ISE 14.7 to Vivado 2018.2.  I am in XSDK now to build the system.  With the ps7_init.c that came from the Vivado export, there is a C syntax error, .../AEye_HW/ps7_init.c:12382:9: error: jump to case label [-fpermissive].

 

In looking at the code in ps7_init.c, I see the following around line 12382:

        case OPCODE_MASKDELAY:
            addr = (unsigned long*) args[0];
            mask = args[1];
            int delay = get_number_of_cycles_for_delay(mask);
            perf_reset_and_start_timer(); 
            while ((*addr < delay)) {
            }
            break;
        default:
            finish = PS7_INIT_CORRUPT;
            break;

The error is that the int delay is defined without having a proper scope.  I changed it to this to give it proper scope.

 

        case OPCODE_MASKDELAY:
        {
            addr = (unsigned long*) args[0];
            mask = args[1];
            int delay = get_number_of_cycles_for_delay(mask);
            perf_reset_and_start_timer(); 
            while ((*addr < delay)) {
            }
        }
            break;
        default:
            finish = PS7_INIT_CORRUPT;
            break;

How do we request a defect be created for this so that it will be fixed in future versions?  Thanks!

 

Bill

 

EDIT: Just to be clear, I built the HW in Vivado 2018.2.  My software that I use is still in 2017.4.  There are some minor changes that I need to make to upgrade to 2018.2 and haven't worked on that yet.  I wanted to make sure it was working first in XSDK 2017.4 before making changes to XSDK 2018.2.

0 Kudos
8 Replies
Moderator
Moderator
895 Views
Registered: ‎11-09-2015

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

Hi @bill.whitehead,

 

You cannot mix and match between the Vivado/Sdk version. If you are using vivado 2018.2 you need to use SDK 2018.2 because each IP (including the Zynq IP) have a unique version.

 

Please try to generate the FSBL with SDK 2018.2. You should get no error for ps7_init.c


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
884 Views
Registered: ‎09-02-2013

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

Hi @florentw,

 

Thanks for the reply.  I will try your recommendation.  Regardless of that, the simulation in 2018.2 is not working.  The HW build was just a quick try to see if the simulation matched up with the build results.

As I stated in my original post, if I create a new project with the PS7, SmartConnect, and my two IP blocks, it works fine in simulation.  When I have my entire design, the SmartConnect doesn't work correctly in simulation. 

Any other thoughts of how to isolate this better?  I wonder if it is something the the BD parser is doing when creating the SmartConnect block and setting properties. It isn't obvious to me.

Thanks!

-Bill

0 Kudos
Contributor
Contributor
812 Views
Registered: ‎09-02-2013

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

Hi @florentw,

 

I built everything in 2018.2.  I used Vivado 2018.2.  I exported the hdf file.  I made sure that the HW project was using the HDF file.  The ps7_init.c file is updated when I update the hdf file.  There is still an error in the ps7_init.c.  I have a C++ project that I am using. 

 

This is what the ps7_init.c file has starting at line 12374:

        case OPCODE_MASKDELAY:
            addr = (unsigned long*) args[0];
            mask = args[1];
            int delay = get_number_of_cycles_for_delay(mask);
            perf_reset_and_start_timer(); 
            while ((*addr < delay)) {
            }
            break;
        default:
            finish = PS7_INIT_CORRUPT;
            break;
        }

This is what I did to "fix" this to allow me to build:

        case OPCODE_MASKDELAY:
        {
            addr = (unsigned long*) args[0];
            mask = args[1];
            int delay = get_number_of_cycles_for_delay(mask);
            perf_reset_and_start_timer(); 
            while ((*addr < delay)) {
            }
            break;
        }
        default:
            finish = PS7_INIT_CORRUPT;
            break;
        }

I believe this is with the generation of the ps7_init.c file from Vivado.  I think this should have a defect filed against this.  Do you have access to that?  I can't issue SRs anymore.  Thanks!

 

Bill

 

0 Kudos
Moderator
Moderator
800 Views
Registered: ‎11-09-2015

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

HI @bill.whitehead,

 

If you can send me your hdf file, yes I can repport this to development.

 

You can either attach it to this forum thread or let me know if you want to share it in private.

 

Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Moderator
Moderator
789 Views
Registered: ‎11-09-2015

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

Hi @bill.whitehead,

 

Can you give steps to reproduce your issue?

 

I tried to create the HW platform + BSP + C++ app and I do not get any error.

 

Thanks


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
783 Views
Registered: ‎09-02-2013

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

Hi @florentw,

 

I created a new workspace.  I then created a new hardware platform specification using the HDF I sent you (called board_hw in my workspace).  I built a default BSP (called standalone_bsp_0).  I then created a blank C++ application for a "Hello World" demo, which I called cpp_demo.  I then went under cpp_demo/src.  I then linked in the ps7_init.c from the board_hw area to the cpp_demo/src area.  The link I used for getting the linking done I followed here:  Linking files in Eclipse

 

Now it gives the same errors that I was seeing in my normal project.  If I do the fix I mentioned previously to give that section of code its own compilation unit with the braces {}, it compiles.  Let me know if you need more info to replicate this.

 

Bill

0 Kudos
Moderator
Moderator
772 Views
Registered: ‎11-09-2015

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

Hi @bill.whitehead,

 

Ok. However I do not understand why you link the ps7_init.c into your application?

 

The ps7_init.c is usually used in the FSBL which is a separate elf file as the application. And the FSBL is only available in C.

 

I am not sure if what you are doing is expected from a user. Maybe you can clarify.

 

Thanks,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
767 Views
Registered: ‎09-02-2013

Re: Vivado 2018.2 export to XSDC - ps7_init.c invalid syntax

@florentw,

 

We linked that in because we brought in a stripped down version of the FSBL into our code base so that we could "reboot" into another application at another QSPI address offset.  We are running baremetal and back in 2013, when we first developed our application, this what the best way we could figure out how to boot to another application in baremetal.  If there is another recommended and tested method that Xilinx or others are using for baremetal applications, I would be interested in reviewing it.  Thanks!

 

Bill

0 Kudos