git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@145 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
63508437a3
commit
d34507ec44
|
@ -67,18 +67,19 @@ ASRC =
|
|||
# List THUMB-mode C sources here
|
||||
# NOTE: If any module is compiled in thumb mode then -mthumb-interwork is
|
||||
# enabled for all modules and that lowers performance.
|
||||
TSRC = chcore.c \
|
||||
TSRC = ../../ports/ARM7-LPC214x/GCC/chcore.c \
|
||||
../../ports/ARM7-LPC214x/GCC/vic.c \
|
||||
../../ports/ARM7-LPC214x/GCC/lpc214x_serial.c \
|
||||
../../ports/ARM7-LPC214x/GCC/lpc214x_ssp.c \
|
||||
../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
|
||||
../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
|
||||
../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
|
||||
../../src/chserial.c \
|
||||
../../ports/ARM7-LPC214x/GCC/vic.c ../../ports/ARM7-LPC214x/GCC/lpc214x_serial.c \
|
||||
../../ports/ARM7-LPC214x/GCC/lpc214x_ssp.c \
|
||||
../../src/lib/evtimer.c ../../test/test.c \
|
||||
buzzer.c mmcsd.c main.c
|
||||
board.c buzzer.c mmcsd.c main.c
|
||||
|
||||
# List ASM source files here
|
||||
ASMSRC = crt0.s chcore2.s
|
||||
ASMSRC = ../../ports/ARM7-LPC214x/GCC/crt0.s ../../ports/ARM7-LPC214x/GCC/chcore2.s
|
||||
|
||||
# List all user directories here
|
||||
UINCDIR = ../../src/include ../../src/lib ../../ports/ARM7-LPC214x/GCC
|
||||
|
@ -161,7 +162,7 @@ $(TOBJS) : %.o : %.c
|
|||
|
||||
$(ASMOBJS) : %.o : %.s
|
||||
@echo
|
||||
$(AS) -c $(ASFLAGS) $< -o $@
|
||||
$(AS) -c $(ASFLAGS) -I . $(INCDIR) $< -o $@
|
||||
|
||||
%elf: $(OBJS)
|
||||
@echo
|
||||
|
|
|
@ -28,8 +28,32 @@
|
|||
#include "mmcsd.h"
|
||||
#include "buzzer.h"
|
||||
|
||||
extern void IrqHandler(void);
|
||||
extern void T0IrqHandler(void);
|
||||
/*
|
||||
* Non-vectored IRQs handling here.
|
||||
*/
|
||||
__attribute__((naked))
|
||||
static void IrqHandler(void) {
|
||||
|
||||
chSysIRQEnterI();
|
||||
|
||||
/* nothing */
|
||||
|
||||
chSysIRQExitI();
|
||||
}
|
||||
|
||||
/*
|
||||
* Timer 0 IRQ handling here.
|
||||
*/
|
||||
__attribute__((naked))
|
||||
static void T0IrqHandler(void) {
|
||||
|
||||
chSysIRQEnterI();
|
||||
|
||||
T0IR = 1; /* Clear interrupt on match MR0. */
|
||||
chSysTimerHandlerI();
|
||||
|
||||
chSysIRQExitI();
|
||||
}
|
||||
|
||||
/*
|
||||
* Hardware initialization goes here.
|
||||
|
|
|
@ -39,33 +39,6 @@ void _IdleThread(void *p) {
|
|||
void chSysPuts(char *msg) {
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-vectored IRQs handling here.
|
||||
*/
|
||||
__attribute__((naked, weak))
|
||||
void IrqHandler(void) {
|
||||
|
||||
chSysIRQEnterI();
|
||||
|
||||
/* nothing */
|
||||
|
||||
chSysIRQExitI();
|
||||
}
|
||||
|
||||
/*
|
||||
* Timer 0 IRQ handling here.
|
||||
*/
|
||||
__attribute__((naked, weak))
|
||||
void T0IrqHandler(void) {
|
||||
|
||||
chSysIRQEnterI();
|
||||
|
||||
T0IR = 1; /* Clear interrupt on match MR0. */
|
||||
chSysTimerHandlerI();
|
||||
|
||||
chSysIRQExitI();
|
||||
}
|
||||
|
||||
/*
|
||||
* Common IRQ exit code, \p chSysIRQExitI() just jumps here.
|
||||
*
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
.text
|
||||
.code 32
|
||||
.balign 4
|
||||
|
||||
#ifdef THUMB
|
||||
.balign 16
|
||||
.globl chSysLock
|
||||
chSysLock:
|
||||
msr CPSR_c, #MODE_SYS | I_BIT
|
||||
|
@ -46,6 +46,7 @@ chSysUnlock:
|
|||
bx lr
|
||||
#endif
|
||||
|
||||
.balign 16
|
||||
.globl chSysSwitchI
|
||||
chSysSwitchI:
|
||||
#ifdef CH_CURRP_REGISTER_CACHE
|
||||
|
|
|
@ -136,8 +136,6 @@ bssloop:
|
|||
mov r1, r0
|
||||
bl main
|
||||
bl chSysHalt
|
||||
.weak hwinit
|
||||
hwinit: bx lr
|
||||
#else
|
||||
add r0, pc, #1
|
||||
bx r0
|
||||
|
@ -147,8 +145,6 @@ hwinit: bx lr
|
|||
mov r1, r0
|
||||
bl main
|
||||
bl chSysHalt
|
||||
.weak hwinit
|
||||
hwinit: bx lr
|
||||
.code 32
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue