-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
- Type: Enhancement
- Priority: Minor
Enhancement
When statically compiling mbed libraries with mbed-cli using the --library flag it appears that the memap tool doesn't know how to output the various sections. I'm not sure if this is a limitation of memap or just due to the nature of statically linked libraries.
My build process statically builds a bunch of libraries together, including mbed-os and some in-house libraries. When memap displays post-build analysis, these statically linked libraries appear as "../.." which isn't very helpful in discovering where all your flash consumption is coming from.
Example:
+-------------------------+-------+-------+------+
| Module | .text | .data | .bss |
+-------------------------+-------+-------+------+
| ../.. | 24943 | 72 | 1304 |
| BUILD/image_info.o | 512 | 0 | 0 |
| BUILD/irqn_workaround.o | 78 | 0 | 0 |
| BUILD/main.o | 1548 | 24 | 206 |
| [fill] | 335 | 4 | 26 |
| [lib]/c.a | 2800 | 2108 | 56 |
| [lib]/gcc.a | 808 | 0 | 0 |
| [lib]/misc | 252 | 12 | 28 |
| Subtotals | 31276 | 2220 | 1620 |
+-------------------------+-------+-------+------+
Total Static RAM memory (data + bss): 3840 bytes
Total Flash memory (text + data): 33496 bytes
Reason to enhance or problem with existing solution
Upgrade memap to show components of included libraries so size optimizations can be carried out more easily. This would allow one to see what statically linked library components are taking up unnecessary flash space.