starting libmc1322x.a
This commit is contained in:
parent
e340e234c6
commit
8c17fc36d1
7
Makefile
7
Makefile
|
@ -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
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#ifdef BOARD_REDBEE_DEV
|
||||
#include "redbee-dev.h"
|
||||
#endif
|
||||
|
||||
#ifdef BOARD_REDWIRE_R1
|
||||
#include "red-r1.h"
|
||||
#endif
|
|
@ -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
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef MC1322X_H
|
||||
#define MC1322X_H
|
||||
|
||||
#include "types.h"
|
||||
#include "isr.h"
|
||||
|
||||
#endif
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef NVM_H
|
||||
#define NVM_H
|
||||
|
||||
#include "embedded_types.h"
|
||||
#include "types.h"
|
||||
|
||||
typedef enum
|
||||
{
|
|
@ -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
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue