Browse Source

rebased from origin/master

dev/timer
Oleg Hahm 9 years ago
parent
commit
a2dff456f7
  1. 4
      Makefile.include
  2. 10
      cpu/Makefile
  3. 21
      cpu/Makefile.include
  4. 5
      cpu/arm_common/arm_cpu.c
  5. 4
      cpu/lpc_common/Makefile
  6. 0
      cpu/lpc_common/hwtimer_cpu.c
  7. 1
      cpu/lpc_common/iap.c

4
Makefile.include

@ -1,3 +1,4 @@
# set undefined variables
ifeq ($(strip $(RIOTCPU)),)
export RIOTCPU =$(RIOTBASE)/cpu
endif
@ -11,8 +12,9 @@ BB = $(shell echo $(BOARD)|tr 'a-z' 'A-Z')
CFLAGS += -DBOARD=$(BB)
export CFLAGS
# mandatory include!
# mandatory includes!
include $(RIOTBOARD)/$(BOARD)/Makefile.include
include $(RIOTCPU)/Makefile.include
include $(RIOTBASE)/Makefile.modules
# your binaries to link

10
cpu/Makefile

@ -1,9 +1,13 @@
ifeq ($(CPU),lpc2387)
DIRS = arm_common lpc2387
DIRS = arm_common lpc_common lpc2387
endif
ifeq ($(CPU),lpc214x)
DIRS = arm_common lpc214x
DIRS = arm_common lpc_common lpc214x
endif
ifeq ($(CPU),mc1322x)
DIRS = arm_common mc1322x
endif
ifeq ($(CPU),cc430)
@ -28,6 +32,8 @@ $(DIRS):
clean:
@$(MAKE) -C lpc2387 clean
@$(MAKE) -C mc1322x clean
@$(MAKE) -C lpc_common clean
@$(MAKE) -C arm_common clean
@$(MAKE) -C cc430 clean
@$(MAKE) -C msp430-common clean

21
cpu/Makefile.include

@ -0,0 +1,21 @@
### Minimal setup
ifeq ($(CPU),lpc2387)
export USEMODULE += arm_common lpc_common
export UNDEF += $(BINDIR)syscalls.o
export INCLUDES += -I$(RIOTCPU)/arm_common/include
export INCLUDES += -I$(RIOTCPU)/lpc_common/include
endif
ifeq ($(CPU),lpc214x)
export USEMODULE += arm_common lpc_common
export UNDEF += $(BINDIR)syscalls.o
export INCLUDES += -I$(RIOTCPU)/arm_common/include
export INCLUDES += -I$(RIOTCPU)/lpc_common/include
endif
ifeq ($(CPU),mc1322x)
export USEMODULE += arm_common
export UNDEF += $(BINDIR)syscalls.o
export INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include
endif
ifeq ($(CPU),native)
export INCLUDES += -I$(RIOTBASE)/cpu/native/include
endif

5
cpu/arm_common/arm_cpu.c

@ -89,7 +89,9 @@ void thread_print_stack(void)
printf("STACK (%u)= %X \n", i, *s);
}
__attribute__((naked, noreturn)) void arm_reset(void)
/* LPC specific */
#ifdef WDTC
__attribute__((naked,noreturn)) void arm_reset(void)
{
dINT();
WDTC = 0x00FFF;
@ -99,3 +101,4 @@ __attribute__((naked, noreturn)) void arm_reset(void)
while (1);
}
#endif

4
cpu/lpc_common/Makefile

@ -0,0 +1,4 @@
MODULE =lpc_common
include $(RIOTBASE)/Makefile.base

0
cpu/arm_common/hwtimer_cpu.c → cpu/lpc_common/hwtimer_cpu.c

1
cpu/arm_common/iap.c → cpu/lpc_common/iap.c

@ -7,6 +7,7 @@
#include <irq.h>
#include <flashrom.h>
#include <iap.h>
/* TODO: replace by a lpc generic header */
#include <lpc2387.h>
#define ENABLE_DEBUG (0)
Loading…
Cancel
Save