Post Go back to editing

Generates error in No-OS (2019_R2) using SDK 2019.1

Category: Software
Product Number: AD9467_EVAL_BOARD
Software Version: NO_OS (2019_R2)

Vivado Platform: 2019.1

SDK Platform: 2019.1

HDL Release Version: 2019_R2

No-OS Release Version: 2019_R2

Successfully, we created a hardware HDL(2019_R2) from analog devices sources ---> https://github.com/analogdevicesinc/hdl/tree/hdl_2019_r2 

and it's bitstream generated successfully as mentioned in below figure

After, generation of bitstream we exported hardware to the SDK Platform 2019.1

Here, we insert all required API's from the analog devices sources ---> https://github.com/analogdevicesinc/no-OS/blob/2019_r2/projects/ad9467/src.mk

First of al, we choose the Xilinx Carrier in the app_config.h header file after addition of all API's to the SDK 2019.1.

Example for choosing the Xilinx carrier in the app_config.h header file. We uncomment the #define XILINX to declare it as a carrier.

Here are the issues:

  • Generates some issues in compat.h file.
  • Due to this errors in compat.h our SDK project does not build to run the ADC core ad9467 in testing mode.

Recent Milestone:

Test mode completion and it passed all the test pattern successfully.

Future Goals:

Using ad9467 evaluation board as a key component in our project and end the project as a patent.   

Microcontroller no-OS Drivers team, kindly have a look on my issues, Thanks
Otherwise, ad9467 evaluation board is useless in my upcoming projects because I done everything which you guys told me about Vivado Version and Release Version of analog devices and I installed these versions but still facing issues.

Kindly, need your team support as soon as possible.  

Parents
  • So  ,

    I've discussed this internally,

    1. We don't offer support anymore for 2019_R2 in no-OS.

    Your tools (2019.1) are old, your desired no-OS version (2019_r2) is old.

    The alternatives for you are: use master or use 2021_R1 which is compatible with Vitis 2021.1 or 2021.2.

    On this branch of no-OS with a corresponding .xsa file, the build works on Windows, I've tested this.

    C:\workspace\ad\no-OS\projects\ad9467>make TINYIIOD=y
    [00:00:00] Building for xilinx
    [00:00:00] Evaluating hardware: system_top.xsa
    [00:00:00] Creating and configuring the IDE project
    xtime_l.c:45:9: note: '#pragma message: For the sleep routines, Global timer is being used'
       45 | #pragma message ("For the sleep routines, Global timer is being used")
          |         ^~~~~~~
    arm-none-eabi-ar: creating ps7_cortexa9_0/lib/libxil.a
    xtime_l.c:45:9: note: '#pragma message: For the sleep routines, Global timer is being used'
       45 | #pragma message ("For the sleep routines, Global timer is being used")
          |         ^~~~~~~
    arm-none-eabi-ar: creating ps7_cortexa9_0/lib/libxil.a
    [00:00:00]  Linking srcs to created project
    [00:00:00] [CC] ad9467.c
    [00:00:00] [CC] no_os_irq.c
    [00:00:00] [CC] no_os_spi.c
    [00:00:00] [CC] axi_adc_core.c
    [00:00:00] [CC] axi_dmac.c
    [00:00:00] [CC] iio_axi_adc.c
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/axi_core/iio_axi_adc/iio_axi_adc.c: In function 'get_calibphase':
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/axi_core/iio_axi_adc/iio_axi_adc.c:83:36: warning: format '%li' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]
       83 |  return i + snprintf(&buf[i], len, "%"PRIi32".%.6"PRIi32"", val, abs(val2));
          |                                    ^~~                           ~~~~~~~~~
          |                                                                  |
          |                                                                  int
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/axi_core/iio_axi_adc/iio_axi_adc.c: In function 'get_calibscale':
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/axi_core/iio_axi_adc/iio_axi_adc.c:136:35: warning: format '%li' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]
      136 |  ret = i + snprintf(&buf[i], len, "%"PRIi32".%.6"PRIi32"", val,
          |                                   ^~~
      137 |       abs(val2));
          |       ~~~~~~~~~
          |       |
          |       int
    [00:00:00] [CC] ad9517.c
    [00:00:00] [CC] axi_io.c
    [00:00:00] [CC] delay.c
    [00:00:00] [CC] no_os_uart.c
    [00:00:00] [CC] xilinx_irq.c
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/platform/xilinx/xilinx_irq.c: In function 'xil_irq_register_callbac
    ':
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/platform/xilinx/xilinx_irq.c:254:12: warning: cast between incompatible function types from 'void (*)(void *, uint32_t,  void *)' {aka 'void (*)(void *, long unsigned int,  void *)'} to 'void (*)(void *)' [-Wcast-function-type]
      254 |            (Xil_InterruptHandler) callback_desc->legacy_callback,
          |            ^
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/platform/xilinx/xilinx_irq.c: At top level:
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/platform/xilinx/xilinx_irq.c:337:33: warning: 'struct callback_desc' declared inside parameter list will not be visible outside of this definition or declaration
      337 |         uint32_t irq_id, struct callback_desc *cb)
          |                                 ^~~~~~~~~~~~~
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/platform/xilinx/xilinx_irq.c:381:25: warning: initialization of 'int32_t (*)(struct no_os_irq_ctrl_desc *, uint32_t,  struct no_os_callback_desc *)' {aka 'long int (*)(struct no_os_irq_ctrl_desc *, long unsigned int,  struct no_os_callback_desc *)'} from incompatible pointer type 'int32_t (*)(struct no_os_irq_ctrl_desc *, uint32_t,  struct callback_desc *)' {aka 'long int (*)(struct no_os_irq_ctrl_desc *, long unsigned int,  struct callback_desc *)'} [-Wincompatible-pointer-types]
      381 |  .unregister_callback = &xil_irq_unregister_callback,
          |                         ^
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/drivers/platform/xilinx/xilinx_irq.c:381:25: note: (near initialization for 'xil_irq_ops.unregister_callback')
    [00:00:00] [CC] xilinx_spi.c
    [00:00:00] [CC] iio.c
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/iio/iio.c: In function 'iio_step':
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/iio/iio.c:1379:24: warning: unused variable 'data' [-Wunused-variable]
     1379 |  struct iiod_conn_data data;
          |                        ^~~~
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/iio/iio.c: In function 'iio_init':
    C:/workspace/ad/no-OS/projects/ad9467/build/app/noos/iio/iio.c:1824:1: warning: label 'free_pylink' defined but not used [-Wunused-label]
     1824 | free_pylink:
          | ^~~~~~~~~~~
    [00:00:00] [CC] iio_app.c
    [00:00:00] [CC] iiod.c
    [00:00:00] [CC] ad9467_fmc.c
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c: In function 'main':
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c:196:33: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
      196 |  printf("  AD9517 CHIP ID: 0x%02x", ret_val_32);
          |                              ~~~^   ~~~~~~~~~~
          |                                 |   |
          |                                 |   uint32_t {aka long unsigned int}
          |                                 unsigned int
          |                              %02lx
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c: In function 'adc_test':
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c:357:10: warning: 'return' with a value, in function returning void [-Wreturn-type]
      357 |   return status;
          |          ^~~~~~
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c:325:6: note: declared here
      325 | void adc_test(struct axi_adc *adc,
          |      ^~~~~~~~
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c:381:34: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
      381 |    printf("  ERROR: PN status(%04x).\n\r", rdata);
          |                               ~~~^         ~~~~~
          |                                  |         |
          |                                  |         uint32_t {aka long unsigned int}
          |                                  unsigned int
          |                               %04lx
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c:410:22: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
      410 |    printf("  ERROR[%2u]: rcv(%08x), exp(%08x)\n\r", n, rdata,
          |                    ~~^                              ~
          |                      |                              |
          |                      unsigned int                   uint32_t {aka long unsigned int}
          |                    %2lu
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c:410:33: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
      410 |    printf("  ERROR[%2u]: rcv(%08x), exp(%08x)\n\r", n, rdata,
          |                              ~~~^                      ~~~~~
          |                                 |                      |
          |                                 unsigned int           uint32_t {aka long unsigned int}
          |                              %08lx
    C:/workspace/ad/no-OS/projects/ad9467/build/app/ad9467/src/app/ad9467_fmc.c:410:44: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
      410 |    printf("  ERROR[%2u]: rcv(%08x), exp(%08x)\n\r", n, rdata,
          |                                         ~~~^
          |                                            |
          |                                            unsigned int
          |                                         %08lx
      411 |           edata);
          |           ~~~~~
          |           |
          |           uint32_t {aka long unsigned int}
    [00:00:00] [CC] no_os_circular_buffer.c
    [00:00:00] [CC] no_os_fifo.c
    [00:00:00] [CC] no_os_lf256fifo.c
    [00:00:00] [CC] no_os_list.c
    [00:00:00] [CC] no_os_util.c
    [00:00:00] [LD] ad9467.o no_os_irq.o no_os_spi.o axi_adc_core.o axi_dmac.o iio_axi_adc.o ad9517.o axi_io.o delay.o no_os_uart.o xilinx_irq.o xilinx_spi.o iio.o iio_app.o iiod.o ad9467_fmc.o no_os_circular_buffer.o no_os_fifo.o no_os_lf256fifo.o no_os_list.o no_os_util.o
    make[2]: Nothing to be done for 'post_build'.
    [00:00:00] Done (build/ad9467.elf)

    Here's the device visible in iio-oscilloscope following a windows build and debug:

    2. Stop creating duplicate threads and stop messaging forum members privately.

    Consider this a warning. Next time will be a ban.

    ez.analog.com/.../analog-devices-engineerzone-code-of-conduct

  • Hello , and Microcontroller Support team, we successfully created the ad9467 project using a master branch of hdl and no-OS from the analog devices' GitHub repository. 


    Thanks to the Microcontroller team who support me in each and every step to build the master branch. 

    But, when we program the FPGA board and launch the hardware it shows nothing in the Vitis Serial Terminal.

    Furthermore, when we want to debug the code, as a result, the debug will stop at the function name ad9517_power_mode(ad9517_device, 3, 0) 



    But, when we step into this function the execution of code stop at this 
    lvpecl_channel = &dev->ad9517_st.lvpecl_channels[channel];  // Stuck in this line of code

    As a result, we didn't talk to the ad9467 and a9517 through SPI communication.

    My Platform:

    • Master Branch (HDL and no-OS) 
    • Vitis/ Vivado 2021.2
    • Ad9467 FMC
    • Window 10 Pro, 64 bit


    Thanks 

    Abbas Ali
    FPGA Engineer

  • Actually, the error which we received during execution of code in ad9517_power_mode(ad9517_device, 3, 0) while debugging.

    This error shows Exception: Cannot read target memory. MMU section transaction fault

    Similar, error occurs in ad9517_frequency(ad9517_device, 3, 250000000);


    Kindly, have a look at these Cannot read target memory errors.

    Thanks 

    Abbas Ali

    FPGA Engineer 

Reply
  • Actually, the error which we received during execution of code in ad9517_power_mode(ad9517_device, 3, 0) while debugging.

    This error shows Exception: Cannot read target memory. MMU section transaction fault

    Similar, error occurs in ad9517_frequency(ad9517_device, 3, 250000000);


    Kindly, have a look at these Cannot read target memory errors.

    Thanks 

    Abbas Ali

    FPGA Engineer 

Children
No Data