Merge pull request #67 from mehlis/master
Fixups: build with debug enabled
This commit is contained in:
commit
f1474e4d59
@ -31,7 +31,6 @@
|
||||
#include <auto_init.h>
|
||||
#endif
|
||||
|
||||
#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
volatile tcb_t *sched_threads[MAXTHREADS];
|
||||
|
||||
@ -24,9 +24,8 @@
|
||||
#include <cib.h>
|
||||
|
||||
#include "flags.h"
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include "debug.h"
|
||||
#include "thread.h"
|
||||
|
||||
static int _msg_receive(msg_t *m, int block);
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
#include "sched.h"
|
||||
#include <irq.h>
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
int mutex_init(struct mutex_t *mutex)
|
||||
@ -100,7 +99,7 @@ void mutex_unlock(struct mutex_t *mutex, int yield)
|
||||
if (mutex->queue.next) {
|
||||
queue_node_t *next = queue_remove_head(&(mutex->queue));
|
||||
tcb_t *process = (tcb_t*) next->data;
|
||||
DEBUG("%s: waking up waiter %s.\n", process->name);
|
||||
DEBUG("%s: waking up waiter.\n", process->name);
|
||||
sched_set_status(process, STATUS_PENDING);
|
||||
|
||||
sched_switch(active_thread->priority, process->priority, inISR());
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
extern void *sbrk(int incr);
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
//#define ENABLE_DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
void queue_remove(queue_node_t *root, queue_node_t *node)
|
||||
|
||||
@ -21,7 +21,6 @@
|
||||
#include <clist.h>
|
||||
#include <bitarithm.h>
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
volatile int num_tasks = 0;
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
#include "thread.h"
|
||||
#include "kernel.h"
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include "debug.h"
|
||||
#include "kernel_intern.h"
|
||||
#include "bitarithm.h"
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
#include <iap.h>
|
||||
#include <lpc2387.h>
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* pointer to reserved flash rom section for configuration data */
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "hwtimer.h"
|
||||
#include "diskio.h"
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include "debug.h"
|
||||
|
||||
extern unsigned long hwtimer_now(void);
|
||||
|
||||
@ -188,7 +188,7 @@ void hwtimer_arch_set(unsigned long offset, short timer)
|
||||
|
||||
if (offset < HWTIMERMINOFFSET) {
|
||||
offset = HWTIMERMINOFFSET;
|
||||
DEBUG("hwtimer_arch_set: offset < MIN, set to: %i\n", offset);
|
||||
DEBUG("hwtimer_arch_set: offset < MIN, set to: %lu\n", offset);
|
||||
}
|
||||
|
||||
native_hwtimer_irq[timer] = 1;
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
#include <hwtimer.h>
|
||||
#include <config.h>
|
||||
|
||||
//#define ENABLE_DEBUG (1)
|
||||
#include <debug.h>
|
||||
|
||||
/* some externals */
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include <cc2420_arch.h>
|
||||
#include <hwtimer.h>
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
static uint16_t radio_channel;
|
||||
|
||||
@ -46,7 +46,6 @@ and the mailinglist (subscription via web site)
|
||||
#include <sht11-board.h>
|
||||
#include <bitarithm.h>
|
||||
|
||||
//#define ENABLE_DEBUG (1)
|
||||
#include <debug.h>
|
||||
|
||||
float sht11_temperature_offset;
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
#include <auto_init.h>
|
||||
#include "vtimer.h"
|
||||
|
||||
#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
extern int main(void);
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
#include <irq.h>
|
||||
#include <posix_io.h>
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
static int min(int a, int b)
|
||||
|
||||
@ -51,7 +51,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define ENABLE_DEBUG (1)
|
||||
#include <debug.h>
|
||||
|
||||
/*------------------------------------------------------------------------------------*/
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
|
||||
#include <vtimer.h>
|
||||
|
||||
//#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
@ -30,7 +29,7 @@ static int set_longterm(vtimer_t *timer);
|
||||
static int set_shortterm(vtimer_t *timer);
|
||||
|
||||
#ifdef ENABLE_DEBUG
|
||||
static void vtimer_print(vtimer_t *t);
|
||||
void vtimer_print(vtimer_t *t);
|
||||
#endif
|
||||
|
||||
static queue_node_t longterm_queue_root;
|
||||
@ -74,7 +73,7 @@ static int update_shortterm(void)
|
||||
|
||||
hwtimer_id = hwtimer_set_absolute(HWTIMER_TICKS(next), vtimer_callback, NULL);
|
||||
|
||||
DEBUG("update_shortterm: Set hwtimer to %lu (now=%lu)\n", next, HWTIMER_TICKS_TO_US(hwtimer_now()));
|
||||
DEBUG("update_shortterm: Set hwtimer to %" PRIu32 " (now=%lu)\n", next, HWTIMER_TICKS_TO_US(hwtimer_now()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -104,7 +103,7 @@ void vtimer_tick(void *ptr)
|
||||
|
||||
static int set_shortterm(vtimer_t *timer)
|
||||
{
|
||||
DEBUG("set_shortterm(): Absolute: %lu %lu\n", timer->absolute.seconds, timer->absolute.microseconds);
|
||||
DEBUG("set_shortterm(): Absolute: %" PRIu32 " %" PRIu32 "\n", timer->absolute.seconds, timer->absolute.microseconds);
|
||||
timer->queue_entry.priority = timer->absolute.microseconds;
|
||||
queue_priority_add(&shortterm_queue_root, (queue_node_t *)timer);
|
||||
return 1;
|
||||
@ -121,7 +120,7 @@ void vtimer_callback(void *ptr)
|
||||
#ifdef ENABLE_DEBUG
|
||||
vtimer_print(timer);
|
||||
#endif
|
||||
DEBUG("vtimer_callback(): Shooting %lu.\n", timer->absolute.microseconds);
|
||||
DEBUG("vtimer_callback(): Shooting %" PRIu32 ".\n", timer->absolute.microseconds);
|
||||
|
||||
/* shoot timer */
|
||||
if (timer->action == (void *) msg_send_int) {
|
||||
@ -143,11 +142,11 @@ void vtimer_callback(void *ptr)
|
||||
|
||||
void normalize_to_tick(timex_t *time)
|
||||
{
|
||||
DEBUG("Normalizing: %lu %lu\n", time->seconds, time->microseconds);
|
||||
DEBUG("Normalizing: %" PRIu32 " %" PRIu32 "\n", time->seconds, time->microseconds);
|
||||
uint32_t seconds_tmp = time->seconds % SECONDS_PER_TICK;
|
||||
time->seconds -= seconds_tmp;
|
||||
uint32_t usecs_tmp = time->microseconds + (seconds_tmp * 1000000);
|
||||
DEBUG("Normalizin2: %lu %lu\n", time->seconds, usecs_tmp);
|
||||
DEBUG("Normalizin2: %" PRIu32 " %" PRIu32 "\n", time->seconds, usecs_tmp);
|
||||
|
||||
if (usecs_tmp < time->microseconds) {
|
||||
usecs_tmp -= MICROSECONDS_PER_TICK;
|
||||
@ -160,20 +159,20 @@ void normalize_to_tick(timex_t *time)
|
||||
}
|
||||
|
||||
time->microseconds = usecs_tmp;
|
||||
DEBUG(" Result: %lu %lu\n", time->seconds, time->microseconds);
|
||||
DEBUG(" Result: %" PRIu32 " %" PRIu32 "\n", time->seconds, time->microseconds);
|
||||
}
|
||||
|
||||
static int vtimer_set(vtimer_t *timer)
|
||||
{
|
||||
DEBUG("vtimer_set(): New timer. Offset: %lu %lu\n", timer->absolute.seconds, timer->absolute.microseconds);
|
||||
DEBUG("vtimer_set(): New timer. Offset: %" PRIu32 " %" PRIu32 "\n", timer->absolute.seconds, timer->absolute.microseconds);
|
||||
|
||||
timex_t now;
|
||||
vtimer_now(&now);
|
||||
timer->absolute = timex_add(now, timer->absolute);
|
||||
normalize_to_tick(&(timer->absolute));
|
||||
|
||||
DEBUG("vtimer_set(): Absolute: %lu %lu\n", timer->absolute.seconds, timer->absolute.microseconds);
|
||||
DEBUG("vtimer_set(): NOW: %lu %lu\n", now.seconds, now.microseconds);
|
||||
DEBUG("vtimer_set(): Absolute: %" PRIu32 " %" PRIu32 "\n", timer->absolute.seconds, timer->absolute.microseconds);
|
||||
DEBUG("vtimer_set(): NOW: %" PRIu32 " %" PRIu32 "\n", now.seconds, now.microseconds);
|
||||
|
||||
int result = 0;
|
||||
|
||||
@ -230,7 +229,7 @@ int vtimer_init()
|
||||
longterm_tick_timer.absolute.seconds = 0;
|
||||
longterm_tick_timer.absolute.microseconds = MICROSECONDS_PER_TICK;
|
||||
|
||||
DEBUG("vtimer_init(): Setting longterm tick to %lu\n", longterm_tick_timer.absolute.microseconds);
|
||||
DEBUG("vtimer_init(): Setting longterm tick to %" PRIu32 "\n", longterm_tick_timer.absolute.microseconds);
|
||||
|
||||
set_shortterm(&longterm_tick_timer);
|
||||
update_shortterm();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user