Creator 3.0 SRAM usage

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        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?   
0 Likes
5 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

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?

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
markgsaunders
Employee
Employee
50 sign-ins 10 solutions authored 5 solutions authored

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.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes