Hi,
Since I was unable to find a comparison of different ARM tool-chains I did my own test and decided to share the results here.
I am playing with PSoC 4 Pioneer kit and I love it - it's like having half of breadboard inside the chip. But 4100/4200 family is limited to 32k flash 4k RAM chips, and my little project was already at 1/3 of that.
PSoC Creator is using and older version of Sourcery compiler so i downloaded generic GCC 4.7 and MDK 4.72 lite version (limited to 32k, which is fine).
Here are the results of my small CapSense+PWM+UART+Frequency divider project:
Sourcery 4.4.1 (default) optimize=noneFlash used: 10256 of 32768 bytes (31,3%).
SRAM used: 308 of 4096 bytes (7,5%).Sourcery 4.4.1 optimize=sizeFlash used: 7352 of 32768 bytes (22,4%).
SRAM used: 300 of 4096 bytes (7,3%).Sourcery 4.4.1 optimize=speedFlash used: 7656 of 32768 bytes (23,4%).
SRAM used: 300 of 4096 bytes (7,3%).GNU GCC 4.7 generic --specs=nano.specs optimize=noneFlash used: 10622 of 32768 bytes (32,4%).
SRAM used: 428 of 4096 bytes (10,4%).GNU GCC 4.7 generic --specs=nano.specs optimize=sizeFlash used: 7646 of 32768 bytes (23,3%).
SRAM used: 420 of 4096 bytes (10,3%).GNU GCC 4.7 generic --specs=nano.specs optimize=speedFlash used: 8014 of 32768 bytes (24,5%).
SRAM used: 428 of 4096 bytes (10,4%).Keil MDK 4.72 optimize=noneFlash used: 6264 of 32768 bytes (19,1%).
SRAM used: 1564 of 4096 bytes (38,2%).
Keil MDK 4.72 optimize=sizeFlash used: 5424 of 32768 bytes (16,6%).
SRAM used: 1552 of 4096 bytes (37,9%).
Keil MDK 4.72 optimize=speedFlash used: 5436 of 32768 bytes (16,6%).
SRAM used: 1552 of 4096 bytes (37,9%).
Keil MDK 4.72 --library_type=microlib optimize=noneFlash used: 5508 of 32768 bytes (16,8%).
SRAM used: 1564 of 4096 bytes (38,2%).
Keil MDK 4.72 --library_type=microlib optimize=sizeFlash used:
4668 of 32768 bytes (14,2%).
SRAM used: 1552 of 4096 bytes (37,9%).
Keil MDK 4.72 --library_type=microlib optimize=speedFlash used: 4680 of 32768 bytes (14,3%).
SRAM used: 1552 of 4096 bytes (37,9%).
note that generic gcc was used with --specs=nano.specs linker option to use small MCU optimized libraries
speed was not tested since it's not an issue for all my current projects
so the conclusion would be - get MDK and switch to it when you want to trade flash for RAM
edit:
I haven't found the reason of high memory usage for KEIL MDK yet.
While digging MDK notes, I read that MDK likes 32 bit variables and was able to reduce flash footprint a little by changing all 16bit vars to 32bit. However the same changes increased flash usage substantially when compiled by GCC.
note:
this is not a practical problem solving thread, I'm doing this just for curiosity and i hope the results might be useful/interesting for somebody like me.
edit [2013-10-01]:
It looks like there was a bug in PSoC creator 2.x versions and RAM used was not reported correctly. This means that results above are NOT correct.They fixed this bug in v3.0 and i ran a couple of quick tests on default PSoC4 CapSense project:
GNU GCC 4.7.3 (default in v3.0) --specs=nano.specs optimize=size
Flash used: 3318 of 32768 bytes (10,1%).
SRAM used: 1628 of 4096 bytes (39,7%).
Keil MDK 4.72 --library_type=microlib optimize=size
Flash used: 3140 of 32768 bytes (9,6%).
SRAM used: 1572 of 4096 bytes (38,4%).