Permalink
Browse files

Merged with upstream

  • Loading branch information...
1 parent 53115e6 commit 71cd6e6423b811445bbf471c39aae159ab6fd7e5 @vedderb committed Feb 16, 2014
@@ -70,8 +70,8 @@ ARCH_FLAGS = -mlittle-endian -mthumb -mthumb-interwork -mcpu=cortex-m4
# Hard float
ARCH_FLAGS += -fsingle-precision-constant -Wdouble-promotion
-ARCH_FLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
-#ARCH_FLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
+#ARCH_FLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
+ARCH_FLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
# or soft float
#ARCH_FLAGS += -msoft-float
@@ -0,0 +1,13 @@
+/*
+ * Implementation of multithreading in ARM Cortex-M4. To do.
+ */
+
+#ifndef MTARCH_H_
+#define MTARCH_H_
+
+struct mtarch_thread {
+ short mt_thread;
+};
+
+#endif /* MTARCH_H_ */
+
@@ -43,8 +43,8 @@
-#include "net/uip.h"
-#include "net/uip_arch.h"
+#include "net/ip/uip.h"
+#include "net/ip/uip_arch.h"
/*-----------------------------------------------------------------------------------*/
#if UIP_TCP
@@ -38,8 +38,8 @@
#include "contiki.h"
#include "contiki-lib.h"
#include "contiki-net.h"
-#include "net/uip.h"
-#include "net/uip-ds6.h"
+#include "net/ip/uip.h"
+#include "net/ipv6/uip-ds6.h"
#include "net/rpl/rpl.h"
#include "net/netstack.h"
@@ -51,7 +51,7 @@
#include <ctype.h>
#define DEBUG DEBUG_NONE
-#include "net/uip-debug.h"
+#include "net/ip/uip-debug.h"
#include "debug-buffer.h"
uint16_t dag_id[] = {0x1111, 0x1100, 0, 0, 0, 0, 0, 0x0011};
@@ -38,15 +38,15 @@
* Nicolas Tsiftes <nvt@sics.se>
*/
-#include "net/uip.h"
-#include "net/uip-ds6.h"
+#include "net/ip/uip.h"
+#include "net/ipv6/uip-ds6.h"
#include "dev/slip.h"
#include <string.h>
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
#define DEBUG DEBUG_PRINT
-#include "net/uip-debug.h"
+#include "net/ip/uip-debug.h"
void set_prefix_64(uip_ipaddr_t *);
@@ -1,5 +1,5 @@
#include "contiki.h"
-#include "net/rime.h"
+#include "net/rime/rime.h"
#include "dev/leds.h"
#include <stdio.h>
#include <string.h>
@@ -7,7 +7,7 @@
#include "contiki.h"
#include "dev/leds.h"
-#include "dev/cc2520.h"
+#include "dev/cc2520/cc2520.h"
#include <stdio.h>
/*---------------------------------------------------------------------------*/
@@ -35,7 +35,7 @@
#include <string.h>
#define DEBUG DEBUG_PRINT
-#include "net/uip-debug.h"
+#include "net/ip/uip-debug.h"
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
Binary file not shown.
@@ -9,7 +9,7 @@
#include <string.h>
#define DEBUG DEBUG_PRINT
-#include "net/uip-debug.h"
+#include "net/ip/uip-debug.h"
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
@@ -52,6 +52,11 @@ include $(CONTIKI)/cpu/arm/stm32f4/Makefile.stm32f4
#contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
+MODULES += core/net/ipv6 core/net/ipv4 core/net/rime core/net/mac \
+ core/net core/net/ip core/net/rpl \
+ core/net/mac/contikimac core/net/mac/cxmac \
+ dev/cc2520
+
ifndef BASE_IP
BASE_IP := 172.16.1.1
endif
@@ -129,7 +129,7 @@
#ifdef WITH_UIP6
-#define RIMEADDR_CONF_SIZE 8
+#define LINKADDR_CONF_SIZE 8
#define UIP_CONF_LL_802154 1
#define UIP_CONF_LLH_LEN 0
@@ -18,7 +18,7 @@
#include <stdio.h>
#include <string.h>
-#include "dev/cc2520.h"
+#include "dev/cc2520/cc2520.h"
#include "dev/leds.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
@@ -29,13 +29,12 @@
#include "net/mac/frame802154.h"
#if WITH_UIP6
-#include "net/uip-ds6.h"
+#include "net/ipv6/uip-ds6.h"
#endif /* WITH_UIP6 */
-#include "net/rime.h"
+#include "net/rime/rime.h"
#include "sys/autostart.h"
-#include "sys/profile.h"
#if UIP_CONF_ROUTER
@@ -89,10 +88,10 @@ void uip_log(char *msg) { puts(msg); }
static unsigned short node_id;
static void set_rime_addr(void) {
- rimeaddr_t n_addr;
+ linkaddr_t n_addr;
int i;
- memset(&n_addr, 0, sizeof(rimeaddr_t));
+ memset(&n_addr, 0, sizeof(linkaddr_t));
// Set node address
#if UIP_CONF_IPV6
@@ -103,7 +102,7 @@ static void set_rime_addr(void) {
n_addr.u8[1] = node_id >> 8;
#endif
- rimeaddr_set_node_addr(&n_addr);
+ linkaddr_set_node_addr(&n_addr);
printf("Rime started with address ");
for(i = 0; i < sizeof(n_addr.u8) - 1; i++) {
printf("%d.", n_addr.u8[i]);
@@ -165,10 +164,10 @@ int main() {
uint8_t longaddr[8];
uint16_t shortaddr;
- shortaddr = (rimeaddr_node_addr.u8[0] << 8) +
- rimeaddr_node_addr.u8[1];
+ shortaddr = (linkaddr_node_addr.u8[0] << 8) +
+ linkaddr_node_addr.u8[1];
memset(longaddr, 0, sizeof(longaddr));
- rimeaddr_copy((rimeaddr_t *)&longaddr, &rimeaddr_node_addr);
+ linkaddr_copy((linkaddr_t *)&longaddr, &linkaddr_node_addr);
printf("MAC %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x \r\n",
longaddr[0], longaddr[1], longaddr[2], longaddr[3],
@@ -190,8 +189,8 @@ int main() {
#if WITH_UIP6
/* memcpy(&uip_lladdr.addr, ds2411_id, sizeof(uip_lladdr.addr)); */
- memcpy(&uip_lladdr.addr, rimeaddr_node_addr.u8,
- UIP_LLADDR_LEN > RIMEADDR_SIZE ? RIMEADDR_SIZE : UIP_LLADDR_LEN);
+ memcpy(&uip_lladdr.addr, linkaddr_node_addr.u8,
+ UIP_LLADDR_LEN > LINKADDR_SIZE ? LINKADDR_SIZE : UIP_LLADDR_LEN);
/* Setup nullmac-like MAC for 802.15.4 */
/* sicslowpan_init(sicslowmac_init(&cc2520_driver)); */
@@ -203,7 +202,7 @@ int main() {
NETSTACK_MAC.init();
NETSTACK_NETWORK.init();
- printf("%s %s, channel check rate %lu Hz, radio channel %u\r\n",
+ printf("%s %s, channel check rate %i Hz, radio channel %u\r\n",
NETSTACK_MAC.name, NETSTACK_RDC.name,
CLOCK_SECOND / (NETSTACK_RDC.channel_check_interval() == 0 ? 1:
NETSTACK_RDC.channel_check_interval()),
@@ -244,7 +243,7 @@ int main() {
NETSTACK_MAC.init();
NETSTACK_NETWORK.init();
- printf("%s %s, channel check rate %lu Hz, radio channel %u\r\n",
+ printf("%s %s, channel check rate %i Hz, radio channel %u\r\n",
NETSTACK_MAC.name, NETSTACK_RDC.name,
CLOCK_SECOND / (NETSTACK_RDC.channel_check_interval() == 0? 1:
NETSTACK_RDC.channel_check_interval()),
@@ -264,7 +263,7 @@ int main() {
#if TIMESYNCH_CONF_ENABLED
timesynch_init();
- timesynch_set_authority_level((rimeaddr_node_addr.u8[0] << 4) + 16);
+ timesynch_set_authority_level((linkaddr_node_addr.u8[0] << 4) + 16);
#endif /* TIMESYNCH_CONF_ENABLED */
#if WITH_UIP
@@ -280,7 +279,7 @@ int main() {
uip_init();
uip_ipaddr(&hostaddr, 172,16,
- rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1]);
+ linkaddr_node_addr.u8[0], linkaddr_node_addr.u8[1]);
uip_ipaddr(&netmask, 255,255,0,0);
uip_ipaddr_copy(&meshif.ipaddr, &hostaddr);
@@ -3,7 +3,7 @@
#include "stm32f4xx_conf.h"
#include "dev/spi.h"
-#include "dev/cc2520.h"
+#include "dev/cc2520/cc2520.h"
#ifdef CC2520_CONF_SFD_TIMESTAMPS
#define CONF_SFD_TIMESTAMPS CC2520_CONF_SFD_TIMESTAMPS
Submodule mspsim deleted from 58f187

0 comments on commit 71cd6e6

Please sign in to comment.