Skip to content

Commit

Permalink
restructured and fixed arm architecutre files
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegHahm committed Jul 24, 2013
1 parent f12d562 commit 6297516
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 22 deletions.
18 changes: 0 additions & 18 deletions Makefile.modules
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@ export MAKEBASE =$(RIOTBASE)
export BINDIR =$(RIOTBASE)/bin/
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 core sys
ED = $(USEMODULE:%=-DMODULE_%)
EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z')
Expand Down
4 changes: 2 additions & 2 deletions cpu/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
### Minimal setup
ifeq ($(CPU),lpc2387)
export USEMODULE += arm_common lpc_common
export UNDEF += $(BINDIR)syscalls.o
export UNDEF += $(BINDIR)syscalls.o $(BINDIR)lpc_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 UNDEF += $(BINDIR)syscalls.o $(BINDIR)lpc_syscalls.o
export INCLUDES += -I$(RIOTCPU)/arm_common/include
export INCLUDES += -I$(RIOTCPU)/lpc_common/include
endif
Expand Down
3 changes: 2 additions & 1 deletion cpu/arm_common/arm_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void thread_yield(void)
char *thread_stack_init(void *task_func, void *stack_start, int stack_size)
{
unsigned int *stk;
int i;
stk = (unsigned int *)(stack_start + stack_size);
stk--;

Expand All @@ -55,7 +56,7 @@ char *thread_stack_init(void *task_func, void *stack_start, int stack_size)
*stk = (unsigned int)(stack_start + stack_size) - 4;

/* build base stack */
for (int i = REGISTER_CNT; i >= 0 ; i--) {
for (i = REGISTER_CNT; i >= 0 ; i--) {
stk--;
*stk = i;
}
Expand Down
5 changes: 4 additions & 1 deletion cpu/lpc_common/lpc_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
*
*/

#include "cpu.h"
#include "irq.h"

__attribute__((naked,noreturn)) void arm_reset(void)
{
dINT();
disableIRQ();
WDTC = 0x00FFF;
WDMOD = 0x03;
WDFEED= 0xAA;
Expand Down
4 changes: 4 additions & 0 deletions cpu/lpc_common/lpc_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
*/

#include <errno.h>
#include <stdint.h>
#include <sys/unistd.h>
#include <stdio.h>
#include "irq.h"

/**
* @name Heaps (defined in linker script)
Expand Down

0 comments on commit 6297516

Please sign in to comment.