Allow hello-world to build, fix makefile ignoring rf230bb

This commit is contained in:
dak664 2009-07-26 12:10:38 +00:00
parent 8ea4b747d0
commit 283d288f1a
3 changed files with 26 additions and 11 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile.avr,v 1.15 2009/07/23 16:13:48 dak664 Exp $
# $Id: Makefile.avr,v 1.16 2009/07/26 12:10:38 dak664 Exp $
### Check if we are running under Windows
@ -42,7 +42,7 @@ ifeq ($(RF230BB),1)
#ifdef RF230BB
CFLAGS += -DRF230BB
#Source for AT86RF230 barebones driver using the contiki core MAC
include $(CONTIKI)/cpu/avr/radio/rf230/Makefile.rf230
include $(CONTIKI)/cpu/avr/radio/rf230bb/Makefile.rf230bb
else
# Source for AT86RF230
include $(CONTIKI)/cpu/avr/radio/rf230/Makefile.rf230

View file

@ -3,6 +3,9 @@ raven-webserver_src = webserver-nogui.c httpd.c http-strings.c psock.c memb.c \
httpd-fs.c httpd-cgi.c
raven-webserver_dsc = webserver-dsc.c
#Tell platform main routine webserver is present, for parameter display at startup
CFLAGS += -DWEBSERVER
#$(CONTIKI)/apps/webserver/http-strings.c: $(CONTIKI)/apps/webserver/http-strings
# cd $(CONTIKI)/apps/webserver/; $(CONTIKI)/tools/makestrings $<
#

View file

@ -52,19 +52,18 @@ extern int rf230_interrupt_flag;
#include "loader/symtab.h"
#ifdef RF230BB //radio driver using contiki core mac
#include "rf230bb.h"
#include "radio/rf230bb/rf230bb.h"
#include "net/mac/frame802154.h"
#include "net/sicslowpan.h"
#include "net/uip-netif.h"
//#include "net/mac/sicslowmac.h"
#include "net/mac/sicslowmac.h"
#else //radio driver using Atmel/Cisco 802.15.4'ish MAC
#include <stdbool.h>
#include "mac.h"
//#include "sicslowmac.h"
#include "sicslowmac.h"
#include "sicslowpan.h"
#include "ieee-15-4-manager.h"
#endif /*RF230BB*/
#include "sicslowmac.h"
#include "contiki.h"
#include "contiki-net.h"
@ -78,7 +77,10 @@ extern int rf230_interrupt_flag;
#include "raven-lcd.h"
#endif
#if WEBSERVER
#include "httpd-fs.h"
#endif
#ifdef COFFEE_FILES
#include "cfs/cfs.h"
#include "cfs/cfs-coffee.h"
@ -87,7 +89,8 @@ extern int rf230_interrupt_flag;
#if UIP_CONF_ROUTER
#include "net/routing/rimeroute.h"
#include "net/rime/rime-udp.h"
#endif /* UIP_CONF_ROUTER*/
#endif
#include "net/rime.h"
//#include "node-id.h"
@ -104,10 +107,13 @@ SIGNATURE = {
FUSES ={.low = 0xe2, .high = 0x99, .extended = 0xff,};
/* Put default MAC address in EEPROM */
//uint8_t mac_address[8] EEMEM = {0x02, 0x11, 0x22, 0xff, 0xfe, 0x33, 0x44, 0x55};
#if WEBSERVER
extern uint8_t mac_address[8]; //These are defined in httpd-fsdata.c via makefsdata.h
extern uint8_t server_name[16];
extern uint8_t domain_name[30];
#else
uint8_t mac_address[8] EEMEM = {0x02, 0x11, 0x22, 0xff, 0xfe, 0x33, 0x44, 0x55};
#endif
/*-----------------------Initial contiki processes--------------------------*/
#ifdef RAVEN_LCD_INTERFACE
@ -119,8 +125,10 @@ PROCINIT(&etimer_process, &mac_process, &tcpip_process, &raven_lcd_process);
#else
#ifdef RF230BB
PROCINIT(&etimer_process, &tcpip_process);
#else
#elif WEBSERVER //TODO:get hello-world to compile with ipv6
PROCINIT(&etimer_process, &mac_process, &tcpip_process);
#else
PROCINIT(&etimer_process);
#endif /*RF230BB*/
#endif /*RAVEN_LCD_INTERFACE*/
@ -128,8 +136,6 @@ PROCINIT(&etimer_process, &mac_process, &tcpip_process);
/*------Done in a subroutine to keep main routine stack usage small--------*/
void initialize(void)
{
char buf[80];
unsigned int size;
//calibrate_rc_osc_32k(); //CO: Had to comment this out
#ifdef RAVEN_LCD_INTERFACE
@ -215,6 +221,9 @@ void initialize(void)
#endif
/*--------------------------Announce the configuration---------------------*/
#if WEBSERVER
char buf[80];
unsigned int size;
eeprom_read_block (buf,server_name, sizeof(server_name));
buf[sizeof(server_name)]=0;
printf_P(PSTR("%s"),buf);
@ -232,6 +241,9 @@ void initialize(void)
#elif COFFEE_FILES==4
printf_P(PSTR(".%s online with dynamic %u KB program memory file system\n"),buf,size>>10);
#endif
#else
printf_P(PSTR("Online\n"));
#endif /* WEBSERVER */
}
/*-------------------------------------------------------------------------*/
/*------------------------- Main Scheduler loop----------------------------*/