starting libmc1322x.a

This commit is contained in:
Mariano Alvira 2009-12-15 14:18:48 -05:00
parent e340e234c6
commit 8c17fc36d1
8 changed files with 55 additions and 4 deletions

View File

@ -52,6 +52,13 @@ ALL = $(TESTS:.c=.srec) $(TESTS:.c=.bin) $(TESTS:.c=.dis)
.PRECIOUS: $(COBJS) $(TARGETS) $(TESTS:.c=.obj)
LIBOBJS = $(patsubst %.c,%.o,$(wildcard libmc1322x/*.c))
libmc1322x: libmc1322x.a
libmc1322x.a: $(LIBOBJS)
$(AR) r libmc1322x.a $(LIBOBJS)
all: src/start.o src/isr.o $(ALL)
#tests/flasher.obj: src/maca.o src/nvm.o

7
board/boards.h Normal file
View File

@ -0,0 +1,7 @@
#ifdef BOARD_REDBEE_DEV
#include "redbee-dev.h"
#endif
#ifdef BOARD_REDWIRE_R1
#include "red-r1.h"
#endif

18
libmc1322x/include/isr.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef ISR_H
#define ISR_H
#define INTBASE (0x80020000)
#define INTENNUM_OFF (0x8)
#define INTDISNUM_OFF (0xc)
#define INTSRC_OFF (0x30)
#define INTENNUM INTBASE + INTENNUM_OFF
#define INTDISNUM INTBASE + INTDISNUM_OFF
#define INTSRC INTBASE + INTSRC_OFF
#define enable_tmr_irq() *(volatile uint32_t *)(INTENNUM) = 5;
extern void tmr_isr(void) __attribute__((weak));
#endif

View File

@ -0,0 +1,7 @@
#ifndef MC1322X_H
#define MC1322X_H
#include "types.h"
#include "isr.h"
#endif

View File

@ -1,7 +1,7 @@
#ifndef NVM_H
#define NVM_H
#include "embedded_types.h"
#include "types.h"
typedef enum
{

View File

@ -0,0 +1,13 @@
#ifndef _TYPES_H
#define _TYPES_H
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#endif

View File

@ -1,6 +1,5 @@
#include "types.h"
#include "isr.h"
#include "led.h"
#include "mc1322x.h"
#include "boards.h"
#define MBAR_GPIO 0x80000000
#define GPIO_PAD_DIR0 ((volatile uint32_t *) 0x80000000)