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.

  • TI Thinks Resolved

CCS/TMS320C28343: Global variable and pointer

Intellectual 830 points

Replies: 2

Views: 74

Part Number: TMS320C28343

Tool/software: Code Composer Studio

Hi TI,

How to avoid the use of global variables pointer when coding?

And how to realize structrual and modularized software design?

Can you send me some docs or demo for learning?

Best regard

Frank 

  • Frank Lee96
    How to avoid the use of global variables pointer when coding?

    I'm not sure what you mean.  The article Data blocking in the C2000 MCU compiler explained talks about how the compiler avoids loads of the DP register, which is used to access global variables.

    Frank Lee96
    And how to realize structrual and modularized software design?

    That's a very general programming topic.  Unfortunately, TI has no documents on it. 

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • Learn C++.

    There is nothing wrong with global variables in a relatively small scale system like an MCU.

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.