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.

CCS/EK-TM4C1294XL: What is the meaning of this "_DECL _CODE_ACCESS"

Part Number: EK-TM4C1294XL

Tool/software: Code Composer Studio

I found this many times in my code please help me to understand this.

  • Hi,

      Where do you find _DECL_CODE_ACCESS. I've never seen it before. Is this from a file or is it from a generated output? Can you show a screenshot of it where you see it?

  • Hi

    Thank you sir for the  reply. I was trying UART example on TM4C1294XL while reading the code I found this in the "file.h" file I'm attaching screenshot below.

  • Hi,

      I don't exactly know what they are. These are probably some MACRO or defined type for file management by the TI compiler tool chain. If you must know what they are and how they work then I will need to transfer your post to the compiler forum team as this is not related to how the MCU operates. Let me know if I should transfer your post to the compiler team for further  assistance. 

  • Hi,

    I would like to know what exactly they are doing so, please do share in the compiler forum.

    Regards,

    Omkar

  • I will forward your post to the compiler team.

  • Omkar Dixit said:
    while reading the code I found this in the "file.h" file

    They are preprocessor symbol names.  Since they begin with an underscore, they are reserved for use by the compiler RTS code.  That being the case, they are not documented, and they are subject to change at any time, with no notice.

    All that said, your curiosity is normal.  And there is a way to see what any preprocessor symbol means.

    Please search the TI ARM compiler manual for the compiler option --gen_preprocessor_listing.  Build with that option to create a preprocessor listing file.  It has the same name as the source file, with the file extension changed to .rl.  Inspect this file to see lines like these ...

    N_DECL _CODE_ACCESS int   open(const char *path, unsigned flags, int mode);
    Xextern  int   open(const char *path, unsigned flags, int mode);

    Every line in this listing file starts with a capital letter which identifies that line.  N means it is a normal line of source.  X shows a line after all the preprocessing has occurred.  In this case, it turns out that _DECL _CODE_ACCESS is replaced with extern.  If you search earlier through the file, you will see that _DECL is replaced with extern, and _CODE_ACCESS is replaced with nothing.

    Thanks and regards,

    -George

  • Hi

    Okay sir, I will definitely go through the TI ARM compiler manual . Yes I found that  _DECL is replaced with extern and _CODE_ACCESS is replaced nothing. Thank you so much for your time.

    Thanks

    Omkar Dixit