Commit graph

2586 commits

Author SHA1 Message Date
Michael LeMay 58874ea25d x86, galileo: Refactor I2C and GPIO initialization
This patch revises the I2C and GPIO initialization code to always be
run during platform boot rather than within each process that requires
it.

This patch also revises the gpio-output example to use a pin that is
set as an output by the default pinmux configuration.  Previously, it
used a pin that was set as an output by the pinmux configuration that
is in effect when the OS does not change the pinmux configuration.
2016-02-16 21:19:44 -08:00
Michael LeMay c815fa4511 x86: Use shared ISR for I2C and GPIO
This patch permits interrupts to be generated by both the I2C and GPIO
controllers for simultaneously-executing applications. The controllers
share a single interrupt pin, INTC. Prior to this patch,
quarkX1000_gpio_init() routed INTA to PIRQC and IRQ 10 (due to an
incorrect assumption that INTA is connected to the GPIO controller),
and quarkX1000_i2c_init() routed INTC to PIRQC and IRQ 9. The I2C
controller initialization is a prerequisite for GPIO initialization,
so the final configuration was that INTA and INTC were both routed to
PIRQC and IRQ 10. Thus, only the GPIO ISR was being invoked, even if
the I2C controller was actually responsible for the interrupt.

This patch refactors the I2C and GPIO ISR setup and handler code so
that the shared portions are combined in
cpu/x86/drivers/legacy_pc/shared-isr.[ch].  The I2C and GPIO drivers
communicate their interrupt information to the shared component by
placing structures in a specific section of the binary.
2016-02-16 21:19:44 -08:00
Michael LeMay 66629ae58f galileo: build_newlib.sh: Exit on configuration error
This patch adds a check for the result of the newlib configure command
and immediately exits the build_newlib.sh script if configure fails.
2016-02-16 11:36:57 -08:00
Toni Lozano 2cbde75b02 Removed PM10 code lines from adc-sensors driver 2016-02-15 14:45:26 +01:00
Antonio Lignan 0dbed519a5 Merge pull request #1507 from Zolertia/remote-voc-test
Added VOC (iAQ-Core) drivers and test application
2016-02-15 12:21:32 +01:00
Aitor Mejias cb1e7c2c45 Added VOC (iAQ-Core) drivers and test application 2016-02-15 11:00:48 +01:00
Antonio Lignan 25ff850a43 Weather meter: replaced rtimer by ctimer as it was breaking contikimac 2016-02-13 22:33:05 +01:00
Michael LeMay 16145f645a galileo: build_newlib.sh: Only apply patch files with the extension ".patch"
This avoids treating as patches other files that may happen to be
present in the newlib patch directory in a working tree.
2016-02-12 13:45:25 -08:00
Simon Duquennoy ebdc536d61 Merge pull request #1496 from simonduq/pr/jn516x-serial-input
jn516x enable serial input whenever there is no fallback interface
2016-02-04 10:02:15 +01:00
Simon Duquennoy f87f7e7edd jn516x enable serial input whenever there is no fallback interface 2016-02-03 17:53:29 +01:00
Simon Duquennoy 658cf0d2cc Reworking jn516x default configuration and examples 2016-02-03 10:35:48 +01:00
Nicolas Tsiftes eef96f3ba7 Merge pull request #1480 from mdlemay/revise-clang-flags
galileo: Revise include flags for LLVM Clang
2016-02-01 14:25:53 +01:00
Simon Duquennoy 7c3108bf3b jn516x: flush only uart Tx FIFO in main loop, leaving Rx FIFO intact 2016-02-01 13:36:18 +01:00
Antonio Lignan 35345cdb40 Fixed casts and calculations for the wind direction circular averaging 2016-01-31 22:51:08 +01:00
George Oikonomou deb633216c Document support for the CC2650 LaunchPad 2016-01-28 11:23:20 +00:00
George Oikonomou 387bb96ca4 Add support for the CC2650 LaunchPad 2016-01-28 11:23:20 +00:00
George Oikonomou 5eb0470ad4 Move the SPI and Ext Flash Driver to a common directory
This commit creates a `common` directory, aimed to host drivers supported by multiple boards of the CC13xx/CC26xx family.

We move the Sensortag SPI and External Flash drivers to this location and we change the Sensortag build system to pull the  respective files from therein.
2016-01-28 11:23:20 +00:00
George Oikonomou 24871b0702 Extend the Sensortag external flash Driver to support more parts
The driver currently supports two Winbond external flash parts with identical instruction sets. The instruction set of the Macronix MX25R8035F appears to be a superset. We therefore change the driver to add the MID/DID of the Macronix to the list of supported parts.

This will subsequently allow us to share the same driver for both the SensorTag and the CC2650 LauchPad.
2016-01-28 11:23:19 +00:00
George Oikonomou 7d6966b22c Merge pull request #1483 from Zolertia/pm10-sensor
Added PM10, VAC and AAC sensor drivers
2016-01-27 11:47:07 +00:00
Toni Lozano 1f6dafecb0 Modified ADC measurement of PM10 driver to include adc-zoul direct access 2016-01-26 17:55:48 +01:00
Antonio Lignan 8337843d69 Minor fixes 2016-01-26 09:45:43 +01:00
Michael LeMay 6557194fc5 galileo: Revise include flags for LLVM Clang
This patch revises the compiler flags when LLVM Clang is in use to
cause Clang to automatically use its built-in header files rather than
those for GCC.
2016-01-25 14:01:16 -08:00
Antonio Lignan 9f1376d37a Merge pull request #1453 from g-oikonomou/contrib/test-with-arm-gcc-5
Change travis arm tests to use gcc-arm-embedded v5
2016-01-25 21:32:28 +01:00
Toni Lozano 31e6cc48ca Solved doxygen comments information from VAC, AAC and PM10 sensor files 2016-01-25 18:13:00 +01:00
Toni Lozano 42e1beb931 Added PM10 GP2Y1010AU0F sensor driver and demo test 2016-01-25 10:06:17 +01:00
Toni Lozano 4907842821 Added parameters of aac-sensor on adc-sensors file and adapted AAC and VAC test files for correct results 2016-01-25 10:05:43 +01:00
Toni Lozano 1fca3e810a Added PM10 and VAC parameters to adc_sensors driver 2016-01-25 10:04:25 +01:00
Antonio Lignan d4251d7c3b Merge pull request #1470 from alignan/pull/grove-rgb-backlight-lcd
Ported Grove LCD with RGB backlight for the Zoul platforms
2016-01-25 09:54:25 +01:00
George Oikonomou 9e9e6d07b0 Adjust READMEs to point explicitly to the arm-gcc version used by travis 2016-01-24 13:59:19 +00:00
Antonio Lignan 9a5682b75b Merge pull request #1476 from alignan/pull/update-weather-meter
Updated to new adc-zoul renaming
2016-01-23 16:20:22 +01:00
Antonio Lignan 246b01095f Ported Grove LCD with RGB backlight for the Zoul platforms 2016-01-23 15:52:29 +01:00
Antonio Lignan 66ebca3ade Updated to new adc-zoul renaming 2016-01-23 15:42:13 +01:00
Antonio Lignan 9a80c0098f Added zero-calibration function and added offset values to the structure 2016-01-22 16:58:46 +01:00
Antonio Lignan 426fa24e50 Clear interrupt and trigger callback if new data is generated 2016-01-22 16:58:46 +01:00
Antonio Lignan f5b52e8094 Ported Grove's 3-axis gyroscope sensor (based on ITG-3200) 2016-01-22 16:58:46 +01:00
Antonio Lignan 6351462e89 Unified BMP180 and BMP085 drivers 2016-01-22 16:11:49 +01:00
Antonio Lignan ec45369d1b Merge pull request #1466 from alignan/pull/weather-meter
Add driver for the Sparkfun Weather meter station
2016-01-22 15:18:14 +01:00
Adam Dunkels 7128a6a178 Merge pull request #1258 from joakimeriksson/multiple-reassembly-fix
6LoWPAN - multiple reassembly fix and cleanup
2016-01-22 07:15:18 +01:00
Antonio Lignan 98ed8a29a0 Removed harsh restriction on mask values and disabled debug flags 2016-01-19 22:28:09 +01:00
Antonio Lignan a6c30b4e09 Fixed missing static keyword in both zoul-demo and weather meter driver 2016-01-19 22:24:53 +01:00
Antonio Lignan 366f11d5df Uncrustified weather meter driver and example 2016-01-19 18:03:16 +01:00
Antonio Lignan 81bec49a40 Changed fixed 2 minute integration period to allow overriding 2016-01-19 18:00:18 +01:00
Antonio Lignan 0902e0fc6d Added degree converted value for the wind vane sensor.
Also added a 2-minutes average wind direction value, replaced the 240 bytes buffer from the reference example, but probably there's room for efficiency improvement
2016-01-19 17:47:46 +01:00
Antonio Lignan 61f1516369 Reworked instant wind speed calculation and extended the available wind speed return values 2016-01-19 17:47:46 +01:00
Antonio Lignan 0cb80b0605 Prevent calculations if tick is zero 2016-01-19 17:47:46 +01:00
Antonio Lignan aacbcd904f Added interrupt configuration for the weather meter 2016-01-19 17:47:46 +01:00
Antonio Lignan 103911f619 Added driver for the Sparkfun's weather meter station 2016-01-19 17:47:46 +01:00
Joakim Eriksson d4dc45e096 updated sicslowpan documentation and platform configurations 2016-01-19 15:27:14 +01:00
Antonio Lignan 2295ecdbd9 Renamed adc-sensors/adc-wrapper to adc-zoul/adc-sensors, to have a better wording reflecting the intented use 2016-01-17 23:04:34 +01:00
Antonio Lignan 503abb4415 ADC wrapper for the Zoul-based platforms, allows to add analogue sensors over the existing adc interface 2016-01-17 22:40:06 +01:00
Antonio Lignan ac07e848b7 Minor fixes to file descriptions and disable DEBUG switches 2016-01-17 21:52:34 +01:00
Antonio Lignan 2bb7ac9cc0 Merge pull request #1451 from g-oikonomou/bugfix/sensortag/select
Rename select() in various sensortag sensor drivers
2016-01-17 00:08:37 +01:00
Michael Klemm a40e28a7c8 Fixed using target AVR ATmega128RFA1
Set operating speed to 16MHz and added missing dependency to llsec.
This fix was tested with sparkfun ATmega128RFA1 Dev Board.
2016-01-16 12:45:21 +01:00
Antonio Lignan 99f0c9f19b Merge pull request #1457 from alignan/pull/motion-sensor
Add support for digital motion/presence sensors
2016-01-11 20:30:09 +01:00
Antonio Lignan 57f4134c9e Merge pull request #1454 from alignan/pull/sht25-sensor
Fixes and enhancements for the SHT25 sensor
2016-01-11 20:29:14 +01:00
Antonio Lignan 94657b7a72 Merge pull request #1449 from alignan/pull/bmp085-sensor
BMP085 barometric sensor for the RE-Mote platform
2016-01-11 20:28:35 +01:00
Antonio Lignan c644a32dc7 Added support for digital presence/motion sensors 2016-01-11 18:36:31 +01:00
Antonio Lignan fefb84596e Fixed filter value preventing from initializing the ADC 2016-01-11 17:21:23 +01:00
George Oikonomou c394302c44 Merge pull request #1446 from alignan/pull/tsl2563-sensor
Enhanced TSL2563 driver for the Zoul module (RE-Mote/Firefly)
2016-01-11 11:21:51 +00:00
Antonio Lignan 48eb2a4fe2 Uncrustify changes 2016-01-10 23:36:00 +01:00
Antonio Lignan d53a62187d Added extra features of the SHT25 sensor 2016-01-10 23:33:33 +01:00
Antonio Lignan 97a7e98ac5 Fixed SHT25 sensor 2016-01-10 23:33:33 +01:00
Antonio Lignan 564c3a9d28 Fixed pressure calculation as previous temperature compensation was missing 2016-01-10 21:37:03 +01:00
George Oikonomou 6933b35bb5 Rename select() in various sensortag sensor drivers
This is to prevent a compile error caused by function prototype conflict between a function called `select()` (present in a number of sensortag peripheral drivers) and the one in `sys/select.h`. The error manifests itself with gcc-arm-embedded version 5.2.1 20151202 (2015-q4).

To fix the error we simply rename our function.

Fixes #1434
2016-01-10 15:47:34 +00:00
George Oikonomou fa40d2b1fc Remove documentation references to the Sensinode platform
This is part of a set of commits that will obsolete the Sensinode platform
2016-01-10 15:09:31 +00:00
George Oikonomou 707353f71b Remove Sensinode platform, cpu, example and tools files
This is part of a set of commits that will obsolete the Sensinode platform
2016-01-10 15:01:58 +00:00
Antonio Lignan 7b953091e5 Added BMP085 barometric sensor for the Zoul platform 2016-01-10 04:17:26 +01:00
Antonio Lignan 7abee394cb Initialized interrupt thresholds and added missing check 2016-01-10 04:09:07 +01:00
Antonio Lignan a8a1ebf8b5 Added interruption feature to the TSL2563 driver 2016-01-08 15:14:37 +01:00
Benoît Thébaudeau 0eab95ec4c Merge pull request #1443 from bthebaudeau/cc2538-new-aes-modes
cc2538: Complete support of hardware AES modes of operation
2016-01-07 23:27:06 +01:00
Simon Duquennoy edf85dc1f2 Merge pull request #1445 from TeVeDe/master
Changed NXP maintainers for JN516x platform
2016-01-07 14:45:24 +01:00
Antonio Lignan 881e78cb60 Rewamped TSL2563 light sensor 2016-01-07 12:53:31 +01:00
Theo van Daele 94143f93ff Changed NXP maintainers for JN516x platform 2016-01-07 09:47:29 +01:00
Benoît Thébaudeau ccceb63e88 cc2538: Add crypto driver and example for AES-GCM
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-01-06 23:22:54 +01:00
Benoît Thébaudeau e77e9861fe cc2538: Add crypto driver and example for AES-CBC-MAC
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-01-06 23:22:53 +01:00
Benoît Thébaudeau 47c24cab11 cc2538: Add crypto driver and example for AES-CTR
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-01-06 23:22:53 +01:00
Benoît Thébaudeau cf5e9557f8 cc2538: Add crypto driver and example for AES-CBC
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-01-06 22:01:41 +01:00
Benoît Thébaudeau 69eacbddbe cc2538: Add AES-CCM* driver
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-01-04 00:28:27 +01:00
kkrentz 24cb05059a CC2538: Add AES-128 driver 2016-01-04 00:28:27 +01:00
Benoît Thébaudeau 3dbe4c9403 cc2538: Add crypto driver and example for AES-ECB
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-01-04 00:28:26 +01:00
Antonio Lignan ca919ab0b0 Merge pull request #1196 from otcshare/x86
New platform: Intel Galileo Board
2015-12-23 12:33:47 +01:00
Antonio Lignan d9546991df Merge pull request #1424 from alignan/pull/remote-power-mgmt
RE-Mote power management support
2015-12-23 12:27:16 +01:00
Michael LeMay b4523b9130 galileo: Fix broken link in README.md
This patch fixes a broken link in README.md to serial cable connection
instructions.
2015-12-21 08:06:14 -02:00
Michael LeMay 13be942d40 galileo: Fix code style violations 2015-12-21 08:06:14 -02:00
Michael LeMay e14761c26b galileo: Document prerequisites for building on Ubuntu Linux
This patch documents the prerequisites for building on Ubuntu Linux in
the Galileo platform README.
2015-12-21 08:06:14 -02:00
Michael LeMay 09d168da04 galileo: Add support for old versions of GNU Make
This patch revises a Makefile to avoid using a feature that is
incompatible with GNU Make v.3.81.
2015-12-21 08:06:14 -02:00
Michael LeMay c75e9466f6 galileo: Fix bug in newlib build script
This patch fixes a bug in the newlib build script that causes it to
not delete an old source directory as intended prior to rebuilding the
library.
2015-12-21 08:06:14 -02:00
Michael LeMay f85654a82f x86, galileo: Add UEFI support
This patch adds support for optionally building EFI binaries in
addition to Multiboot ELF binaries.  It includes a script,
build_uefi.sh, that downloads tool and library sources from the EDK II
project, builds the GenFw tool that is used to create UEFI binaries,
and creates a makefile that is included from the main x86 common
makefile and enables UEFI support in the Contiki build system.  If the
script is not run prior to building Contiki, then an informational
message will be displayed with instructions for running build_uefi.sh
if UEFI support is desired.  This patch also adds the path to the
auto-generated makefile to .gitignore.

This patch modifies the linker script for the Intel Quark X1000 to
account for the output file section offsets and alignment expectations
of the EDK II GenFw project.

This patch also adds a newlib patch to remove the weak symbol
attribute from floating point stdio support routines.  See
<newlib>/newlib/README for an explanation of how the newlib developers
intended for _printf_float and _scanf_float to be linked.  Newlib
declares them as weak symbols with the intention that developers would
force them to be linked only when needed using a linker command line
option.  However, some but not all Contiki programs require them, so
we cannot simply always include or exclude them.  Instead, we remove
the weak symbol attributes and rely on the linker to automatically
determine whether or not they should be linked.  This avoids an issue
in which weak symbols were undefined in the intermediate DLL generated
as part of the UEFI build process.  That resulted in the GenFw program
emitting "ERROR 3000" messages when it encountered relocations
referencing such an undefined symbol.

Finally, this patch updates README.md to both make some revisions to
account for the UART support introduced in previous patches as well as
to provide instructions for using the UEFI support.
2015-12-21 08:06:14 -02:00
Michael LeMay b915e7d5e3 galileo: Omit exception handling unwind tables
This patch modifies the newlib and Contiki C and C++ compiler flags to
omit exception handling unwind tables (see
http://wiki.dwarfstd.org/index.php?title=Exception_Handling).
Removing these tables saves space in debug builds and has not caused
any readily-apparent functional changes.

Here is the size listing for an example program built without this
patch:
   text	   data	    bss	    dec	    hex	filename
  76002	   1508	  21224	  98734	  181ae	all-timers.galileo

Here is the size listing for the same program with this patch:
   text	   data	    bss	    dec	    hex	filename
  72918	   1508	  21224	  95650	  175a2	all-timers.galileo

The primary motivation for this patch is to help enable UEFI support.
The .eh_frame and .eh_frame_hdr sections that are otherwise generated
are treated as code sections by the EDK2 GenFw program, since they are
read-only alloc sections.  They get grouped with the actual code
sections, ahead of the data sections.  This perturbs symbols and
complicates debugging.
2015-12-21 08:06:14 -02:00
Michael LeMay 38206e3980 galileo: Add Ethernet support
This patch adds support for Ethernet to the Intel Galileo port.  It
uses the Intel Quark X1000 Ethernet driver.  It initializes the first
Ethernet interface and starts some common network services.  By
default, it uses the following addresses:
 - Host: 192.0.2.2
 - Netmask: 255.255.255.0
 - Default gateway: 192.0.2.1
 - DNS server: (same as default gateway)
These settings can be changed by editing eth-conf.c.
2015-12-21 08:06:14 -02:00
Ricardo de Almeida Gonzaga 93c7988069 x86: Add Galileo pinmux support
This patch adds the galileo-pinmux.c and galileo-pinmux.h files,
which support access to pinmux configuration through a function
interface.

This is not 100% supported yet due to some pinmux paths
need Quark X1000 GPIO (legacy and non-legacy) configurations.

After we finish to implement Quark X1000 GPIO driver we'll add
support for this.
2015-12-21 08:06:14 -02:00
Ricardo de Almeida Gonzaga 781375f1d1 x86: Add PCA9685 support
This patch adds pwm-pca9685.c and pwm-pca9685.h files,
which support access to I2C-based PCA9685 PWM controller
configuration register through a function interface.

The PCA9685 is an I2C-bus controlled 16-channel LED controller
optimized for Red/Green/Blue/Amber (RGBA) color backlighting
applications. Each LED output has its own 12-bit resolution
(4096 steps) fixed frequency individual PWM controller that
operates at a programmable frequency from a typical of 24 Hz to
1526 Hz with a duty cycle that is adjustable from 0 % to 100 %
to allow the LED to be set to a specific brightness value.
More about PCA9685 can be found in its datasheet[1].

This driver is needed in order to configure Galileo pinmux.

[1] - http://www.nxp.com/documents/data_sheet/PCA9685.pdf
2015-12-21 08:06:14 -02:00
Ricardo de Almeida Gonzaga 495dcd659a x86: Add PCAL9535A support
This patch adds gpio-pcal9535a.c and gpio-pcal9535a.h files,
which support access to I2C-based PCAL9535A GPIO controller
configuration register through a function interface.

The PCAL9535A is a low-voltage 16-bit GPIO expander with interrupt
and reset for I2C-bus/SMBus applications. It contains the PCA9535
register set of four pairs of 8-bit Configuration, Input, Output,
and Polarity Inversion registers, and additionally, the PCAL9535A has
Agile I/O, which are additional features specifically designed to
enhance the I/O. More about PCAL9535A can be found in its datasheet[1].

This driver is needed in order to configure Galileo pinmux.

[1] - http://www.nxp.com/documents/data_sheet/PCAL9535A.pdf
2015-12-21 08:06:14 -02:00
Andre Guedes 6b433aede1 x86: Improve release binary size
This patch adds -ffunction-sections and -fdata-sections to the
'release' CFLAGS so each function and data is place into its
own section in the output file. It also adds --gc-section to
the 'release' LDFLAGS so the linker removes the sections which
are not referenced.

This patch also adds -ffunction-sections and -fdata-sections
options to CFLAGS from build_newlib.sh. This increases newlib
static libraries size, however, the Contiki image shrinks even
more since --gc-section removes "dead code" from newlib.

As a practical effect, all unused function and data (as well as
sections such as .eh_frame) are striped out from the final elf
binary. This shrinks our release binary drastically.

Finally, to prevent --gc-section from removing .multiboot section,
this patch adds KEEP(*(.multiboot)) to quarkX1000.ld.
2015-12-21 08:06:14 -02:00
Michael LeMay 0dcd5e9b5a x86: Revise CFLAGS and LDFLAGS for LLVM Clang compatibility
This patch slightly revises CFLAGS and LDFLAGS to specify the
optimization and debugging options and linker script in a way that is
compatible with using Clang as the C compiler and to invoke the linker
(i.e. CC = clang and LD = clang).
2015-12-21 08:06:14 -02:00
Michael LeMay 17b855aac9 galileo: Replace non-halting core implementation of assert with the halting one from newlib
This patch modifies the include order to include headers from newlib
ahead of those from the core of Contiki.  The only header file names
that are common between Contiki and newlib are assert.h and config.h,
but the config.h files in Contiki are only located in ports for other
CPUs so they are irrelevant to this patch.  The motivation for this
patch is to cause files that include assert.h to include the one from
newlib that halts when an assertion fails.  The assert implementation
in the core of Contiki does not halt when an assertion fails.

This patch also adds newlib syscall stubs that are required by the
newlib assert implementation and the _exit syscall function that halts
the system.

Finally, this patch updates some other newlib syscall stubs to
properly indicate their status as unsupported syscalls.
2015-12-21 08:06:14 -02:00
Michael LeMay 06e25c487a galileo: Correct README.md to explain how to verify boot with UART
This patch revises README.md to mention the UART support introduced by
earlier patches in the section about verifying that Contiki is
running.  It also revises the serial console setup instructions to
focus on the more thoroughly tested option.
2015-12-21 08:06:14 -02:00
Andre Guedes e41bed319f galileo: Revise stdlib static linking
This patch does some refactoring so we are able to statically link
against standard libraries in a more usual way.
2015-12-21 08:06:14 -02:00
Andre Guedes 7043aa41b3 galileo: Fix newlib-syscalls issue in Makefile
This patch removes 'newlib-syscalls.c' from CONTIKI_SOURCEFILES variable
and appends it to PROJECT_SOURCEFILES. This way the buildsystem will
automatically consider the newlib-syscalls object code during linking
time.
2015-12-21 08:06:14 -02:00
Andre Guedes c9020d95e7 x86: Build release image
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
2015-12-21 08:06:14 -02:00