7 years, 7 months ago.

mbed: IAR compiler output size much bigger than the on line compiler, why?

Hi, we are newbie on mbed. we want to find out the basic memory requirement for the mbed OS, so we can decide whether we can use it in our following projects. so we choose a mini board: NUCLEO-F031K6 on the online https://os.mbed.com/compiler, we tried the NUCLEO-F031K6

we tried the basic Template: Display a message on PC using UART and built the project. the on line compiler gives a output as: flash: 15.6kB, RAM 1.8kB the output seems acceptable., it leaves rooms for adding other functions on the chip.

so we export the project to IAR , and use offline IAR to built the project. it can built the project successfully without error. anyway , the output is some bigger than the on line compiler output. the IAR gives : 25 900 bytes of readonly code memory 1 146 bytes of readonly data memory 3 667 bytes of readwrite data memory

when looking the output, the memory size is almost 2x the on-line compiler output, for both flash & ram requirement. why? as per our experience, IAR compiler normally can have very efficient output. is there any extra setting need to be done when compile a mbed project in IAR?

any suggestion?

B/R, vitalwell

Be the first to answer this question.