C++ build questions

M2M Studio 1.0.2

We tried to build our C/C++ application but had the following:

  1. Simple inclusion of header increases size of binary image by ~220KB without ANY reference to iostream functions, just after #include. Some C++ STL templates were already used in the code, but there was no such code size increase with them. What can be wrong?

Also it seems that adding some file of C source without reference to those functions also puts the code into binary image and does not drop unreferenced parts as most of build systems do by default.

  1. We found that sizes of ARM targets built with Debug or Release configurations almost the same. It is strange because Debug version should include debug info and have no code optimization. But results are almost the same.

  2. So, the following question arises: we need to balance between Code and A&D flash areas to provide sufficient space to DOTA an application. Because the DWL image is usually compressed, do we need in A&D only space for compressed image to be able to install it into Code area? That is, if we have 768KB of Code area and 512KB of A&D, can we install 700KB application if in compressed DWL it fits 500KB A&D area?

Thanks in advance!

I’ve noticed the same behaviour… no explanation…

Also noticed the same. The only noteworthy difference between the two configs is that TRACE/DUMP macros are not embedded in the Release one (to save some KB on the final binary…)

I believe it’s not the right place for such questions :wink:
However, the answer is yes, you can use compressed .dwl files when performing DOTA.

I don’t think that disabling TRACE/DUMP should (necessarily) be expected to make any significant difference in code size?

I’d have thought that the major work is all done by sprintf et al - so that would only be omitted if none of its functionality were required anywhere else in the whole application…