Commit Graph

242 Commits

Author SHA1 Message Date
Simon Duquennoy
070b493391 Automatically include module-macros.h when provided by modules 2017-12-22 05:21:39 -08:00
Simon Duquennoy
81d1b1bd80 PROJECTDIR now turned into modules via MODULES_REL 2017-12-22 05:21:39 -08:00
Simon Duquennoy
a0961ac2a1 Build system: automatically include Makefiles from PROJECTDIRS 2017-12-22 05:21:39 -08:00
Simon Duquennoy
2fd6fa1fd6 Automatically compile .c files from PROJECTDIRS 2017-12-22 05:21:39 -08:00
Simon Duquennoy
84ea0971bc Remove obsolete flag AUTOSTART_ENABLE, as well as .co and .ce files 2017-12-22 05:21:39 -08:00
George Oikonomou
e73edfaa60 Move target identification code to a separate file
For some cross-platform examples, we need to tweak things based on the target platform. For this reason, target identification needs to happen early, before inclusion of the top-level Makefile.include. Up to now, we have simply replicated the target-identification code to example Makefiles, leading to code-replication and on occasion bugs (incorrect platform identification).

This commits moves the correct working code to a separate file, so that example Makefiles can include this "as a library". The top-level Makefile merely includes this file now.
2017-10-28 22:36:08 +01:00
Niclas Finne
3cb66a5232 Changed version to Contiki-NG and mark the version as modified if
the working tree has local modifications.
2017-10-27 15:15:13 +02:00
Simon Duquennoy
9d1463fac5 Viewconf: distinguish set from unset flags 2017-10-26 17:37:46 +02:00
Simon Duquennoy
b838fc2ebb Fix auto-inclusion of module makefiles 2017-10-12 09:23:44 +02:00
Simon Duquennoy
41967732b1 Added MAKE_ROUTING make variable for cleaner routing protocol selection 2017-10-12 08:42:42 +02:00
Simon Duquennoy
91b8ee860e Makefile.include: added target 'boards' to show the list of boards available for the current target 2017-10-10 21:06:35 +02:00
Simon Duquennoy
3117296ffc Make viewconf: pretty printing 2017-10-10 21:05:48 +02:00
Simon Duquennoy
11de95efea Added make target 'viewconf' to ease debugging of configuration flags 2017-10-10 21:04:38 +02:00
Simon Duquennoy
1d45ab070e Makefile.include: add rules to generate preprocessed versions of C files, or assembly code, for any file 2017-10-10 21:04:33 +02:00
Simon Duquennoy
6745c5f1cc Makefile.include: fix 'usage' 2017-10-10 21:04:31 +02:00
Joakim Eriksson
5d87cd1b5f moved the MAKE_NET code in makefile include so that platform makefiles are before decisions 2017-10-08 00:46:57 +02:00
Simon Duquennoy
a92319bbca Rename PROJECT_CONF_H to PROJECT_CONF_PATH for clarity and so as to avoid possible conflicts with guards in project-conf.h files 2017-10-07 09:45:41 +02:00
Simon Duquennoy
20559fd308 Auto-include project-conf.h whenever found 2017-10-07 09:45:38 +02:00
Simon Duquennoy
543408db68 Re-organzie ip stack implementation 2017-09-22 17:09:54 +02:00
Simon Duquennoy
d9f9138ed2 Added NullNet, a network layer for non-IP-enabled cases 2017-09-22 14:34:20 +02:00
Simon Duquennoy
0aa44c3c22 Homogenize NET layer config with MAC 2017-09-22 14:34:20 +02:00
Simon Duquennoy
ffc94f832c MAC layer configuration done from Makefile instead of .h files 2017-09-22 14:34:20 +02:00
Simon Duquennoy
786cc13a95 Rename old RPL implementation as rpl-classic 2017-09-14 04:55:36 +02:00
Simon Duquennoy
5fcb2c9442 Only include cfs module in platforms that support cfs 2017-09-02 09:16:32 +02:00
Simon Duquennoy
3f4897e468 Add os/services as default module 2017-09-01 20:04:53 +02:00
Niclas Finne
bd0ee9891f Makefile.include: replaced CONTIKIDIRS with MODULES and removed APPS 2017-09-01 17:22:11 +02:00
Niclas Finne
69581dffe2 Makefile.include: added support for Makefile in MODULES 2017-09-01 16:17:07 +02:00
Niclas Finne
b79f36bfe2 Makefile.include: Added support for BOARD that will set
CONTIKI_BOARD_<board-name> similar to CONTIKI_TARGET_<target-name>
2017-09-01 16:16:29 +02:00
Nicolas Tsiftes
c528562908 Moved Antelope to a new storage directory. 2017-09-01 15:52:11 +02:00
Niclas Finne
2c86194ef8 Renamed core to os 2017-09-01 15:29:00 +02:00
Simon Duquennoy
a6643a9835 Added RPL-lite, a lightweight implementation of RPL. This is the new default. 2017-06-29 16:46:07 +02:00
Nicolas Tsiftes
9bb51087bf Renamed the drivers directory to arch to reflect that this is the main place for architecture-dependent functionality. 2017-06-28 16:20:43 +02:00
Simon Duquennoy
fcc1778dc0 Remove all references to Rime 2017-06-22 18:31:13 +02:00
Simon Duquennoy
d4a608cdad Merge pull request #39 from simonduq/pr/werror
Enable -Wall -Werror by default
2017-06-21 16:00:16 +02:00
Simon Duquennoy
75c17e15ca Consistently enable -Wall and -Werror. Have WERROR set by default 2017-06-21 11:11:09 +02:00
Simon Duquennoy
1a0f8ab737 Removing IPv4 stack 2017-06-16 17:32:22 +02:00
Simon Duquennoy
d61cb46e59 Removing contki-version.h; now only relying on Makefile.include 2017-05-18 12:57:46 +02:00
Simon Duquennoy
d51a9a0811 Making apps makefile optional. Removing shell. 2017-05-18 11:42:06 +02:00
Simon Duquennoy
54d6756815 Move cpu, dev and platform into a new top-level directory: drivers 2017-05-16 09:04:52 +02:00
Simon Duquennoy
6220aea14a Removing Rime, old platforms, old MAC layers, LLSEC (as a layer), some examples and apps 2017-05-14 01:14:05 +02:00
Wojciech Bober
0671640ea2 Extended SOURCEDIRS variable with EXTRALDIRS variable in Makefile.include
Directories listed in this variable are added to include and
source (vpath) search paths.

Contents of this variable aren't automatically prefixed with
Contki root. This allows for inclusion of folders that are
outside Contiki root.
2016-02-15 09:37:38 +01:00
Benoît Thébaudeau
ecf6765bfd Makefile.include: Remove unused MODULESSUBST
The commit bddd96d5c8 "Removed all module
makefiles. Instead, all .c files in a module directory are compiled."
made the MODULESSUBST variable useless, but it did not remove it, so do
it now.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-06-01 22:09:58 +02:00
Simon Duquennoy
c2ca3e9fdb Cleanup UIP_CONF_IPV6_RPL configuration 2014-12-02 12:38:55 +01:00
Simon Duquennoy
a9cc909794 Network layer configuration: replace UIP_CONF_* with NETSTACK_CONF_WITH_* 2014-12-01 21:02:57 +01:00
Simon Duquennoy
722b3258d1 Cleanup of the Contiki network layer configuration. Now using CONTIKI_WITH_IPV6, CONTIKI_WITH_IPV4, and CONTIKI_WITH_RIME in makefiles, and UIP_CONF_IPV6, UIP_CONF_IPV4, UIP_CONF_RIME in c code. Now only the stacks that are used are compiled (via makefile MODULES). Make IPv6 the default network stack. 2014-12-01 20:13:09 +01:00
Moritz 'Morty' Strübe
6670b27320 Always compile verbose when running the CI 2014-11-13 09:10:53 +01:00
Moritz 'Morty' Strübe
192d87fa48 Support setting the RELSTR
To build identical binaries the RELSTR must be identical, too.
2014-11-13 09:10:53 +01:00
Joakim Gebart
b3dd696ec3 Makefile.include: Assign git description variable once.
By changing RELSTR= into RELSTR:= we force Make to evaluate the Git
version string only during Makefile read, and not on every single build
command execution.

The reduction in file system I/O cut the time to build
examples/er-rest-example on my development machine by a significant
amount, see below.

Core i7 notebook with ext4 file system on an SSD (building for TARGET=mulle):
"RELSTR="  make  19.70s user 1.07s system 82% cpu 25.291 total
"RELSTR:=" make  11.81s user 1.27s system 79% cpu 16.499 total

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2014-10-29 15:17:07 +01:00
kkrentz
c396a85364 llsec: Added a layer in between NETSTACK_MAC and NETSTACK_NETWORK for implementing link layer security 2014-08-04 01:09:57 -07:00
Adam Dunkels
f13184383c Merge pull request #613 from nfi/distclean
Fixed distclean to work when CONTIKI_PROJECT is set to multiple files.
2014-06-11 23:16:36 +02:00
Enrico Joerns
29894bbdfa Makefile.include: Setting RELSTR based on git tags requires to be in
the contiki directory
2014-04-09 19:11:35 +02:00
Niclas Finne
0f67531f2b CONTIKI_PROJECT is sometimes set to multiple files which caused distclean to fail. 2014-03-28 15:34:20 +01:00
Adam Dunkels
bddd96d5c8 Removed all module makefiles. Instead, all .c files in a module directory are compiled. 2014-01-26 23:20:46 +01:00
Adam Dunkels
dc2f415a70 Removed the PLATFORMAPPS definition - this is now handled by the modules mechanism 2014-01-26 23:20:44 +01:00
Adam Dunkels
4df80276dc Removed old definitions of source files - thiis is now handled by the modules mechanism 2014-01-26 23:20:43 +01:00
Adam Dunkels
84d552445e Don't include core/net/mac in the default modules 2014-01-26 23:20:43 +01:00
Fredrik Osterlind
cf32063c0b introduced optional Makefile.customrules-$(TARGET), to contain custom platform make rules 2014-01-26 23:20:39 +01:00
Adam Dunkels
7a740b382f Moved the individual MODULE definitions from the top-level Makefile.include into the individual platforms' Makefiles 2014-01-26 23:20:36 +01:00
Adam Dunkels
460da08a37 Filter out multiple definitions of the same module 2014-01-26 23:20:33 +01:00
Adam Dunkels
13f8837422 Made core/lib into a module 2014-01-26 23:20:32 +01:00
Adam Dunkels
837a697dc8 Include the top-level Contiki directory in the include file search path to make it possible for modules to include their header files via their module path 2014-01-26 23:20:31 +01:00
Adam Dunkels
8bb4860138 core/net/rpl is a module, so don't include its file in the top-level Makefile.include 2014-01-26 23:20:30 +01:00
Adam Dunkels
825b038a7b Use the core/sys and core/dev modules by default 2014-01-26 23:20:29 +01:00
Adam Dunkels
cfa4c1e953 Include a set of basic modules 2014-01-26 23:20:27 +01:00
Adam Dunkels
b78ab6753c Added makefiles to make core/net/mac into a separate module 2014-01-26 23:20:26 +01:00
Adam Dunkels
d10a0f8830 Made the rime code into a separate module 2014-01-26 23:20:24 +01:00
Adam Dunkels
cf17bb441f First stab at implementing the MODULES mechanism 2014-01-26 23:20:23 +01:00
Nicolas Tsiftes
65392ce59e Merge pull request #474 from adamdunkels/push/cleanup-vnc
Remove the VNC client and server
2013-11-29 05:07:53 -08:00
Adam Dunkels
611c659e51 Removed the VNC/CTK server and the VNC viewer app 2013-11-28 14:10:47 +01:00
Adam Dunkels
0fd503af42 Removed the experimental checkpointing code 2013-11-28 14:09:17 +01:00
Adam Dunkels
563c9d1577 Removed old unused sys/ files 2013-11-19 00:23:13 +01:00
ISMB Pert
c4908d9450 Fix rpl-udp build failure on native target, reported on contiki mailing list
http://sourceforge.net/mailarchive/forum.php?thread_name=a2b9cb98ac4a191867afc953113fabaa%40amnesiak.org&forum_name=contiki-developers
2013-11-15 18:30:39 +01:00
Werner Almesberger
6db8788b69 Makefile.include (clean): ignore rm -f failing (e.g., on "core")
rm -f can still fail, e.g., if trying to delete a directory.

If there was, say, a directory called "core", a "make clean" would
therefore only try to delete the files listed in the first command but
not proceed with the rest of the cleanup.

"make clean" itself failing may also affect any outside build process
that invokes it.
2013-11-13 17:15:46 -03:00
Oliver Schmidt
e55ffdbceb Be consistent with tab chars in Makefiles - yet again... 2013-07-30 23:07:55 +02:00
Werner Almesberger
9ee30efefb Makefile.include: revised verbosity control
This should be more friendly to legacy operating systems that
don't support multiple shell commands per line. Note that
architecture-specific overrides need to be adapted, if verbosity
control is desired for them as well.
2013-07-30 10:08:07 -03:00
Adam Dunkels
2e0b8e7616 Revert "Merge pull request #305 from frtos-wpan/pull-verbosity"
This reverts commit 231e772118, reversing
changes made to e13d69cf41.
2013-07-29 18:54:05 +02:00
Werner Almesberger
a3facaa693 Makefile.include: add verbosity control (make V=1 for previous behaviour)
This shortens $(CC) and $(AR) lines to a much more readable length,
making warnings stick out clearly.

The spaces after "CC" and "AR" are to reserve space for other operations
that may use longer names, such as the communly found "BUILD" or
"GENERATE".
2013-07-28 18:54:41 -03:00
Gianfranco Costamagna
ed3ea39caf Added realclean and mostlyclean targets to Makefile.include 2013-07-26 22:21:43 +02:00
Peter A. Bigot
5fc0575e99 Makefile.include: support make clean all
Historically $(OBJECTDIR) was created when Makefile.include is read.  A
consequence is that combining "clean" with "all" (or any other build
target) results in an error because the clean removes the object
directory that is required to exist when building dependencies.
Creating $(OBJECTDIR) on-demand ensures it is present when needed.

Removed creation of $(OBJECTDIR) on initial read, and added an order-only
dependency forcing its creation all Makefile* rules where the target is
explicitly or implicitly in $(OBJECTDIR).
2013-06-20 17:45:41 -05:00
Peter A. Bigot
e6431d8fff Makefile.include: support extending CLEAN with directories
Use recursive remove for $(CLEAN) to support applications that extended it
with directories that should be removed.
2013-06-20 12:20:50 -05:00
Adam Dunkels
03ce7c65cf Allow platform makefiles to specify APPS to be used, by defining a PLATFORMAPPS variable. 2013-05-25 12:10:28 +02:00
George Oikonomou
ffeceb9164 Add a Trickle Timer Library (RFC 6206) 2013-05-19 21:51:07 +01:00
Robert Quattlebaum
28a1e40ebd core/lib/settings: Generalized Settings Manager to work on any platform
This commit moves the Settings Manager from the AVR codebase
into the Contiki core library. Any platform that implements
the Contiki EEPROM API can now use the Settings Manager's
key-value store for storing their persistent configuration info.

The Settings Manager is a EEPROM-based key-value store. Keys
are 16-bit integers and values may be up to 16,383 bytes long.
It is intended to be used to store configuration-related information,
like network settings, radio channels, etc.

 * Robust data format which requires no initialization.
 * Supports multiple values with the same key.
 * Data can be appended without erasing EEPROM.
 * Max size of settings data can be easily increased in the future,
   as long as it doesn't overlap with application data.

The format was inspired by the [OLPC manufacturing data format][].

Since the beginning of EEPROM often contains application-specific
information, the best place to store settings is at the end of EEPROM
(the "top"). Because we are starting at the end of EEPROM, it makes
sense to grow the list of key-value pairs downward, toward the start of
EEPROM.

Each key-value pair is stored in memory in the following format:

Order    | Size     | Name         | Description
--------:|---------:|--------------|-------------------------------
       0 |        2 | `key`        | 16-bit key
      -2 |        1 | `size_check` | One's-complement of next byte
      -3 |   1 or 2 | `size`       | The size of `value`, in bytes
-4 or -5 | variable | `value`      | Value associated with `key`

The end of the key-value pairs is denoted by the first invalid entry.
An invalid entry has any of the following attributes:

 * The `size_check` byte doesn't match the one's compliment of the
   `size` byte (or `size_low` byte).
 * The key has a value of 0x0000.

[OLPC manufacturing data format]: http://wiki.laptop.org/go/Manufacturing_data
2013-03-20 11:57:13 -07:00
Adam Dunkels
db1e8cdbac Separated the uIP makefile from the top-level Makefile.include into a separate core/net/Makefile.uip makefile 2013-03-18 09:45:29 +01:00
Oliver Schmidt
a2ac920887 Restored build in cmd.exe environmet by re-applying change f3cf57e41b which was reverted recently. 2013-03-16 08:48:36 +01:00
Adam Dunkels
0841bce833 Merge pull request #82 from darconeous/master
Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected.
2013-03-10 12:51:03 -07:00
Oliver Schmidt
c385dd1393 Be consistent with tab chars in Makefiles. 2013-02-11 00:28:31 +01:00
Robert Quattlebaum
5afcbf6fff Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected.
Setting UIP_CONF_IPV6 to zero from the make build command line is
something that seems like it should ensure that IPv6 is disabled, but in
fact it actually *enables* IPv6. This seems counter intuitive, so this
patch changes the behavior of the makefiles to handle this case
properly.
2013-01-14 22:03:42 -08:00
Adam Dunkels
4218a733c9 Add the uipv6 route function uip-ds6-route.c 2012-11-27 23:04:34 +01:00
Ilya Dmitrichenko
6690c5f13e Fix hardcoded reference to nm(1) 2012-11-21 18:09:05 +00:00
Niclas Finne
73cb02fb49 removed debug output (caused compiler warning dialog to open in COOJA) 2012-05-23 15:51:23 +02:00
simonduq
10b4105200 added %.ramprof and %.flashprof targets for easy memory profiling of linked binary (e.g. make hello-world.ramprof) 2012-03-26 22:58:45 +02:00
Niclas Finne
bb4885abdc Avoid including APPS twice. Thanks to David Kopf for reporting this. 2012-03-11 01:42:45 +01:00
Ilya Dmitrichenko
ab9ddc62ea Added TODO note regarding flavours of Windows. 2012-02-25 10:09:37 -05:00
Ilya Dmitrichenko
9c99d46e24 Simplified host OS platform detection in Makefiles 2012-02-25 10:09:33 -05:00
Mariano Alvira
022d7193d1 main makefile: also search TARGETDIRs when listing all available targets 2012-02-17 11:54:06 -05:00
Mariano Alvira
6233de96b9 main makefile: remove unnecessary realpath because it breaks on cygwin 2012-02-17 11:51:56 -05:00
Mariano Alvira
bde97a0356 add emacs mode hint to Makefile.include 2012-02-13 09:57:53 -05:00
Mariano Alvira
e13dc1d5ee Provide a way to add additional TARGET search directories.
E.g. in a makefile do:

TARGETDIRS += ../targets

This will search for targets in ../targets as well as
$(CONTIKI)/platforms

A error will occur if more than one targets with the same name are
found.
2012-02-13 09:57:53 -05:00
Mariano Alvira
9f54eeacd7 Provide a way to add additional APPS search directories.
E.g. in a makefile do:

    APPDIRS += ${addprefix ../apps/, $(APPS)}
2012-02-13 09:57:53 -05:00