ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.68k stars 2.98k forks source link

mbed-dev generates bigger binary than mbed #3815

Closed janjongboom closed 7 years ago

janjongboom commented 7 years ago

Description

Question

Message from the Q&A section. Apparently compiling against mbed-dev generates a binary 4K bigger than compiling against mbed. Do we use less optimizations in the online compiler for user apps than we do for pre-compiling mbed?

@sg-

0xc0170 commented 7 years ago

I don't recall any special settings, both of them use the same profile (=same settings). However linker might do some different magic library vs object files (to resolve weak/strong symbols, etc). I cant spot there a reference for 4K size difference. How was this size measured?

cc @theotherjimmy

toyowata commented 7 years ago

Probably it related this: https://github.com/ARMmbed/mbed-os/issues/3813

In case of uARM target, the mbed library has pre-build object files by --library_type=microlib option, but mbed-dev source file are wrongly compiled by standard build (ARM). That's why you will get bigger bin image by mbed-dev compare with (pre-build) mbed library.

0xc0170 commented 7 years ago

@toyowata Thanks, that would explain it if a user uses target that defaults to use uARM.

theotherjimmy commented 7 years ago

@janjongboom Can we close this issue? I fixed the usage of uARM on the online compiler a while back.