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.

Defining constants in DSP BIOS

Hello,

 

I was just wondering - sometimes while defining properties of certain module (say, HWI interrupt or SWI interrupt) I run into possibility of passing an argument for a function. In help window for this option says:

Arg. This argument is passed to the function as its only parameter. You can use either a literal integer or a symbol defined by the application. This property is available only when using the HWI dispatcher.

When I pass integer, it works, but I dont know where I suppose to define/declare a constant - simply putting a constant in code does not works (and shouldnt, since DSP/BIOS does not knows where to look for it).

The question is how do I declare on constant in DSP/BIOS?

 

Regards

Arye

  •  

    If you want to use a constant, then right click on your project, select Build Options, Compiler tab, Category Preprocessor, Pre-defined Symbol -d. Put your argument there:

    ARGSWI=2;

    But you can have global variables as well. In your source file you can have a global variable for example:

    int argtest = 1;

    Then in your .tcf file you can put arg0 as:

    _argtest

    So arg0 parameter will be the address of the global variable argtest.