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.

structure

I am new at using structures.  I created one and it seems to work in the file I defined it in.  Is there a way of declaring it as an extern in other files or do I have to put it in a header file?  I tried making a header file but I can't add it to CCS.  I tried modifying DSP280x_Device.h but that doesn't work either.

Thanks

  • Declarations of structures generally go in a header file which you #include in all C source files that use the structure.  Here is more discussion that.  As for adding a header file to your CCS project ... It is handled the same way as adding any other source file to a project.  Try asking a local expert to show you how they do it.  

    Thanks and regards,

    -George

  • Hi George,

     

    Thank you for the information on structures.

    One thing seems obvious... if I had a local expert to show me how to add the header files, I wouldn't be posting here.  I don't know why I can add source files but not header files.  The header files names have to be added to

    DSP28

    with an #include statement.  After that I get errors that I haven't had time to fix.  It's been faster to write all of the variables in each source file with extern statements as needed, but it's getting pretty messy...

    Regards,

    Carl