c9020d95e7
This patch adds support for building release images. The main difference between release images and default images is that the former is optimized for size while the latter is "optimized" for debugging. To build a release image, the BUILD_RELEASE variable should be set to 1. For instance, the following command build a release image from the hello-world application: $ cd examples/hello-world && make TARGET=galileo BUILD_RELEASE=1 To optimize for size we use the '-Os' option from gcc. This option also enables the strict aliasing optimization. This generates lots of warning messages since we use the '-Wall' option and lots of code in core/net/ break the strict-aliasing rules. Some test have shown that the strict aliasing optimization it not taking effect in the final binary. For that reasons, this patch manually disables the optimization. Also, the release image is stripped. For the sake of comparison, below follows the output from 'wc' and 'size' for both debugging (default) and release images. Default image: $ wc -c hello-world.galileo 71112 hello-world.galileo $ size hello-world.galileo text data bss dec hex filename 20379 1188 12808 34375 8647 hello-world.galileo Release image: $ wc -c hello-world.galileo 26320 hello-world.galileo $ size hello-world.galileo text data bss dec hex filename 18146 1156 12808 32110 7d6e hello-world.galileo |
||
---|---|---|
.. | ||
apple2enh | ||
atarixl | ||
avr-atmega128rfa1 | ||
avr-raven | ||
avr-ravenlcd | ||
avr-ravenusb | ||
avr-rcb | ||
avr-zigbit | ||
c64 | ||
c128 | ||
cc2530dk | ||
cc2538dk | ||
cooja | ||
cooja-ip64 | ||
econotag | ||
ev-aducrf101mkxz | ||
eval-adf7xxxmb4z | ||
exp5438 | ||
galileo | ||
jn516x | ||
mbxxx | ||
micaz | ||
minimal-net | ||
native | ||
seedeye | ||
sensinode | ||
sky | ||
srf06-cc26xx | ||
stm32nucleo-spirit1 | ||
stm32test | ||
win32 | ||
wismote | ||
z1 | ||
zoul |