aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-AT91SAM7X-GCC
diff options
context:
space:
mode:
Diffstat (limited to 'demos/ARM7-AT91SAM7X-GCC')
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/Makefile2
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/Makefile.thumb2
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/board.c16
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/chconf.h9
4 files changed, 19 insertions, 10 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/Makefile b/demos/ARM7-AT91SAM7X-GCC/Makefile
index dbdca2c31..7d22aa586 100644
--- a/demos/ARM7-AT91SAM7X-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-GCC/Makefile
@@ -83,7 +83,7 @@ ASRC = ../../ports/ARM7-AT91SAM7X/chcore.c \
TSRC =
# List ASM source files here
-ASMSRC = ../../ports/ARM7/crt0.s ../../ports/ARM7/chsys.s \
+ASMSRC = ../../ports/ARM7/crt0.s ../../ports/ARM7/chsysasm.s \
../../ports/ARM7-AT91SAM7X/vectors.s
# List all user directories here
diff --git a/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb b/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb
index 3013eeb95..922113f45 100644
--- a/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb
+++ b/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb
@@ -83,7 +83,7 @@ TSRC = ../../ports/ARM7-AT91SAM7X/chcore.c \
board.c main.c
# List ASM source files here
-ASMSRC = ../../ports/ARM7/crt0.s ../../ports/ARM7/chsys.s \
+ASMSRC = ../../ports/ARM7/crt0.s ../../ports/ARM7/chsysasm.s \
../../ports/ARM7-AT91SAM7X/vectors.s
# List all user directories here
diff --git a/demos/ARM7-AT91SAM7X-GCC/board.c b/demos/ARM7-AT91SAM7X-GCC/board.c
index 8a4b7c4ea..2329b0080 100644
--- a/demos/ARM7-AT91SAM7X-GCC/board.c
+++ b/demos/ARM7-AT91SAM7X-GCC/board.c
@@ -26,31 +26,31 @@
extern void FiqHandler(void);
-__attribute__((naked))
-static void SpuriousHandler(void) {
+CH_IRQ_HANDLER static void SpuriousHandler(void) {
- chSysIRQEnterI();
+ CH_IRQ_PROLOGUE();
AT91C_BASE_AIC->AIC_EOICR = 0;
- chSysIRQExitI();
+ CH_IRQ_EPILOGUE();
}
/*
* SYS IRQ handling here.
*/
-__attribute__((naked))
-static void SYSIrqHandler(void) {
+CH_IRQ_HANDLER static void SYSIrqHandler(void) {
- chSysIRQEnterI();
+ CH_IRQ_PROLOGUE();
if (AT91C_BASE_PITC->PITC_PISR & AT91C_PITC_PITS) {
(void) AT91C_BASE_PITC->PITC_PIVR;
+ chSysLockI();
chSysTimerHandlerI();
+ chSysUnlockI();
}
AT91C_BASE_AIC->AIC_EOICR = 0; \
- chSysIRQExitI();
+ CH_IRQ_EPILOGUE();
}
/*
diff --git a/demos/ARM7-AT91SAM7X-GCC/chconf.h b/demos/ARM7-AT91SAM7X-GCC/chconf.h
index f8302116d..c1b6d8c5a 100644
--- a/demos/ARM7-AT91SAM7X-GCC/chconf.h
+++ b/demos/ARM7-AT91SAM7X-GCC/chconf.h
@@ -30,6 +30,15 @@
* that this is not related to the compiler optimization options.*/
#define CH_OPTIMIZE_SPEED
+/** Configuration option: If enabled then the used of nested @p chSysLock() /
+ * @p chSysUnlock() operations is allowed.<br>
+ * For performance and code size reasons the recommended setting is leave
+ * this option disabled.<br>
+ * You can use this option if you need to merge ChibiOS/RT with external
+ * libraries that require nested lock/unlock operations.
+ */
+//#define CH_USE_NESTED_LOCKS
+
/** Configuration option: if specified then the kernel performs the round
* robin scheduling algorithm on threads of equal priority. */
#define CH_USE_ROUNDROBIN