/*\r
- * FreeRTOS Kernel V10.1.0\r
+ * FreeRTOS Kernel V10.1.1\r
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
*\r
* Permission is hereby granted, free of charge, to any person obtaining a copy of\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) pxCode; /* X1 */\r
pxTopOfStack--;\r
- *pxTopOfStack =\r
-\r
+// *pxTopOfStack = ( StackType_t ) 2; /* Stack pointer is handled separately. */\r
+// pxTopOfStack--;\r
+// *pxTopOfStack = ( StackType_t ) 3; /* Global pointer is not manipulated. */\r
+// pxTopOfStack--;\r
+// *pxTopOfStack = ( StackType_t ) 4; /* Thread pointer is not manipulated. */\r
+// pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 5;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 6;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 7;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 8;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 9;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) pvParameters;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 11;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 12;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 13;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 14;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 15;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 16;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 17;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 18;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 19;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 20;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 21;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 22;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 23;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 24;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 25;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 26;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 27;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 28;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 29;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 30;\r
+ pxTopOfStack--;\r
+ *pxTopOfStack = ( StackType_t ) 31;\r
\r
- return pxTopOfStack;\r
+ return pxTopOfStack;\r
}\r
/*-----------------------------------------------------------*/\r
\r
BaseType_t xPortStartScheduler( void )\r
{\r
+ __asm volatile\r
+ (\r
+ ".extern pxCurrentTCB \r\n"\r
+ "lw sp, pxCurrentTCB \r\n" /* Load pxCurrentTCB. */\r
+ "lw sp, 0x00( sp ) \r\n" /* Read sp from first TCB member. */\r
+ "lw x31, 0( sp ) \r\n" /* X31 */\r
+ "lw x30, 4( sp ) \r\n" /* X30 */\r
+ "lw x29, 8( sp ) \r\n" /* X29 */\r
+ "lw x28, 12( sp ) \r\n" /* X28 */\r
+ "lw x27, 16( sp ) \r\n" /* X27 */\r
+ "lw x26, 20( sp ) \r\n" /* X26 */\r
+ "lw x25, 24( sp ) \r\n" /* X25 */\r
+ "lw x24, 28( sp ) \r\n" /* X24 */\r
+ "lw x23, 32( sp ) \r\n" /* X23 */\r
+ "lw x22, 36( sp ) \r\n" /* X22 */\r
+ "lw x21, 40( sp ) \r\n" /* X21 */\r
+ "lw x20, 44( sp ) \r\n" /* X20 */\r
+ "lw x19, 48( sp ) \r\n" /* X19 */\r
+ "lw x18, 52( sp ) \r\n" /* X18 */\r
+ "lw x17, 56( sp ) \r\n" /* X17 */\r
+ "lw x16, 60( sp ) \r\n" /* X16 */\r
+ "lw x15, 64( sp ) \r\n" /* X15 */\r
+ "lw x14, 68( sp ) \r\n" /* X14 */\r
+ "lw x13, 72( sp ) \r\n" /* X13 */\r
+ "lw x12, 76( sp ) \r\n" /* X12 */\r
+ "lw x11, 80( sp ) \r\n" /* X11 */\r
+ "lw x10, 84( sp ) \r\n" /* X10 */\r
+ "lw x9, 88( sp ) \r\n" /* X9 */\r
+ "lw x8, 92( sp ) \r\n" /* X8 */\r
+ "lw x7, 96( sp ) \r\n" /* X7 */\r
+ "lw x6, 100( sp ) \r\n" /* X6 */\r
+ "lw x5, 104( sp ) \r\n" /* X5 */\r
+ "lw x1, 108( sp ) \r\n" /* X1 */\r
+ "csrs mstatus, 8 \r\n" /* Enable interrupts. */\r
+ "ret "\r
+ );\r
+\r
/*Should not get here*/\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
+void vPortYield( void )\r
+{\r
+}\r
+\r
\r