zoukankan      html  css  js  c++  java
  • Xilinx驱动API的一个重要BUG,ZEDBOARD,ZYNQ7000

    An Important ANNOUNCEMENT at zynq-7000 driver api

    This is really a significant notify you never know!!!

    Once you make a change at the driver api function and ctrl+S to save the changes and re-build it.

    No error occurs , it seems so good !

    But it really works?

    In order to explain the bug of Xilinx, I build a simple hello world application based on zed_hw_platform .

    Type the main as follows:

    XGpioPs Gpio;

        XGpioPs_Config *ConfigPtr;

        ConfigPtr = XGpioPs_LookupConfig(0);

        XGpioPs_CfgInitialize(&Gpio, ConfigPtr, ConfigPtr->BaseAddr);

     

        u32 data=XGpioPs_IntrGetStatusPin(&Gpio,50);

        data++;

    print("Hello World\n\r");

     

    Toggle a breakpoint at the XGpioPs_IntrGetStatusPin and step into the function until :

    XGpioPs_GetBankPin(Pin, &Bank, &PinNumber);

    Executet the sentence and the value of Bank and PinNumber as shown following:

     

    Yes ,you get it ! the variable turns out 0 !

    What a absurd thing! Pin 50 locate in Bank 1 obviously!

     

    And now I try to see clearly what happened during function: XGpioPs_GetBankPin

    I try to modify the function to a clear structure to see the variables :

    for (*BankNumber = 0; *BankNumber < 4; (*BankNumber)++)

        {

            u8 data=XGpioPsPinTable[*BankNumber];

            if (PinNumber <= data )    break;

     

        }

    But once you debug the modified function , you can not see the value of variable: data .

    Now I will show you an more interesting thing!

     

    Change the driver api function name XGpioPs_GetBankPin to XGpioPs_GetBankPin_NO as shown following:

    Remember to save the modified file and re-build project.

    Wow! No error occurs and run the application , it works as nothing happened!

     

    What happened????

    Yes , the driver api can not change by hand . although you can modify and save the changes, but it have no works at all.

     

    NOW select Project>Clean… >Clean all Projects , slect OK to clean all the .o object and re-build BSP/application project.

    This is a temporary screen shot :

     

    Why the bank turn out 0?

    We have known the driver api can not be modified. But XGpioPs_GetBankPin(Pin, &Bank, &PinNumber) remains a bug still.

    Where is wrong ???

     

     

    As we see, the folder ps7_cortexa9_0 disappeared. After a short while , it appears . doudle click xgpiops.c file to locate the XGpioPs_GetBankPin function.

    Yes , any changes you have made disappeared . the libgen tools re-generate the driver api and you changes lost.

    That's really terrible phenomenon. You can modify and save the changes in the driver api files but it have no work at all.

  • 相关阅读:
    iptbales未完全删除或禁用的问题
    一键部署安装
    python表单流式上传gzip格式文件代码
    was进行jvm配置和GC收集
    Nginx心跳检测
    Python简单本地加解密
    vmware克隆虚拟机并设置网络(vcenter6或5.5)
    python操作mongodb数据库
    vue props传值后watch事件未触发的问题
    docker实战之通过nginx镜像来部署静态页
  • 原文地址:https://www.cnblogs.com/dragen/p/3136839.html
Copyright © 2011-2022 走看看