Jump to content
  • 0

got "terminate called without an active exception" when running FMC Pcam Adapter + 4 pcams Demo with Zedboard


Tparng

Question

When running FMC Pcam Adapter + 4 pcams Demo with Zedboard, I got got "terminate called without an active exception".  This happens when calling AXI_VDMA<ScuGicInterruptController> vdma_a_driver(...) in the following main.cc list.  What could be the root cause ?  Thanks,  Tparng

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

int main()
{
    //Init CPU, UART, caches etc.
    init_platform();

#ifdef _DEBUG
    SET_VERBOSE_FLAG();
#endif

    VERBOSE("Initializing...");
    try
    {//Constructor of hardware driver classes might throw
        u8 read_master_select;
        //Blank VDMA frame buffers
        memset((u8*)frame_baseaddr, 0x55, (1920*1080*3)*4);
        VERBOSE("p0");
        //Flush D-Cache because this is DMA-accessible memory
        Xil_DCacheFlushRange(frame_baseaddr, (1920*1080*3)*4);
        VERBOSE("p1");
        ScuGicInterruptController irpt_ctl(IRPT_CTL_DEVID);
        VERBOSE("p2");
        //Construct camera control IPs
        PS_GPIO<ScuGicInterruptController> gpio_driver(GPIO_DEVID, irpt_ctl, GPIO_IRPT_ID);
        VERBOSE("p3");
        Nop_GPIO nopgpio;
        PS_IIC<ScuGicInterruptController> iic_driver(CAM_I2C_DEVID, irpt_ctl, CAM_I2C_IRPT_ID, 100000);
        VERBOSE("p4");
        //Dual-channel VDMA for the display and the first camera
        AXI_VDMA<ScuGicInterruptController> vdma_a_driver(VDMA_A_DEVID, frame_baseaddr, irpt_ctl,  VDMA_A_MM2S_IRPT_ID,
                            VDMA_A_S2MM_IRPT_ID);

main.cc

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

After more trial and errors, I found that the C++ templates like std::bind and std::make _unique used in main.cc will cause "terminate called without an active exception".  Does anyone know what could be the root cause? I am using Vitis IDE 2022.1.

Link to comment
Share on other sites

  • 0

Hullo @Tparng,

Just to make sure, are you running our 2022.1 release of this project ? There were a lot of fixes made for this version and it has been tested extensively.

You can find it here: FMC-Pcam-Adapter/2022.1-1 as two archives, one containing the Vivado hardware project and the other containing the Vitis software project.

Alternatively you can recreate it from these sources: Vivado v2022.1 Hardware Project Repo and Vitis v2022.1 Software Project Repo.

Link to comment
Share on other sites

  • 0

@think3 and JCovin,

Thanks for your help.  So far, I can run the FMC Pcam Adapter Demo suceesfully from the  system_wrapper[Platform] and elf file pre-built in the Vitis v2022.1 Software Project Repo.  However, if I update the system_wrapper[Platform] from a new Bitstream generated from the hw project in archives of FMC-Pcam-Adapter/2022.1-1 zip file, I got the "terminate called without an active exception" again.  What could be the cause of this issue? 

Also, I could not find a  checkout.tcl file in the  Vivado v2022.1 Hardware Project Repo for checking out the hw project.  (I found a digilent_vivado_checkout.tcl in digilent-vivado-scripts folder and tried ways to run it in Vivado tcl console but there were errors and I couldn't create the hw project successfully).

I need a way to reproduce the hw Bitstream that can also run the Vitis app successfully.

Thanks,

Tparng

Edited by Tparng
Link to comment
Share on other sites

  • 0

What errors were you getting when running the checkout script ?

If it's the one I'm thinking of you can just go inside project_info.tcl and replace "avnet.com:zedboard:part0:1.4" with "digilentinc.com:zedboard:part0:1.0" on the line that says "set_property "board_part" $project_obj".

Or make sure you have the board files installed for either of those by going to (inside Vivado) Tools -> Vivado Store....

Link to comment
Share on other sites

  • 0

@think3,

After replacing "avnet.com:zedboard:part0:1.4" with "digilentinc.com:zedboard:part0:1.0" inside project_info.tcl , I got the following error:

ERROR: [BD_TCL-109] This script was generated using Vivado <2019.1> and is being run in <2022.1> of Vivado. Please run the script in Vivado <2019.1> then open the design in Vivado <2022.1>. Upgrade the design by running "Tools => Report => Report IP Status...", then run write_bd_tcl to create an updated script.
ERROR: [BD 5-229] Please open or create a block design first.
ERROR: [Common 17-39] 'get_bd_designs' failed due to earlier errors.

    while executing
"get_bd_designs"
    invoked from within
"if {[llength $bd_files] == 1} {
    # Create local source directory for bd
    if {[file exist "[file rootname $xpr_path].srcs"] == 0} {
        file mkdir "[file..."
    (file "/home/tparng/zed-new/ZedBoard-FMC-Pcam-Adapter-Demo/digilent-vivado-scripts/digilent_vivado_checkout.tcl" line 68)

 

Do I need to install a Vivado2019.1 then ?

Thanks,

Tparng

Link to comment
Share on other sites

  • 0

You need to clone this repo specifically: ZedBoard-HW. Then you cd into ZedBoard-HW, you checkout the FMC-Pcam-Adapter/master branch and then run the git submodule update --init command and then you can run the checkout.tcl script from inside Vivado v2022.1.

 

Edited by JColvin
Corrected Zedboard-HW link to include the "/Digilent" url
Link to comment
Share on other sites

  • 0

@think3,

I found the ZedBoard-HW link you provided is valid today and successfully checkout the HW project and build a new Bitstream on Vivado 2022.1.

After I updated the system_wrapper[Platform] from the new Bitstream, if I do Generate Linker Script before Build Project on the FMC_Pcam_Adapter_demo app. then the demo app will fail and exit with "terminate called without an active exception" error again. 

If I do not do Generate Linker Script before Build Project, then the demo app can run successfully. 

Does that mean I should not do  Generate Linker Script before Build Project or I haven't used the right options/settings for Generate Linker Script command?

If so, how can I be sure I am building the app with the newly updated hw platform?

Thanks,

Tparng

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...