aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-AT91SAM7X-WEB-GCC
diff options
context:
space:
mode:
Diffstat (limited to 'demos/ARM7-AT91SAM7X-WEB-GCC')
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/Makefile2
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb2
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/board.c16
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h9
4 files changed, 19 insertions, 10 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile
index b7b859220..44bb4469a 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile
@@ -95,7 +95,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-WEB-GCC/Makefile.thumb b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb
index 2ef54fb5d..f2f9a851c 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb
@@ -96,7 +96,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-WEB-GCC/board.c b/demos/ARM7-AT91SAM7X-WEB-GCC/board.c
index 0d2fd0996..87bc438ea 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/board.c
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/board.c
@@ -27,31 +27,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-WEB-GCC/chconf.h b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h
index ed950dd3f..cc2870abd 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h
+++ b/demos/ARM7-AT91SAM7X-WEB-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