diff options
-rw-r--r-- | docs/ch.txt | 41 | ||||
-rw-r--r-- | ports/ARMCM3/chcore.h | 12 | ||||
-rw-r--r-- | readme.txt | 7 |
3 files changed, 57 insertions, 3 deletions
diff --git a/docs/ch.txt b/docs/ch.txt index 884eb1f11..326fddc00 100644 --- a/docs/ch.txt +++ b/docs/ch.txt @@ -210,7 +210,8 @@ * @defgroup ARM7CONF Configuration Options
* @{
* <p>
- * The ARM7 port allows some architecture-specific configurations:
+ * The ARM7 port allows some architecture-specific configurations settings
+ * that can be specified externally, as example on the compiler command line:
* <ul>
* <li>@p INT_REQUIRED_STACK, this value represent the amount of stack space used
* by an interrupt handler between the @p extctx and @p intctx
@@ -294,6 +295,44 @@ /** @} */
/**
+ * @defgroup ARMCM3CONF Configuration Options
+ * @{
+ * <p>
+ * The ARMCM3 port allows some architecture-specific configurations settings
+ * that can be specified externally, as example on the compiler command line:
+ * <ul>
+ * <li>@p INT_REQUIRED_STACK, this value represent the amount of stack space used
+ * by an interrupt handler between the @p extctx and @p intctx
+ * structures.<br>
+ * In practice this value is the stack space used by the chSchDoReschedule()
+ * stack frame.<br>
+ * This value can be affected by a variety of external things like compiler
+ * version, compiler options, kernel settings (speed/size) and so on.<br>
+ * The default for this value is @p 0x10 which should be a safe value, you
+ * can trim this down by defining the macro externally. This would save
+ * some valuable RAM space for each thread present in the system.<br>
+ * The default value is set into <b>./ports/ARMCM3/chcore.h</b>.</li>
+ * <li>@p BASEPRI_USER, this is the @p BASEPRI value for the user threads. The
+ * default value is @p 0 (disabled).<br>
+ * Usually there is no need to change this value, please refer to the
+ * Cortex-M3 technical reference manual for a detailed description.</li>
+ * <li>@p BASEPRI_KERNEL, this is the @p BASEPRI value for the kernel lock code.
+ * The default value is 0x10.<br>
+ * Code running at higher priority levels must not invoke any OS API.<br>
+ * Usually there is no need to change this value, please refer to the
+ * Cortex-M3 technical reference manual for a detailed description.</li>
+ * <li>@p ENABLE_WFI_IDLE, if set to @p 1 enables the use of the @p wfi
+ * instruction from within the idle loop. This is defaulted to 0 because
+ * it can create problems with some debuggers. Setting this option to 1
+ * reduces the system power requirements.</li>
+ * </ul>
+ * </p>
+ * @ingroup ARMCM3
+ */
+/** @} */
+
+
+/**
* @defgroup STM32F103 STM32F103 Support
* @{
* <p>
diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index 30679e495..212c994de 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -23,9 +23,17 @@ /* * Port-related configuration parameters. */ +#ifndef BASEPRI_USER #define BASEPRI_USER 0 /* User level BASEPRI, 0 = disabled. */ +#endif + +#ifndef BASEPRI_KERNEL #define BASEPRI_KERNEL 0x10 /* BASEPRI level within kernel lock. */ +#endif + +#ifndef ENABLE_WFI_IDLE #define ENABLE_WFI_IDLE 0 /* Enables the use of the WFI ins. */ +#endif /* * Macro defining the ARM Cortex-M3 architecture. @@ -118,7 +126,9 @@ typedef struct { asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp)); \ } -#define INT_REQUIRED_STACK 0 +#ifndef INT_REQUIRED_STACK +#define INT_REQUIRED_STACK 0x10 +#endif /* * Enforces a 32 bit alignment for a stack area size value. diff --git a/readme.txt b/readme.txt index 634ef161c..806d434bc 100644 --- a/readme.txt +++ b/readme.txt @@ -81,7 +81,11 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, MSP430 demo, the default for this option should be off.
- FIX: Fixed a bug that prevented the THREAD_EXT_FIELDS to be compiled into
the Thread structure.
-- FIX: Removed some references to dečrecated APIs from the test suite.
+- FIX: Removed some references to deprecated APIs from the test suite.
+- FIX: Set the INT_REQUIRED_STACK configuration value for the ARM7 and ARMCM3
+ ports to a safer 0x10, it was previously 0 (correct but trimmed to specific
+ compiler settings). Now it is possible to redefine that value externally
+ without have to edit ./port/ARM7/chcore.h.
- Removed deprecated threads APIs: chThdCreate() and chThdCreateFast().
- Removed deprecated events APIs: chEvtWait(), chEvtWaitTimeout(), chEvtSend(),
chEvtSendI(), EventMask().
@@ -91,6 +95,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, - Added usage note into the readme of the MinGW demo.
- Added usage notes for programmers to the ARM7 port documentation about
interrupt handlers.
+- Port-specific settings added to the documentation.
- Fixes and improvements through the documentation.
*** 0.8.3 ***
|