mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-23 05:29:54 +00:00
better variable defs.
touch objdir to fix problem where board.h would try to get created after it's already been created.
This commit is contained in:
parent
2dcaada25a
commit
8ca9a0269e
@ -1,7 +1,7 @@
|
||||
LINKERSCRIPT = $(MC1322X)/mc1322x.lds
|
||||
LIBMC1322X = $(MC1322X)/libmc1322x
|
||||
LINKERSCRIPT := $(MC1322X)/mc1322x.lds
|
||||
LIBMC1322X := $(MC1322X)/libmc1322x
|
||||
|
||||
.DEFAULT_GOAL = all
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
include $(MC1322X)/config.mk
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
BOARDS = redbee-dev redbee-module redbee-r1 redbee-usb redbee-econotag
|
||||
BOARDS := redbee-dev redbee-module redbee-r1 redbee-usb redbee-econotag
|
||||
|
||||
OBJDIR = ./obj_$(BOARD)_board
|
||||
OBJDIR := obj_$(BOARD)_board
|
||||
CFLAGS += -I$(OBJDIR)
|
||||
|
||||
$(OBJDIR):
|
||||
@ -11,7 +11,8 @@ ifndef BOARD
|
||||
${error you must define BOARD}
|
||||
endif
|
||||
@echo "setup object directory for dev board"
|
||||
mkdir -p $(OBJDIR)
|
||||
mkdir $(OBJDIR)
|
||||
|
||||
$(OBJDIR)/board.h: $(OBJDIR)
|
||||
ln -s ../$(MC1322X)/board/$(BOARD).h $(OBJDIR)/board.h
|
||||
touch $(OBJDIR)/board.h
|
@ -1,8 +1,8 @@
|
||||
MC1322X = ..
|
||||
MC1322X := ..
|
||||
|
||||
include $(MC1322X)/Makefile.include
|
||||
|
||||
TARGETS = blink-red_$(BOARD).bin
|
||||
TARGETS := blink-red_$(BOARD).bin
|
||||
|
||||
all: $(OBJDIR) $(OBJDIR)/board.h $(TARGETS) $(TARGETS:.bin=.dis)
|
||||
all: $(OBJDIR)/board.h $(TARGETS) $(TARGETS:.bin=.dis)
|
||||
|
||||
|
@ -1,31 +1,27 @@
|
||||
#define MBAR_GPIO 0x80000000
|
||||
#define GPIO_PAD_DIR0 0x80000000
|
||||
#define GPIO_DATA0 0x80000008
|
||||
#define UART1_DATA 0x80005008
|
||||
#include <mc1322x.h>
|
||||
#include <board.h>
|
||||
|
||||
#define DELAY 400000
|
||||
|
||||
#include "embedded_types.h"
|
||||
#include "isr.h"
|
||||
#include "led.h"
|
||||
|
||||
#define LED_BITS LED_BLUE
|
||||
|
||||
__attribute__ ((section ("startup")))
|
||||
void main(void) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_PAD_DIR0 = LED_BITS;
|
||||
#define LED_BITS LED_RED
|
||||
|
||||
__attribute__ ((section ("startup")))
|
||||
void main(void) {
|
||||
volatile uint32_t i;
|
||||
|
||||
*GPIO_PAD_DIR0 = LED_BITS;
|
||||
|
||||
while(1) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = LED_BITS;
|
||||
*GPIO_DATA0 = LED_BITS;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = 0x00000000;
|
||||
*GPIO_DATA0 = 0x00000000;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,31 +1,27 @@
|
||||
#define MBAR_GPIO 0x80000000
|
||||
#define GPIO_PAD_DIR0 0x80000000
|
||||
#define GPIO_DATA0 0x80000008
|
||||
#define UART1_DATA 0x80005008
|
||||
#include <mc1322x.h>
|
||||
#include <board.h>
|
||||
|
||||
#define DELAY 400000
|
||||
|
||||
#include "embedded_types.h"
|
||||
#include "isr.h"
|
||||
#include "led.h"
|
||||
|
||||
#define LED_BITS LED_GREEN
|
||||
|
||||
__attribute__ ((section ("startup")))
|
||||
void main(void) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_PAD_DIR0 = LED_BITS;
|
||||
#define LED_BITS LED_RED
|
||||
|
||||
__attribute__ ((section ("startup")))
|
||||
void main(void) {
|
||||
volatile uint32_t i;
|
||||
|
||||
*GPIO_PAD_DIR0 = LED_BITS;
|
||||
|
||||
while(1) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = LED_BITS;
|
||||
*GPIO_DATA0 = LED_BITS;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = 0x00000000;
|
||||
*GPIO_DATA0 = 0x00000000;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,31 +1,27 @@
|
||||
#define MBAR_GPIO 0x80000000
|
||||
#define GPIO_PAD_DIR0 0x80000000
|
||||
#define GPIO_DATA0 0x80000008
|
||||
#define UART1_DATA 0x80005008
|
||||
#include <mc1322x.h>
|
||||
#include <board.h>
|
||||
|
||||
#define DELAY 400000
|
||||
|
||||
#include "embedded_types.h"
|
||||
#include "isr.h"
|
||||
#include "led.h"
|
||||
|
||||
#define LED_BITS LED_WHITE
|
||||
|
||||
__attribute__ ((section ("startup")))
|
||||
void main(void) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_PAD_DIR0 = LED_BITS;
|
||||
#define LED_BITS LED_RED
|
||||
|
||||
__attribute__ ((section ("startup")))
|
||||
void main(void) {
|
||||
volatile uint32_t i;
|
||||
|
||||
*GPIO_PAD_DIR0 = LED_BITS;
|
||||
|
||||
while(1) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = LED_BITS;
|
||||
*GPIO_DATA0 = LED_BITS;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = 0x00000000;
|
||||
*GPIO_DATA0 = 0x00000000;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user