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.

TM4C123GH6PM / TM4C123GH6PGE microcontroller maximum C system stack size

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: TM4C123GH6PGE

Hello everyone,

                          Thanks to suggested my previous posts. Today I have another doubt for implementing my task by using TM4C123GH6PM / TM4C123GH6PGE Microcontroller using code composer studio. From the above screen shot I want to increase the  C system stack size,  means i want to increase the more than 512. I request you to please suggest me , upto How much size i can increase  for my TM4C123GH6PM / TM4C123GH6PM microcontroller. I am using CCS V 8.

Thanks in advance.

Thanks,

Regards,

Srinu.

  • I request you to kindly please suggest me how much system stack I can set in CCS v8 for TM4C123GH6PM Microcontroller.
  • The system stack uses the internal static RAM of the device. The TM4C123GH6PM has 32KB of internal static RAM. You cannot use all of that for stack space because your application will also need some space for static variables and possibly heap space. Look at the .map file created by your project to see how much of the RAM was used for static variables or heap. The rest can be used for the stack.

    Besides changing the code composer option you pictured above, you need to edit the link command file used to actually increase the stack size.  Here is a line from the link command file of the "Hello" example using a stack size of 512 bytes:

    __STACK_TOP = __stack + 512;
    

  • Thank you sir for giving your valuable suggestion.

    I found that command in my project file. Here I have the doubt, in place of 512, How much stack size I can place.
    In place of the 512. I want to use 1024 or 2048. Is it possible for tm4c123gh6pm / tm4c123gh6pge?

    I request you to kindly please suggest me sir.


    Thanks,
    Regards,
    Srinu.
  • In general yes, you can set the stack size to 1024 or 2048. However, as I tried to explain in the earlier post, it depends on how much of the internal RAM you use for static variables and heap. I suggest you look at the .map file generated to see how much RAM you are currently using. Unless your project is quite large, or using very large arrays of data, you are likely to have no problem setting your stack size to 2048 bytes.

  • Thank you sir,

    I set my stack size 1024, My problem is resolved and My program execution is going successful.


    Thanks,
    Regards,
    Srinu.