/* Minimal stack size. This may need to be increased for your application */\r
/* NOTE: The FreeRTOS demos may not work reliably with stack size < 4KB. */\r
/* The Xtensa-specific examples should be fine with XT_STACK_MIN_SIZE. */\r
+/* NOTE: the size is defined in terms of StackType_t units not bytes. */\r
#if !(defined XT_STACK_MIN_SIZE)\r
#error XT_STACK_MIN_SIZE not defined, did you include xtensa_config.h ?\r
#endif\r
\r
#ifdef SMALL_TEST\r
-#define configMINIMAL_STACK_SIZE (XT_STACK_MIN_SIZE)\r
+#define configMINIMAL_STACK_SIZE (XT_STACK_MIN_SIZE / sizeof(StackType_t))\r
#else\r
-#define configMINIMAL_STACK_SIZE (XT_STACK_MIN_SIZE > 4096 ? XT_STACK_MIN_SIZE : 4096)\r
+#define configMINIMAL_STACK_SIZE (XT_STACK_MIN_SIZE > 1024 ? XT_STACK_MIN_SIZE : 1024)\r
#endif\r
\r
/* The Xtensa port uses a separate interrupt stack. Adjust the stack size */\r
/* to suit the needs of your specific application. */\r
+/* NOTE: the size is defined in bytes. */\r
#ifndef configISR_STACK_SIZE\r
#define configISR_STACK_SIZE 2048\r
#endif\r
\r
/* Defined in xtensa_context.S */\r
extern void _xt_coproc_init(void);\r
+\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* We require the address of the pxCurrentTCB variable, but don't want to know\r
// User exception dispatcher when exiting\r
void _xt_user_exit(void);\r
\r
-/*\r
+/* \r
* Stack initialization\r
*/\r
#if portUSING_MPU_WRAPPERS\r
BaseType_t xPortSysTickHandler( void )\r
{\r
BaseType_t ret;\r
- unsigned interruptMask;\r
+ uint32_t interruptMask;\r
\r
portbenchmarkIntLatency();\r
\r
#endif\r
}\r
#endif\r
-/*-----------------------------------------------------------*/\r
+\r
#define portDOUBLE double\r
#define portLONG int32_t\r
#define portSHORT int16_t\r
-#define portSTACK_TYPE uint8_t\r
+#define portSTACK_TYPE uint32_t\r
#define portBASE_TYPE int\r
\r
typedef portSTACK_TYPE StackType_t;\r
// These FreeRTOS versions are similar to the nested versions above\r
#define portSET_INTERRUPT_MASK_FROM_ISR() portENTER_CRITICAL_NESTED()\r
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(state) portEXIT_CRITICAL_NESTED(state)\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* Architecture specifics. */\r
void vPortYield( void );\r
void _frxt_setup_switch( void );\r
#define portYIELD() vPortYield()\r
-#define portYIELD_FROM_ISR( x ) if( ( x ) != 0 ) { _frxt_setup_switch(); }\r
+#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) \\r
+ if ( ( xHigherPriorityTaskWoken ) != 0 ) { \\r
+ _frxt_setup_switch(); \\r
+ }\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* Task function macros as described on the FreeRTOS.org WEB site. */\r
\r
*******************************************************************************/\r
\r
-#define XTENSA_PORT_VERSION 1.6\r
-#define XTENSA_PORT_VERSION_STRING "1.6"\r
+#define XTENSA_PORT_VERSION 1.7\r
+#define XTENSA_PORT_VERSION_STRING "1.7"\r
\r
#endif /* XTENSA_RTOS_H */\r
\r