checkpoint... working on multiple test objects.

This commit is contained in:
Mariano Alvira 2009-03-29 09:42:20 -04:00
parent 3d10558496
commit 583e00d2d9
3 changed files with 29 additions and 3 deletions

View file

@ -44,7 +44,7 @@ include $(TOPDIR)/config.mk
AOBJS =
COBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
TARGETS = test-blink.o
TARGETS = $(patsubst %.c,%.o,$(wildcard tests/*.c))
# Add GCC lib
PLATFORM_LIBS += --no-warn-mismatch -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
@ -52,9 +52,9 @@ PLATFORM_LIBS += --no-warn-mismatch -L $(shell dirname `$(CC) $(CFLAGS) -print-l
#########################################################################
#ALL = blink.srec blink.bin blink.dis blink.System.map
ALL = $(TARGETS:.o=.srec) $(TARGETS:.o=.bin) $(TARGETS:.o=.dis)
ALL = $(TARGETS:.c=.srec) $(TARGETS:.c=.bin) $(TARGETS:.c=.dis)
.PRECIOUS: $(COBJS)
.PRECIOUS: $(COBJS) $(TARGETS)
all: $(ALL)

26
tests/test-blink2.c Normal file
View file

@ -0,0 +1,26 @@
#define MBAR_GPIO 0x80000000
#define GPIO_PAD_DIR0 0x80000000
#define GPIO_DATA0 0x80000008
#define UART1_DATA 0x80005008
#define DELAY 400000
#include "embedded_types.h"
void main(void) {
*(volatile uint32_t *)GPIO_PAD_DIR0 = 0x00000100;
volatile uint32_t i;
while(1) {
*(volatile uint32_t *)GPIO_DATA0 = 0x00000100;
for(i=0; i<DELAY; i++) { continue; }
*(volatile uint32_t *)GPIO_DATA0 = 0x00000000;
for(i=0; i<DELAY; i++) { continue; }
};
}