diff --git a/cpu/native/include/cpu-conf.h b/cpu/native/include/cpu-conf.h index 2811c7932b..4e959912df 100644 --- a/cpu/native/include/cpu-conf.h +++ b/cpu/native/include/cpu-conf.h @@ -28,7 +28,12 @@ #define KERNEL_CONF_STACKSIZE_DEFAULT (16384) #define KERNEL_CONF_STACKSIZE_IDLE (16384) #define NATIVE_ISR_STACKSIZE (16384) +// undefine the TRANSCEIVER_STACK_SIZE (2048 or 512) defined in trnsceiver.h +#ifdef TRANSCEIVER_STACK_SIZE +#undef TRANSCEIVER_STACK_SIZE +#endif #define TRANSCEIVER_STACK_SIZE (16384) + #define MINIMUM_STACK_SIZE (16384) #endif diff --git a/cpu/native/irq_cpu.c b/cpu/native/irq_cpu.c index 6bbaa23c1b..116f009942 100644 --- a/cpu/native/irq_cpu.c +++ b/cpu/native/irq_cpu.c @@ -78,7 +78,7 @@ void print_sigmasks(void) if (sched_threads[i] != NULL) { printf("%s:\n", sched_threads[i]->name); //print_thread_sigmask(sched_threads[i]->sp); - p = sched_threads[i]->stack_start; + p = (ucontext_t*)(sched_threads[i]->stack_start); print_thread_sigmask(p); puts(""); } diff --git a/drivers/cc110x_ng/cc110x-defaultSettings.c b/drivers/cc110x_ng/cc110x-defaultSettings.c index 844dcb5758..fddfedcf89 100644 --- a/drivers/cc110x_ng/cc110x-defaultSettings.c +++ b/drivers/cc110x_ng/cc110x-defaultSettings.c @@ -41,7 +41,7 @@ and the mailinglist (subscription via web site) * @note $Id: cc110x-defaultSettings.c 2058 2010-03-31 08:59:31Z hillebra $ */ -#include +#include "cc110x-defaultSettings.h" /** * Usable, non overlapping channels and corresponding frequencies diff --git a/drivers/cc110x_ng/spi/cc110x_spi.c b/drivers/cc110x_ng/spi/cc110x_spi.c index 867f93111f..9b2f8234ef 100644 --- a/drivers/cc110x_ng/spi/cc110x_spi.c +++ b/drivers/cc110x_ng/spi/cc110x_spi.c @@ -44,13 +44,13 @@ and the mailinglist (subscription via web site) #include -#include -#include -#include -#include -#include +#include "cc110x_ng.h" +#include "cc110x-arch.h" +#include "cc110x-internal.h" +#include "cc110x_spi.h" +#include "cc110x-reg.h" -#include +#include "irq.h" /*---------------------------------------------------------------------------*/ // CC1100 SPI access diff --git a/sys/auto_init/Makefile b/sys/auto_init/Makefile index cf0cb48c74..d807664555 100644 --- a/sys/auto_init/Makefile +++ b/sys/auto_init/Makefile @@ -1,5 +1,5 @@ INCLUDES = -I../include -I$(RIOTBASE)/core/include/ -I$(RIOTBASE)/drivers/include -MODULE =auto_init +MODULE = auto_init include $(RIOTBASE)/Makefile.base diff --git a/sys/include/timex.h b/sys/include/timex.h index f268deae2e..424dc9b354 100644 --- a/sys/include/timex.h +++ b/sys/include/timex.h @@ -28,4 +28,9 @@ int timex_cmp(const timex_t a, const timex_t b); */ void timex_normalize(timex_t *time); +/** + * @brief Prints a timex_t + */ +void timex_print(const timex_t t); + #endif /* __TIMEX_H */ diff --git a/sys/include/vtimer.h b/sys/include/vtimer.h index c50f5a496b..d25aa52d47 100644 --- a/sys/include/vtimer.h +++ b/sys/include/vtimer.h @@ -19,8 +19,8 @@ #ifndef __VTIMER_H #define __VTIMER_H -#include -#include +#include "queue.h" +#include "timex.h" #define MSG_TIMER 12345 @@ -91,4 +91,9 @@ int vtimer_set_wakeup(vtimer_t *t, timex_t interval, int pid); */ int vtimer_remove(vtimer_t *t); +/** + * @brief Prints a vtimer_t + */ +void vtimer_print(vtimer_t* t); + #endif /* __VTIMER_H */ diff --git a/sys/net/destiny/socket.c b/sys/net/destiny/socket.c index c08a0a21ad..3feeb40665 100644 --- a/sys/net/destiny/socket.c +++ b/sys/net/destiny/socket.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "udp.h" #include "tcp.h" @@ -24,8 +25,8 @@ socket_internal_t sockets[MAX_SOCKETS]; void printf_tcp_context(tcp_hc_context_t *current_tcp_context) { printf("Context: %u\n", current_tcp_context->context_id); - printf("Rcv Seq: %lu Rcv Ack: %lu, Rcv Wnd: %u\n", current_tcp_context->seq_rcv, current_tcp_context->ack_rcv, current_tcp_context->wnd_rcv); - printf("Snd Seq: %lu Snd Ack: %lu, Snd Wnd: %u\n", current_tcp_context->seq_snd, current_tcp_context->ack_snd, current_tcp_context->wnd_snd); + printf("Rcv Seq: %" PRIu32 " Rcv Ack: %" PRIu32 ", Rcv Wnd: %u\n", current_tcp_context->seq_rcv, current_tcp_context->ack_rcv, current_tcp_context->wnd_rcv); + printf("Snd Seq: %" PRIu32 " Snd Ack: %" PRIu32 ", Snd Wnd: %u\n", current_tcp_context->seq_snd, current_tcp_context->ack_snd, current_tcp_context->wnd_snd); } void print_tcp_flags (tcp_hdr_t *tcp_header) @@ -76,9 +77,9 @@ void print_tcp_cb(tcp_cb_t *cb) { timex_t now; vtimer_now(&now); - printf("Send_ISS: %lu\nSend_UNA: %lu\nSend_NXT: %lu\nSend_WND: %u\n", cb->send_iss, cb->send_una, cb->send_nxt, cb->send_wnd); - printf("Rcv_IRS: %lu\nRcv_NXT: %lu\nRcv_WND: %u\n", cb->rcv_irs, cb->rcv_nxt, cb->rcv_wnd); - printf("Time difference: %lu, No_of_retries: %u, State: %u\n\n", timex_sub(now, cb->last_packet_time).microseconds, cb->no_of_retries, cb->state); + printf("Send_ISS: %" PRIu32 "\nSend_UNA: %" PRIu32 "\nSend_NXT: %" PRIu32 "\nSend_WND: %u\n", cb->send_iss, cb->send_una, cb->send_nxt, cb->send_wnd); + printf("Rcv_IRS: %" PRIu32 "\nRcv_NXT: %" PRIu32 "\nRcv_WND: %u\n", cb->rcv_irs, cb->rcv_nxt, cb->rcv_wnd); + printf("Time difference: %" PRIu32 ", No_of_retries: %u, State: %u\n\n", timex_sub(now, cb->last_packet_time).microseconds, cb->no_of_retries, cb->state); } void print_tcp_status(int in_or_out, ipv6_hdr_t *ipv6_header, tcp_hdr_t *tcp_header, socket_t *tcp_socket) @@ -91,8 +92,8 @@ void print_tcp_status(int in_or_out, ipv6_hdr_t *ipv6_header, tcp_hdr_t *tcp_hea printf("TCP Length: %x\n", ipv6_header->length-TCP_HDR_LEN); printf("Source Port: %x, Dest. Port: %x\n", NTOHS(tcp_header->src_port), NTOHS(tcp_header->dst_port)); printf("Source Port: %u, Dest. Port: %u\n", NTOHS(tcp_header->src_port), NTOHS(tcp_header->dst_port)); - printf("ACK: %lx, SEQ: %lx, Window: %x\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window); - printf("ACK: %lu, SEQ: %lu, Window: %u\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window); + printf("ACK: %" PRIu32 ", SEQ: %" PRIu32 ", Window: %x\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window); + printf("ACK: %" PRIu32 ", SEQ: %" PRIu32 ", Window: %u\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window); print_tcp_flags(tcp_header); print_tcp_cb(&tcp_socket->tcp_control); #ifdef TCP_HC @@ -558,8 +559,7 @@ int connect(int socket, sockaddr6_t *addr, uint32_t addrlen) msg_from_server.type = UNDEFINED; // Remember current time - timex_t now; - vtimer_now(&now) + vtimer_now(&now); current_tcp_socket->tcp_control.last_packet_time = now; current_tcp_socket->tcp_control.no_of_retries = 0; diff --git a/sys/net/destiny/tcp.c b/sys/net/destiny/tcp.c index 76cd6f4a50..8e2b8a48a4 100644 --- a/sys/net/destiny/tcp.c +++ b/sys/net/destiny/tcp.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "vtimer.h" #include "tcp_timer.h" @@ -23,12 +24,12 @@ void printTCPHeader(tcp_hdr_t *tcp_header) { printf("\nBEGIN: TCP HEADER\n"); - printf("ack_nr: %lu\n", tcp_header->ack_nr); + printf("ack_nr: %" PRIu32 "\n", tcp_header->ack_nr); printf("checksum: %i\n", tcp_header->checksum); printf("dataOffset_reserved: %i\n", tcp_header->dataOffset_reserved); printf("dst_port: %i\n", tcp_header->dst_port); printf("reserved_flags: %i\n", tcp_header->reserved_flags); - printf("seq_nr: %lu\n", tcp_header->seq_nr); + printf("seq_nr: %" PRIu32 "\n", tcp_header->seq_nr); printf("src_port: %i\n", tcp_header->src_port); printf("urg_pointer: %i\n", tcp_header->urg_pointer); printf("window: %i\n", tcp_header->window); diff --git a/sys/net/sixlowpan/Makefile b/sys/net/sixlowpan/Makefile index 7dce69248e..c5dac39f00 100644 --- a/sys/net/sixlowpan/Makefile +++ b/sys/net/sixlowpan/Makefile @@ -1,4 +1,4 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net +INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net -I$(RIOTBASE)/cpu/arm_common/include/ include $(RIOTBASE)/Makefile.base diff --git a/sys/net/sixlowpan/rpl/trickle.c b/sys/net/sixlowpan/rpl/trickle.c index eca3eb66fc..e1201ad3f9 100644 --- a/sys/net/sixlowpan/rpl/trickle.c +++ b/sys/net/sixlowpan/rpl/trickle.c @@ -111,7 +111,7 @@ void trickle_interval_over(void){ while(1){ thread_sleep(); I = I*2; - printf("TRICKLE new Interval %lu\n",I); + printf("TRICKLE new Interval %u\n",I); if( I == 0 ){ puts("[WARNING] Interval was 0"); if( Imax == 0){ diff --git a/sys/net/sixlowpan/sixlowip.c b/sys/net/sixlowpan/sixlowip.c index 588d3c0577..284756b1f4 100644 --- a/sys/net/sixlowpan/sixlowip.c +++ b/sys/net/sixlowpan/sixlowip.c @@ -462,7 +462,7 @@ void set_remaining_time(timex_t *t, uint32_t time){ timex_t tmp = {time, 0}; timex_t now; - vtimer_now(&now) + vtimer_now(&now); *t = timex_add(now, tmp); } diff --git a/sys/net/sixlowpan/sixlowmac.c b/sys/net/sixlowpan/sixlowmac.c index e000f08695..0d772fea86 100644 --- a/sys/net/sixlowpan/sixlowmac.c +++ b/sys/net/sixlowpan/sixlowmac.c @@ -191,7 +191,7 @@ void send_ieee802154_frame(ieee_802154_long_t *addr, uint8_t *payload, p.data = buf; msg_send_receive(&mesg, &transceiver_rsp, transceiver_pid); - printf("%s, %u: %lu\n", __FILE__, __LINE__, transceiver_rsp.content.value); + printf("%s, %u: %u\n", __FILE__, __LINE__, transceiver_rsp.content.value); hwtimer_wait(5000); } diff --git a/sys/net/sixlowpan/sixlowpan.c b/sys/net/sixlowpan/sixlowpan.c index 444bc1c4ca..0ab48479b8 100644 --- a/sys/net/sixlowpan/sixlowpan.c +++ b/sys/net/sixlowpan/sixlowpan.c @@ -2,14 +2,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "vtimer.h" +#include "timex.h" +#include "debug.h" +#include "thread.h" +#include "mutex.h" +#include "hwtimer.h" +#include "rtc.h" #include "msg.h" #include "sixlowmac.h" #include "sixlowpan.h" @@ -300,7 +300,7 @@ lowpan_reas_buf_t *new_packet_buffer(uint16_t datagram_size, uint16_t datagram_t new_buf->packet_size = datagram_size; timex_t now; - vtimer_now(&now) + vtimer_now(&now); new_buf->timestamp = now.microseconds; if ((current_buf == NULL) && (temp_buf == NULL)) @@ -532,7 +532,7 @@ void check_timeout(void) int count = 0; timex_t now; - vtimer_now(&now) + vtimer_now(&now); cur_time = now.microseconds; temp_buf = head; diff --git a/sys/timex/Makefile b/sys/timex/Makefile index 09c9f9c7c5..0275f959ac 100644 --- a/sys/timex/Makefile +++ b/sys/timex/Makefile @@ -1,5 +1,5 @@ INCLUDES = -I../include -MODULE =timex +MODULE = timex include $(RIOTBASE)/Makefile.base diff --git a/sys/timex/timex.c b/sys/timex/timex.c index 40c84cfb7d..a4ed1edd9d 100644 --- a/sys/timex/timex.c +++ b/sys/timex/timex.c @@ -1,4 +1,6 @@ -#include +#include + +#include "timex.h" timex_t timex_add(const timex_t a, const timex_t b) { timex_t result; @@ -47,3 +49,6 @@ int timex_cmp(const timex_t a, const timex_t b) { return 1; } +void timex_print(const timex_t t) { + printf("Seconds: %u - Microseconds: %u\n", t.seconds, t.microseconds); +} diff --git a/sys/vtimer/vtimer.c b/sys/vtimer/vtimer.c index eb0bb9016a..15c46b368d 100644 --- a/sys/vtimer/vtimer.c +++ b/sys/vtimer/vtimer.c @@ -254,9 +254,8 @@ int vtimer_set_msg(vtimer_t *t, timex_t interval, unsigned int pid, void *ptr){ return 0; } -#ifdef ENABLE_DEBUG -static void vtimer_print(vtimer_t* t) { - printf("Seconds: %lu - Microseconds: %lu\n \ +void vtimer_print(vtimer_t* t) { + printf("Seconds: %u - Microseconds: %u\n \ action: %p\n \ action: %p\n \ pid: %u\n", @@ -265,4 +264,3 @@ static void vtimer_print(vtimer_t* t) { t->arg, t->pid); } -#endif