The official git repository for OSD-Contiki, the open source OS for the Internet of Things
Go to file
Benoît Thébaudeau 0de729572b cc2538: Word-align .data LMA
In order to be fast, the reset_handler() function uses word accesses to
initialize the .data output section. However, most toolchains do not
automatically force the alignment of an output section LMA to use the
maximum alignment of all its input sections. Because of that, assuming
that .data contains some words, the LMA of the .data output section was
not word-aligned in some cases, resulting in an initialization performed
using slow unaligned word accesses.

This commit forces the alignment of the LMA of the .data output section
with a word boundary in order to always use fast aligned word accesses
to read the .data load area.

Note that this solution is better than using ALIGN_WITH_INPUT, both
because the latter is a new feature incompatible with older toolchains,
and because it could create a big gap between _etext and the LMA of
.data if strongly-aligned data were added to .data, although only a word
alignment is required here.

The same considerations apply to the VMA of .data. However, it is
already automatically word-aligned, both because .data contains words,
and because the end VMA of the previous output section (.socdata) is
word-aligned. Moreover, if the VMA of .data were forcibly word-aligned,
then a filled gap could appear at the beginning of this section if
strongly-aligned data were added to it, thus wasting flash memory.
Consequently, it's better not to change anything for the VMA of .data,
all the more it's very unlikely that it does not contain any word and
that the end VMA of .socdata becomes non-word-aligned, and this would
only result in a slower initialization.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-05-23 18:12:54 +02:00
apps Merge pull request #883 from cmorty/pull/global-macros 2015-05-18 21:33:00 +02:00
core Remove redundant assignment 2015-05-20 15:37:32 +05:30
cpu cc2538: Word-align .data LMA 2015-05-23 18:12:54 +02:00
dev Disable PACKETBUF_ATTR_PACKET_TYPE in the non-Rime case by default 2015-05-06 16:36:15 +02:00
doc Do not try to build cc26xxware documentation 2015-05-17 15:01:02 +01:00
examples Merge pull request #1074 from g-oikonomou/cc26xx/contrib/new-cc26xxware 2015-05-21 10:01:00 +02:00
platform Z1: tmp102: simple: fixed wrong cast 2015-05-22 18:15:26 +02:00
regression-tests Add regression-test for tools 2015-05-17 12:26:08 +02:00
tools Merge pull request #1040 from atiselsts/cooja_multichannel 2015-05-19 08:59:06 +02:00
.gitignore Add CC26xx build artifacts to .gitignore 2015-02-25 13:16:07 +01:00
.gitmodules Pull CC26xxware as a submodule 2015-05-17 15:01:01 +01:00
.travis.yml Merge pull request #1074 from g-oikonomou/cc26xx/contrib/new-cc26xxware 2015-05-21 10:01:00 +02:00
CONTRIBUTING.md Adding a CONTRIBUTING file to use github feature 2014-07-04 09:29:12 +02:00
LICENSE Removed the explicit year 2012 to make it more generic 2012-10-25 23:08:54 +02:00
Makefile.include Cleanup UIP_CONF_IPV6_RPL configuration 2014-12-02 12:38:55 +01:00
README-BUILDING.md Rename to md 2013-03-26 23:15:37 +01:00
README-EXAMPLES.md Several minor consistency improvements. 2013-07-31 00:55:31 +02:00
README.md Rename to md 2013-03-26 23:15:37 +01:00

The Contiki Operating System

Build Status

Contiki is an open source operating system that runs on tiny low-power microcontrollers and makes it possible to develop applications that make efficient use of the hardware while providing standardized low-power wireless communication for a range of hardware platforms.

Contiki is used in numerous commercial and non-commercial systems, such as city sound monitoring, street lights, networked electrical power meters, industrial monitoring, radiation monitoring, construction site monitoring, alarm systems, remote house monitoring, and so on.

For more information, see the Contiki website:

http://contiki-os.org