mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
* restructured cpu folder to distinguish between arm and lpc common files
This commit is contained in:
parent
fc3325b113
commit
f13ef5f500
@ -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
|
||||
|
@ -1,26 +1,7 @@
|
||||
export MAKEBASE =$(RIOTBASE)
|
||||
export BINDIR =$(RIOTBASE)/bin/
|
||||
UNDEF = $(BINDIR)startup.o
|
||||
UNDEF += $(BINDIR)startup.o
|
||||
|
||||
### Minimal setup
|
||||
ifeq ($(CPU),lpc2387)
|
||||
USEMODULE += arm_common
|
||||
UNDEF += $(BINDIR)syscalls.o
|
||||
export INCLUDES += -I$(RIOTBASE)/cpu/arm_common/include
|
||||
endif
|
||||
ifeq ($(CPU),lpc214x)
|
||||
USEMODULE += arm_common
|
||||
UNDEF += $(BINDIR)syscalls.o
|
||||
endif
|
||||
ifeq ($(CPU),native)
|
||||
export INCLUDES += -I$(RIOTBASE)/cpu/native/include
|
||||
endif
|
||||
ifeq ($(CPU),stm32f407vgt6)
|
||||
USEMODULE += stm32f4xxstdperi
|
||||
UNDEF += $(BINDIR)syscalls.o
|
||||
endif
|
||||
|
||||
#USEMODULE += cpu_drivers cpu core lib sys
|
||||
USEMODULE += cpu core sys
|
||||
ED = $(USEMODULE:%=-DMODULE_%)
|
||||
EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z')
|
||||
|
10
cpu/Makefile
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
Normal file
21
cpu/Makefile.include
Normal file
@ -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
|
@ -86,6 +86,8 @@ void thread_print_stack(void)
|
||||
printf("STACK (%u)= %X \n",i,*s);
|
||||
}
|
||||
|
||||
/* LPC specific */
|
||||
#ifdef WDTC
|
||||
__attribute__((naked,noreturn)) void arm_reset(void)
|
||||
{
|
||||
dINT();
|
||||
@ -95,3 +97,4 @@ __attribute__((naked,noreturn)) void arm_reset(void)
|
||||
WDFEED= 0x55;
|
||||
while(1);
|
||||
}
|
||||
#endif
|
||||
|
4
cpu/lpc_common/Makefile
Normal file
4
cpu/lpc_common/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
MODULE =lpc_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -1,13 +1,13 @@
|
||||
/* iap driver
|
||||
*
|
||||
* based on iap driver for LPC2148 Controller made by Andreas Weschenfelder, 2008
|
||||
* see:
|
||||
*
|
||||
*/
|
||||
|
||||
#include <irq.h>
|
||||
#include <flashrom.h>
|
||||
#include <iap.h>
|
||||
/* TODO: replace by a lpc generic header */
|
||||
#include <lpc2387.h>
|
||||
|
||||
//#define ENABLE_DEBUG
|
Loading…
Reference in New Issue
Block a user