This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to get the source code for Hwi_create()



Hi

I want to study the how Hwi_create() works, but there is no source code for Hwi_create(). 

Now I have a question, as SYS/BIOS 6.x is provided with full source code and requires no runtime license fees, how can I get the source code for Hwi_create()?

BTW: Hwi_create() will call  xdc_runtime_Core_createObject__I( ), the source code for xdc_runtime_Core_createObject__I( ) is not provided.

Thank you very much!

  • Hwi_create() is defined as a static inline function within the Hwi,h file you're including in your C file.

    Core_createObject() is defined in Core_mem.c which should be in the xdctools installation you're using under xdc/runtime/Core_mem.c

    Alan

  • Hi Alan,

    Thank you for your reply, I have found Core_createObject() in Core-mem.c(other than Core_mem.c). But I have another question.

    What's the relationship between xdc_runtime_Core_createObject__I( ) and Core_createObject() ?

    And I found that:

    /* createObject__I */
    #define xdc_runtime_Core_createObject xdc_runtime_Core_createObject__I

    Thanks!

     

     

  • As you disovered in the Core.h file,  Core_createObject() is the "short name" for xdc_runtime_Core_createObject().

    The true symbolic name of the function is the "xdc_runtime_Core_createObject__I" which is almost guaranteed NOT to have a name-space collision with anything in the user's application.

    For most purposes, the short names of library functions can be used. However, if by some chance the user's application has a function called Core_createObject(), the name-space collision can be avoided by adding a "#define xdc_runtime_Core__nolocalnames" statement just before the #include <xdc/runtime/Core.h>  statement.

    This prevents the function short names from being #defined.

    The consequence to this is that the application code most use the full function name (minus the "__?" appendix) when an API is invoked.

    Alan

  • It's quite clear.

    Thank you very much!