big difference in memory footprint for PSoC3 / 5

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

cross mob
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I see a very big difference in memory footprint for PSoC3 and PSoC5
( I changed only Project-> Device selector-> select chip )
What is the reason for this difference and whether it is possible to reduce.

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

PSoC3 is a 8051 core, PSoC5 is a ARM-Cortex M3. Different startup code, different instruction set, different libaries (due to different compilers), different code optimizations.

   

If you really need to get it smaller (right now there is plenty of room left), turn on better optimizations.

View solution in original post

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

PSoC3 is a 8051 core, PSoC5 is a ARM-Cortex M3. Different startup code, different instruction set, different libaries (due to different compilers), different code optimizations.

   

If you really need to get it smaller (right now there is plenty of room left), turn on better optimizations.

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

The 8051 is a very old design and its internal structure is not optimized to run stack-oriented languages as C. Optimization is difficult with only a few registers which have dedicated functionality and nearly no (256 bytes) stack.

   

On the other hand is a RISC with a mostly symmetrical set of registers, an nearly unlimited stack depth. The optimization usually frees 50% flash compared to no optimization.

   

The only advice I can give you is: Use a PSoC5

   

 

   

Bob

EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Thank you. It seemed to me that in other projects it was not so noticeable.
I'll keep that in mind.

0 Likes