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.

DSP/BIOS function access

Hi,

I would like the PIE block to call a certain function when an interrupt fires:

bios.PIE.instance("PIE_INT1_1").fxn = prog.extern("my_function");

However, I also want my_function to be a static function local to the .c file it is written in to protect it from access by other source files.  Is there a way to grant access to the bios for this function, but to no other source files?

Thank you!

  • Andrew Dai said:

    Hi,

    I would like the PIE block to call a certain function when an interrupt fires:

    bios.PIE.instance("PIE_INT1_1").fxn = prog.extern("my_function");

    However, I also want my_function to be a static function local to the .c file it is written in to protect it from access by other source files.  Is there a way to grant access to the bios for this function, but to no other source files?

    Thank you!

    Andrew,

    This seems to be specific to DSP/BIOS, so I am going to move the thread to that forum.

    Regards

    Lori

     

  • Andrew,
    based on the config parameters you set in your TCF file DSP/BIOS generates an assembly source file. That assembly file then passes the name of the function you specified in your 'fxn' parameter to a function from the DSP/BIOS library from where your function is invoked. There is nothing special that DSP/BIOS can do in the assembly source file to make the symbol 'my_function' from another source file visible to the linker.

    But, if you have some idea how you would solve that problem for any set of source files, without DSP/BIOS involved at all, please let me know and there might be a way to implement such a solution with DSP/BIOS.