SWRU271I October 2010 – January 2020 CC2540 , CC2540T , CC2541 , CC2541-Q1 , CC2640R2F
After building a project, IAR generates a linker map file that you can find in the Output group in the file list.
The map file contains low-level information about the build. Lines of text similar to the following are at the end of the map file:
118 544 bytes of CODE memory
35 bytes of DATA memory (+ 73 absolute )
6 242 bytes of XDATA memory
194 bytes of IDATA memory
8 bits of BIT memory
4 149 bytes of CONST memory
Errors: none
Warnings: none
This text shows the total code space (CODE memory) and RAM (XDATA memory) the project uses. Ensure the sum of the CODE memory plus CONST memory does not exceed the maximum flash size of the device (either 128KB or 256KB, depending on the version of the CC2540/41). Ensure the size of the XDATA memory does not exceed 7936 bytes, as the CC2540/41 contains 8KB of SRAM (256 bytes are reserved).
For more specific information, the map file contains a section called MODULE SUMMARY. This section is approximately 200 to 300 lines before the end of the file (the exact location varies from build-to-build). Within this section, you can see the exact amount of flash and memory for every module in the project.