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.

Compiler/TM4C123GH6PM: Memory in TM4C123GH6PM

Part Number: TM4C123GH6PM


Tool/software: TI C/C++ Compiler

Hi All

I'm a beginner. I am studying TivaC

I have a question about the linker. As I know, when I compiler the code, the linker will give every variable a address( in SRAM), and the code will be in FLASH. 

"

uint64_t ui32Period,count;

uint8_t TimeOn=0,TimeOff;

"

View->Memory and I see those varibles are in SRAM( start at 0x20000000), and base on those addresses, I can observe their values.

Now, when I code: 

volatile uint8_t test; 

"

I can also know exactly its address, but I can't see its address in memory.

I will attach the picture.

And finally, sorry for my "poor" English.

  • My friend - you have "nothing for which to apologize."      Your English is Quite good -  impressive and easily understandable!

    Now neither my firm nor I use vendor's tools - might your "compiler settings" enable your  "changed & altered memory view."      (aimed toward the flash area)
    It may prove useful to observe the "map" file - as well.

    Working with such "small & select" code bits proves an effective means to aid your understanding - I believe your method is quite good (and matches your English!)

  • CB1,
    Thank you for your help and encouragement of new users. We at TI really do appreciate your help! #LIKE
  • The reason you do not see the label "test" in the memory window is that this label is for an 8-bit variable that is stored at an odd boundary and you are displaying the memory as 16-bit values. The 8-bit variable address "Timeoff" is displayed because it falls on an even boundary. You can display the memory as 8-bit values using the pull down menu highlighted in the picture below:

  • Thank you, Bob.    Our IAR offers similar (selective) functionality - I have no experience w/the CCS offering.

    Thank you for so "complete" a guide for this poster...    And I would hope that (many) of my posts answer the needs of  "advanced users" (even vendor agents) upon occasion...

  • Thank you so much Bob.