diff --git a/.classpath b/.classpath new file mode 100644 index 000000000..ff0cf55e7 --- /dev/null +++ b/.classpath @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 000000000..6a70d2ff8 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + contiki-ng + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/README.md b/README.md index 03a980a0d..68837c24f 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,4 @@ Engage with the community: * Gitter: https://gitter.im/contiki-ng * Twitter: https://twitter.com/contiki_ng + diff --git a/contiki-ng b/contiki-ng new file mode 100644 index 000000000..7a82399a0 --- /dev/null +++ b/contiki-ng @@ -0,0 +1,41 @@ +[editor] +line_wrapping=false +line_break_column=72 +auto_continue_multiline=true + +[file_prefs] +final_new_line=true +ensure_convert_new_lines=false +strip_trailing_spaces=false +replace_tabs=false + +[indentation] +indent_width=4 +indent_type=1 +indent_hard_tab_width=8 +detect_indent=false +detect_indent_width=false +indent_mode=2 + +[project] +name=contiki-ng +base_path=/home/osboxes/contiki-ng/ +description= + +[long line marker] +long_line_behaviour=1 +long_line_column=72 + +[files] +current_page=0 + +[VTE] +last_dir=/home/osboxes + +[prjorg] +source_patterns=*.c;*.C;*.cpp;*.cxx;*.c++;*.cc;*.m; +header_patterns=*.h;*.H;*.hpp;*.hxx;*.h++;*.hh; +ignored_dirs_patterns=.*;CVS; +ignored_file_patterns=*.o;*.obj;*.a;*.lib;*.so;*.dll;*.lo;*.la;*.class;*.jar;*.pyc;*.mo;*.gmo; +generate_tag_prefs=0 +external_dirs= diff --git a/examples/NES-cooja-exercises/Makefile b/examples/NES-cooja-exercises/Makefile new file mode 100644 index 000000000..f2fb3c3fb --- /dev/null +++ b/examples/NES-cooja-exercises/Makefile @@ -0,0 +1,6 @@ +CONTIKI_PROJECT = hello-world +all: $(CONTIKI_PROJECT) + +CONTIKI = ../.. + +include $(CONTIKI)/Makefile.include diff --git a/examples/NES-cooja-exercises/test-timers.c b/examples/NES-cooja-exercises/test-timers.c new file mode 100644 index 000000000..dcee4cf90 --- /dev/null +++ b/examples/NES-cooja-exercises/test-timers.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017, RISE SICS. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + */ + +#include "net/netstack.h" +#include "net/nullnet/nullnet.h" +#include +#include + + + diff --git a/examples/NES-launchpad-exercises/Makefile b/examples/NES-launchpad-exercises/Makefile new file mode 100644 index 000000000..d8745cce8 --- /dev/null +++ b/examples/NES-launchpad-exercises/Makefile @@ -0,0 +1,12 @@ +CONTIKI_PROJECT = launchpad-exercises +PLATFORMS_ONLY = cc26x0-cc13x0 +all: $(CONTIKI_PROJECT) + +CONTIKI = ../.. + +PLATFORMS_EXCLUDE = nrf52dk + +#use this to enable TSCH: MAKE_MAC = MAKE_MAC_TSCH +MAKE_MAC ?= MAKE_MAC_CSMA +MAKE_NET = MAKE_NET_NULLNET +include $(CONTIKI)/Makefile.include diff --git a/examples/NES-launchpad-exercises/hello-world.c b/examples/NES-launchpad-exercises/hello-world.c new file mode 100644 index 000000000..6e0451a46 --- /dev/null +++ b/examples/NES-launchpad-exercises/hello-world.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017, RISE SICS. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + */ + +#include "net/netstack.h" +#include "net/nullnet/nullnet.h" +#include +#include +#include "sys/log.h" +#define LOG_MODULE "App" +#define LOG_LEVEL LOG_LEVEL_INFO diff --git a/examples/NES-launchpad-exercises/project-conf.h b/examples/NES-launchpad-exercises/project-conf.h new file mode 100644 index 000000000..3cbc0da86 --- /dev/null +++ b/examples/NES-launchpad-exercises/project-conf.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2014, Texas Instruments Incorporated - http://www.ti.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/*---------------------------------------------------------------------------*/ +#ifndef PROJECT_CONF_H_ +#define PROJECT_CONF_H_ +/*---------------------------------------------------------------------------*/ +/* Enable the ROM bootloader */ +#define CCXXWARE_CONF_ROM_BOOTLOADER_ENABLE 1 +/*---------------------------------------------------------------------------*/ +/* Change to match your configuration */ +#define IEEE802154_CONF_PANID 0xABCD +#define IEEE802154_CONF_DEFAULT_CHANNEL 25 +#define RF_BLE_CONF_ENABLED 1 +/*---------------------------------------------------------------------------*/ +#endif /* PROJECT_CONF_H_ */ +/*---------------------------------------------------------------------------*/ diff --git a/examples/nullnet/Makefile b/examples/nullnet/Makefile index 10a113798..fac592d26 100644 --- a/examples/nullnet/Makefile +++ b/examples/nullnet/Makefile @@ -1,4 +1,5 @@ CONTIKI_PROJECT = nullnet-unicast nullnet-broadcast +PLATFORMS_ONLY = cc26x0-cc13x0 all: $(CONTIKI_PROJECT) CONTIKI = ../.. diff --git a/examples/nullnet/nullnet-unicast.c b/examples/nullnet/nullnet-unicast.c index 5dd9d9fcd..c3a495165 100644 --- a/examples/nullnet/nullnet-unicast.c +++ b/examples/nullnet/nullnet-unicast.c @@ -52,6 +52,7 @@ /* Configuration */ #define SEND_INTERVAL (8 * CLOCK_SECOND) +//launchpad_link_layer_address {{ 0x000, 0x0012, 0x004b, 0x0000, 0x000f, 0x0024, 0x0000, 0x0002 }} static linkaddr_t dest_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}; #if MAC_CONF_WITH_TSCH @@ -91,7 +92,7 @@ PROCESS_THREAD(nullnet_example_process, ev, data) nullnet_buf = (uint8_t *)&count; nullnet_len = sizeof(count); nullnet_set_input_callback(input_callback); - + LOG_INFO_LLADDR(&linkaddr_node_addr); if(!linkaddr_cmp(&dest_addr, &linkaddr_node_addr)) { etimer_set(&periodic_timer, SEND_INTERVAL); while(1) { diff --git a/examples/simulations/02.csc b/examples/simulations/02.csc new file mode 100644 index 000000000..cea5c6b24 --- /dev/null +++ b/examples/simulations/02.csc @@ -0,0 +1,135 @@ + + + [APPS_DIR]/mrm + [APPS_DIR]/mspsim + [APPS_DIR]/avrora + [APPS_DIR]/serial_socket + [APPS_DIR]/powertracker + + My simulation + 1.0 + 123456 + 1000000 + + org.contikios.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + org.contikios.cooja.contikimote.ContikiMoteType + mtype729 + Cooja Mote Type #1 + [CONTIKI_DIR]/examples/2/test-timers.c + make test-timers.cooja TARGET=cooja + org.contikios.cooja.interfaces.Position + org.contikios.cooja.interfaces.Battery + org.contikios.cooja.contikimote.interfaces.ContikiVib + org.contikios.cooja.contikimote.interfaces.ContikiMoteID + org.contikios.cooja.contikimote.interfaces.ContikiRS232 + org.contikios.cooja.contikimote.interfaces.ContikiBeeper + org.contikios.cooja.interfaces.RimeAddress + org.contikios.cooja.contikimote.interfaces.ContikiIPAddress + org.contikios.cooja.contikimote.interfaces.ContikiRadio + org.contikios.cooja.contikimote.interfaces.ContikiButton + org.contikios.cooja.contikimote.interfaces.ContikiPIR + org.contikios.cooja.contikimote.interfaces.ContikiClock + org.contikios.cooja.contikimote.interfaces.ContikiLED + org.contikios.cooja.contikimote.interfaces.ContikiCFS + org.contikios.cooja.contikimote.interfaces.ContikiEEPROM + org.contikios.cooja.interfaces.Mote2MoteRelations + org.contikios.cooja.interfaces.MoteAttributes + false + + + + org.contikios.cooja.interfaces.Position + 81.3697454254841 + 81.4544588714536 + 0.0 + + + org.contikios.cooja.contikimote.interfaces.ContikiMoteID + 1 + + + org.contikios.cooja.contikimote.interfaces.ContikiRadio + 250.0 + + + org.contikios.cooja.contikimote.interfaces.ContikiEEPROM + AAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== + + mtype729 + + + + org.contikios.cooja.plugins.SimControl + 280 + 0 + 160 + 400 + 0 + + + org.contikios.cooja.plugins.Visualizer + + true + org.contikios.cooja.plugins.skins.IDVisualizerSkin + org.contikios.cooja.plugins.skins.GridVisualizerSkin + org.contikios.cooja.plugins.skins.TrafficVisualizerSkin + org.contikios.cooja.plugins.skins.UDGMVisualizerSkin + 0.9090909090909091 0.0 0.0 0.9090909090909091 120.02750415865083 98.9504919350422 + + 400 + 4 + 400 + 1 + 1 + + + org.contikios.cooja.plugins.LogListener + + + + + + 290 + 3 + 240 + 400 + 160 + + + org.contikios.cooja.plugins.TimeLine + + 0 + + + + 500.0 + + 690 + 1 + 166 + 0 + 453 + + + org.contikios.cooja.plugins.Notes + + Enter notes here + true + + 10 + 2 + 160 + 680 + 0 + + +