5 Replies Latest reply on Oct 18, 2013 2:07 PM by user_1377889

    Creator 3.0 SRAM usage

    jordan.nicholls
              I was hesitant to upgrade to Creator 3.0, but after reading about it I decided to upgrade. I converted two projects that I was working on in 2.2. The conversions went smoothly except for the fact that the SRAM usage changed dramatically. My main project used about 8% of the SRAM with 2.2, but uses about 37% of the SRAM when I build with 3.0. I also tried a project that only has a main.c and a few pins and it says it is using 63% of the SRAM. Is anyone else having this problem?   
        • 1. Re: Creator 3.0 SRAM usage
          user_78878863

          The reason presumably is that Creator 3.0 does a better job at calculating sRAM usage.This means that the 7% figure before likely was not correct, but the 37% one probably is.

             

          Can you tell us more what simple project is using 63% of RAM? maybe post it here?

          • 2. Re: Creator 3.0 SRAM usage
            user_14586677

            From Creator 3.0 release notes -

               

             

               

            New RAM Usage Calculation

               


            Prior to the 3.0 release, the reporting of SRAM usage at the end of a build with the GNU Compiler
            Toolchain did not correctly report the stack and heap settings in the System DWR file. This has been
            corrected and PSoC Creator is now properly reporting the RAM usage (note that the actual RAM usage
            has not changed, just the reporting in the Output Window). You can modify the Stack and Heap Size
            values in the System DWR.

               

             

               

                  PSoC Creator release notes

               

             

               

            Regards, Dana.

            • 3. Re: Creator 3.0 SRAM usage
              yfs

              You can adjust the amount of space allocated to heap and stack in the CYDWR file System tab. The tool grabs big chunks to be "on the safe side". What do you guys think better default sizes would be? Enough RAM to make a few nested calls? Enough heap to handle printf reaosnably? We are open for your input because we will probably change this in the next release.

                 

              -- Mark.

              • 4. Re: Creator 3.0 SRAM usage
                user_14586677

                Its too bad you do not have a basic profiler that you could run

                   

                a number of projects thru, or a switch in DWR that would allow

                   

                trying various settings. Then you could get a "typical" idea of

                   

                what real world applications look like.

                   

                 

                   

                Regards, Dana.

                • 5. Re: Creator 3.0 SRAM usage
                  user_1377889

                  The only experiences I've had so far with foreign projects are those posted here when there have been problems.

                     

                  From the mathematical aspect this is not representative, because it excludes all the projects that do not have problems.
                  What I saw was few stack usage and near-zero heap requirement which totally differs from my personal way of programming ("My name is Bob and I am addicted to frequently use linked-lists and malloc()"  ). As Dana mentioned: an easy-to-use profiler that (at least) analyzes stack and heap usage of a project could help to optimize sram usage and would be a big help for us designers.

                     

                   

                     

                  Bob