Cleanup license text in Xtensa XCC and Xtensa ESP32 GCC ports.
Add SPXD license identifiers.
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/portbenchmark.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/portbenchmark.h
index ce34b97..e09f617 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/portbenchmark.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/portbenchmark.h
@@ -1,25 +1,30 @@
-/*******************************************************************************

- * // Copyright (c) 2003-2015 Cadence Design Systems, Inc.

- * //

- * // Permission is hereby granted, free of charge, to any person obtaining

- * // a copy of this software and associated documentation files (the

- * // "Software"), to deal in the Software without restriction, including

- * // without limitation the rights to use, copy, modify, merge, publish,

- * // distribute, sublicense, and/or sell copies of the Software, and to

- * // permit persons to whom the Software is furnished to do so, subject to

- * // the following conditions:

- * //

- * // The above copyright notice and this permission notice shall be included

- * // in all copies or substantial portions of the Software.

- * //

- * // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- * --------------------------------------------------------------------------------

+/*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2003-2015 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

+ *

+ * SPDX-License-Identifier: MIT

+ *

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

+ *

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h
index 10a00c6..6d9280b 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h
@@ -2,6 +2,8 @@
  *  FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.
  *  All rights reserved
  *
+ *  SPDX-License-Identifier: GPL-2.0 WITH freertos-exception-2.0
+ *
  *  VISIT https://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
  *
  ***************************************************************************
@@ -353,11 +355,11 @@
                                      uint32_t compare,
                                      uint32_t * set );
         #else
-        static inline void uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set) 
+        static inline void uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set)
         {
-        #if defined(CONFIG_ESP32_SPIRAM_SUPPORT)    
+        #if defined(CONFIG_ESP32_SPIRAM_SUPPORT)
             compare_and_set_extram(addr, compare, set);
-        #endif    
+        #endif
         }
         #endif
 
@@ -437,30 +439,30 @@
 
     /*-----------------------------------------------------------*/
 
-    #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0))    
+    #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0))
     /* Architecture specific optimisations. */
-    
+
     #if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
-    
+
     /* Check the configuration. */
     #if( configMAX_PRIORITIES > 32 )
         #error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32.  It is very rare that a system requires more than 10 to 15 different priorities as tasks that share a priority will time slice.
     #endif
-    
+
     /* Store/clear the ready priorities in a bit map. */
     #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )
     #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )
-    
+
     /*-----------------------------------------------------------*/
-    
+
     #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31 - __builtin_clz( ( uxReadyPriorities ) ) )
-    
+
     #endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
 
     #endif /* ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0) */
-    
+
     /*-----------------------------------------------------------*/
-    
+
 
     void _xt_coproc_release( volatile void * coproc_sa_base );
 
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xt_asm_utils.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xt_asm_utils.h
index e16d4b3..f54458a 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xt_asm_utils.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xt_asm_utils.h
@@ -19,7 +19,7 @@
  * limitations under the License.
  */
 
-/* File adapted to use on IDF FreeRTOS component, extracted 
+/* File adapted to use on IDF FreeRTOS component, extracted
  * originally from zephyr RTOS code base:
  * https://github.com/zephyrproject-rtos/zephyr/blob/dafd348/arch/xtensa/include/xtensa-asm2-s.h
  */
@@ -58,7 +58,7 @@
  *   just a little bit, it's MUCH faster.  With a mostly full register
  *   file on an LX6 core (ESP-32) I'm measuring 145 cycles to spill
  *   registers with this vs. 279 (!) to do it with
- *   xthal_spill_windows().  
+ *   xthal_spill_windows().
  */
 
 .macro SPILL_ALL_WINDOWS
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_api.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_api.h
index f91dab1..b4c22a0 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_api.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_api.h
@@ -1,25 +1,31 @@
-/*******************************************************************************

- * Copyright (c) 2006-2015 Cadence Design Systems Inc.

+/*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2006-2015 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- ******************************************************************************/

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

+ */

 

 /******************************************************************************

 *  Xtensa-specific API for RTOS ports.

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_config.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_config.h
index 4ac32d7..de7934e 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_config.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_config.h
@@ -1,25 +1,33 @@
+/*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2003-2015 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

+ *

+ * SPDX-License-Identifier: MIT

+ *

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

+ *

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

+ */

+

 /*******************************************************************************

-*  // Copyright (c) 2003-2015 Cadence Design Systems, Inc.

-*  //

-*  // Permission is hereby granted, free of charge, to any person obtaining

-*  // a copy of this software and associated documentation files (the

-*  // "Software"), to deal in the Software without restriction, including

-*  // without limitation the rights to use, copy, modify, merge, publish,

-*  // distribute, sublicense, and/or sell copies of the Software, and to

-*  // permit persons to whom the Software is furnished to do so, subject to

-*  // the following conditions:

-*  //

-*  // The above copyright notice and this permission notice shall be included

-*  // in all copies or substantial portions of the Software.

-*  //

-*  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

-*  // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

-*  // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

-*  // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

-*  // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

-*  // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

-*  // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-*  --------------------------------------------------------------------------------

 *

 *  Configuration-specific information for Xtensa build. This file must be

 *  included in FreeRTOSConfig.h to properly set up the config-dependent

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_context.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_context.h
index bb49eb2..41c7421 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_context.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_context.h
@@ -1,25 +1,33 @@
+/*
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2006-2015 Cadence Design Systems, Inc.
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ */
+
 /*******************************************************************************
-Copyright (c) 2006-2015 Cadence Design Systems Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------------------------------
 
         XTENSA CONTEXT FRAMES AND MACROS FOR RTOS ASSEMBLER SOURCES
 
@@ -87,16 +95,16 @@
   INTERRUPT/EXCEPTION STACK FRAME FOR A THREAD OR NESTED INTERRUPT
 
   A stack frame of this structure is allocated for any interrupt or exception.
-  It goes on the current stack. If the RTOS has a system stack for handling 
-  interrupts, every thread stack must allow space for just one interrupt stack 
+  It goes on the current stack. If the RTOS has a system stack for handling
+  interrupts, every thread stack must allow space for just one interrupt stack
   frame, then nested interrupt stack frames go on the system stack.
 
-  The frame includes basic registers (explicit) and "extra" registers introduced 
+  The frame includes basic registers (explicit) and "extra" registers introduced
   by user TIE or the use of the MAC16 option in the user's Xtensa config.
   The frame size is minimized by omitting regs not applicable to user's config.
 
   For Windowed ABI, this stack frame includes the interruptee's base save area,
-  another base save area to manage gcc nested functions, and a little temporary 
+  another base save area to manage gcc nested functions, and a little temporary
   space to help manage the spilling of the register windows.
 -------------------------------------------------------------------------------
 */
@@ -164,7 +172,7 @@
 
 #else
 
-#define XT_STK_NEXT2            XT_STK_NEXT1   
+#define XT_STK_NEXT2            XT_STK_NEXT1
 
 #endif
 
@@ -181,12 +189,12 @@
 -------------------------------------------------------------------------------
   SOLICITED STACK FRAME FOR A THREAD
 
-  A stack frame of this structure is allocated whenever a thread enters the 
+  A stack frame of this structure is allocated whenever a thread enters the
   RTOS kernel intentionally (and synchronously) to submit to thread scheduling.
   It goes on the current thread's stack.
 
   The solicited frame only includes registers that are required to be preserved
-  by the callee according to the compiler's ABI conventions, some space to save 
+  by the callee according to the compiler's ABI conventions, some space to save
   the return address for returning to the caller, and the caller's PS register.
 
   For Windowed ABI, this stack frame includes the caller's base save area.
@@ -194,7 +202,7 @@
   Note on XT_SOL_EXIT field:
       It is necessary to distinguish a solicited from an interrupt stack frame.
       This field corresponds to XT_STK_EXIT in the interrupt stack frame and is
-      always at the same offset (0). It can be written with a code (usually 0) 
+      always at the same offset (0). It can be written with a code (usually 0)
       to distinguish a solicted frame from an interrupt frame. An RTOS port may
       opt to ignore this field if it has another way of distinguishing frames.
 -------------------------------------------------------------------------------
@@ -239,7 +247,7 @@
   and the context switch of that co-processor is then peformed by the handler.
   Ownership represents which thread's state is currently in the co-processor.
 
-  Co-processors may not be used by interrupt or exception handlers. If an 
+  Co-processors may not be used by interrupt or exception handlers. If an
   co-processor instruction is executed by an interrupt or exception handler,
   the co-processor exception handler will trigger a kernel panic and freeze.
   This restriction is introduced to reduce the overhead of saving and restoring
@@ -250,7 +258,7 @@
   such as in the thread control block or above the thread stack area. It need
   not be in the interrupt stack frame since interrupts don't use co-processors.
 
-  Along with the save area for each co-processor, two bitmasks with flags per 
+  Along with the save area for each co-processor, two bitmasks with flags per
   co-processor (laid out as in the CPENABLE reg) help manage context-switching
   co-processors as efficiently as possible:
 
@@ -266,10 +274,10 @@
 
   XT_CPSTORED
     A bitmask with the same layout as CPENABLE, a bit per co-processor.
-    Indicates whether the state of each co-processor is saved in the state 
+    Indicates whether the state of each co-processor is saved in the state
     save area. When a thread enters the kernel, only the state of co-procs
-    still enabled in CPENABLE is saved. When the co-processor exception 
-    handler assigns ownership of a co-processor to a thread, it restores 
+    still enabled in CPENABLE is saved. When the co-processor exception
+    handler assigns ownership of a co-processor to a thread, it restores
     the saved state only if this bit is set, and clears this bit.
 
   XT_CP_CS_ST
@@ -352,7 +360,7 @@
   For framed functions the frame is created and the return address saved at
   base of frame (Call0 ABI) or as determined by hardware (Windowed ABI).
   For frameless functions, there is no frame and return address remains in a0.
-  Note: Because CPP macros expand to a single line, macros requiring multi-line 
+  Note: Because CPP macros expand to a single line, macros requiring multi-line
   expansions are implemented as assembler macros.
 -------------------------------------------------------------------------------
 */
@@ -365,7 +373,7 @@
     addi    sp, sp, -\size
     s32i    a0, sp, 0
     .endm
-  #define ENTRY0      
+  #define ENTRY0
   #define RET(sz)       ret1    sz
     .macro  ret1 size=0x10
     l32i    a0, sp, 0
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_rtos.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_rtos.h
index dbd82b6..64bff80 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_rtos.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_rtos.h
@@ -1,25 +1,33 @@
+/*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2003-2015 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

+ *

+ * SPDX-License-Identifier: MIT

+ *

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

+ *

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

+ */

+

 /*******************************************************************************

-*  // Copyright (c) 2003-2015 Cadence Design Systems, Inc.

-*  //

-*  // Permission is hereby granted, free of charge, to any person obtaining

-*  // a copy of this software and associated documentation files (the

-*  // "Software"), to deal in the Software without restriction, including

-*  // without limitation the rights to use, copy, modify, merge, publish,

-*  // distribute, sublicense, and/or sell copies of the Software, and to

-*  // permit persons to whom the Software is furnished to do so, subject to

-*  // the following conditions:

-*  //

-*  // The above copyright notice and this permission notice shall be included

-*  // in all copies or substantial portions of the Software.

-*  //

-*  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

-*  // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

-*  // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

-*  // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

-*  // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

-*  // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

-*  // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-*  --------------------------------------------------------------------------------

 *

 *       RTOS-SPECIFIC INFORMATION FOR XTENSA RTOS ASSEMBLER SOURCES

 *                           (FreeRTOS Port)

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_timer.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_timer.h
index 431205d..9031fe7 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_timer.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_timer.h
@@ -1,25 +1,33 @@
+/*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2003-2015 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

+ *

+ * SPDX-License-Identifier: MIT

+ *

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

+ *

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

+ */

+

 /*******************************************************************************

-*  // Copyright (c) 2003-2015 Cadence Design Systems, Inc.

-*  //

-*  // Permission is hereby granted, free of charge, to any person obtaining

-*  // a copy of this software and associated documentation files (the

-*  // "Software"), to deal in the Software without restriction, including

-*  // without limitation the rights to use, copy, modify, merge, publish,

-*  // distribute, sublicense, and/or sell copies of the Software, and to

-*  // permit persons to whom the Software is furnished to do so, subject to

-*  // the following conditions:

-*  //

-*  // The above copyright notice and this permission notice shall be included

-*  // in all copies or substantial portions of the Software.

-*  //

-*  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

-*  // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

-*  // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

-*  // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

-*  // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

-*  // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

-*  // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-*  --------------------------------------------------------------------------------

 *

 *       XTENSA INFORMATION FOR RTOS TICK TIMER AND CLOCK FREQUENCY

 *

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/port.c b/portable/ThirdParty/GCC/Xtensa_ESP32/port.c
index e5b7e1a..f2a4e19 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/port.c
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/port.c
@@ -2,6 +2,8 @@
  *  FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.
  *  All rights reserved
  *
+ *  SPDX-License-Identifier: MIT AND (GPL-2.0 WITH freertos-exception-2.0)
+ *
  *  VISIT https://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
  *
  *  This file is part of the FreeRTOS distribution.
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/portasm.S b/portable/ThirdParty/GCC/Xtensa_ESP32/portasm.S
index 1dd7d5e..9ecc029 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/portasm.S
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/portasm.S
@@ -1,27 +1,31 @@
 /*
-//-----------------------------------------------------------------------------
-// Copyright (c) 2003-2015 Cadence Design Systems, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-*/
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2003-2015 Cadence Design Systems, Inc.
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ */
 
 #include "xtensa_rtos.h"
 #include "sdkconfig.h"
@@ -57,10 +61,10 @@
 *******************************************************************************
 * _frxt_setup_switch
 * void _frxt_setup_switch(void);
-* 
+*
 * Sets an internal flag indicating that a task switch is required on return
 * from interrupt handling.
-* 
+*
 *******************************************************************************
 */
     .global     _frxt_setup_switch
@@ -198,7 +202,7 @@
     bnez    a2,  .Lnesting              /* !=0 after decr so still nested  */
 
     #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0))
-    #ifdef CONFIG_FREERTOS_FPU_IN_ISR 
+    #ifdef CONFIG_FREERTOS_FPU_IN_ISR
     #if XCHAL_CP_NUM > 0
     l32i    a3,  sp, 0                  /* Grab last CPENABLE before leave ISR */
     addi    sp,  sp, 4
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.h b/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.h
index 9d3b38b..f14a0cc 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.h
@@ -4,6 +4,8 @@
  *
  *  All rights reserved
  *
+ *  SPDX-License-Identifier: GPL-2.0 WITH freertos-exception-2.0
+ *
  *  FreeRTOS is free software; you can redistribute it and/or modify it under
  *  the terms of the GNU General Public License (version 2) as published by the
  *  Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.inc.h b/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.inc.h
index e2c637b..91db40b 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.inc.h
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.inc.h
@@ -4,6 +4,8 @@
  *
  *  All rights reserved
  *
+ *  SPDX-License-Identifier: GPL-2.0 WITH freertos-exception-2.0
+ *
  *  FreeRTOS is free software; you can redistribute it and/or modify it under
  *  the terms of the GNU General Public License (version 2) as published by the
  *  Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_context.S b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_context.S
index 2a64ec6..da00973 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_context.S
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_context.S
@@ -1,25 +1,33 @@
+/*
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2006-2015 Cadence Design Systems, Inc.
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ */
+
 /*******************************************************************************
-Copyright (c) 2006-2015 Cadence Design Systems Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------------------------------
 
         XTENSA CONTEXT SAVE AND RESTORE ROUTINES
 
@@ -73,7 +81,7 @@
 Its counterpart is _xt_context_restore (which also restores A12, A13).
 
 Caller is expected to have saved PC, PS, A0, A1 (SP), A12, A13 in the frame.
-This function preserves A12 & A13 in order to provide the caller with 2 scratch 
+This function preserves A12 & A13 in order to provide the caller with 2 scratch
 regs that need not be saved over the call to this function. The choice of which
 2 regs to provide is governed by xthal_window_spill_nw and xthal_save_extra_nw,
 to avoid moving data more than necessary. Caller can assign regs accordingly.
@@ -82,7 +90,7 @@
     A0  = Return address in caller.
     A1  = Stack pointer of interrupted thread or handler ("interruptee").
     Original A12, A13 have already been saved in the interrupt stack frame.
-    Other processor state except PC, PS, A0, A1 (SP), A12, A13, is as at the 
+    Other processor state except PC, PS, A0, A1 (SP), A12, A13, is as at the
     point of interruption.
     If windowed ABI, PS.EXCM = 1 (exceptions disabled).
 
@@ -155,8 +163,8 @@
     and underflow exceptions disabled (assured by PS.EXCM == 1).
     */
     s32i    a12, sp, XT_STK_TMP0        /* temp. save stuff in stack frame */
-    s32i    a13, sp, XT_STK_TMP1    
-    s32i    a9,  sp, XT_STK_TMP2    
+    s32i    a13, sp, XT_STK_TMP1
+    s32i    a9,  sp, XT_STK_TMP2
 
     /*
     Save the overlay state if we are supporting overlays. Since we just saved
@@ -176,8 +184,8 @@
     call0   xthal_window_spill_nw       /* preserves only a4,5,8,9,12,13 */
     addi    sp,  sp, -XT_STK_FRMSZ
     l32i    a12, sp, XT_STK_TMP0        /* recover stuff from stack frame */
-    l32i    a13, sp, XT_STK_TMP1    
-    l32i    a9,  sp, XT_STK_TMP2    
+    l32i    a13, sp, XT_STK_TMP1
+    l32i    a9,  sp, XT_STK_TMP2
     #endif
     #endif /* (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0)) */
 
@@ -262,7 +270,7 @@
     !! MUST BE CALLED ONLY BY 'CALL0' INSTRUCTION !!
 
 Restores all Xtensa processor state except PC, PS, A0, A1 (SP) (and in Call0
-ABI, A14, A15 which are preserved by all interrupt handlers) from an interrupt 
+ABI, A14, A15 which are preserved by all interrupt handlers) from an interrupt
 stack frame defined in xtensa_rtos.h .
 Its counterpart is _xt_context_save (whose caller saved A12, A13).
 
@@ -275,7 +283,7 @@
 Exit conditions:
     A0  = Return address in caller.
     A1  = Stack pointer of interrupted thread or handler ("interruptee").
-    Other processor state except PC, PS, A0, A1 (SP), is as at the point 
+    Other processor state except PC, PS, A0, A1 (SP), is as at the point
     of interruption.
 
 *******************************************************************************/
@@ -288,7 +296,7 @@
 _xt_context_restore:
 
     #if XCHAL_EXTRA_SA_SIZE > 0
-    /*  
+    /*
     NOTE: Normally the xthal_restore_extra_nw macro only affects address
     registers a2-a5. It is theoretically possible for Xtensa processor
     designers to write TIE that causes more address registers to be
@@ -358,7 +366,7 @@
 
     /*
     Call0 ABI callee-saved regs a12-15 do not need to be restored here.
-    However a12-13 were saved for scratch before XT_RTOS_INT_ENTER(), 
+    However a12-13 were saved for scratch before XT_RTOS_INT_ENTER(),
     so need to be restored anyway, despite being callee-saved in Call0.
     */
     l32i    a12, sp, XT_STK_A12
@@ -381,7 +389,7 @@
 Called during initialization of the RTOS, before any threads run.
 
 This may be called from normal Xtensa single-threaded application code which
-might use co-processors. The Xtensa run-time initialization enables all 
+might use co-processors. The Xtensa run-time initialization enables all
 co-processors. They must remain enabled here, else a co-processor exception
 might occur outside of a thread, which the exception handler doesn't expect.
 
@@ -424,13 +432,13 @@
 
 _xt_coproc_release
 
-Releases any and all co-processors owned by a given thread. The thread is 
+Releases any and all co-processors owned by a given thread. The thread is
 identified by it's co-processor state save area defined in xtensa_context.h .
 
 Must be called before a thread's co-proc save area is deleted to avoid
 memory corruption when the exception handler tries to save the state.
 May be called when a thread terminates or completes but does not delete
-the co-proc save area, to avoid the exception handler having to save the 
+the co-proc save area, to avoid the exception handler having to save the
 thread's co-proc state before another thread can use it (optimization).
 
 Needs to be called on the processor the thread was running on. Unpinned threads
@@ -630,13 +638,13 @@
     s32i    a3, a15, XT_CP_CS_ST        /* update saved CP mask            */
     movi    a13, _xt_coproc_sa_offset   /* array of CP save offsets        */
     l32i    a15, a15, XT_CP_ASA         /* a15 = base of aligned save area */
-    
+
 #if XCHAL_CP0_SA_SIZE
     bbci.l  a2, 0, 2f                   /* CP 0 not enabled                */
     l32i    a14, a13, 0                 /* a14 = _xt_coproc_sa_offset[0]   */
     add     a3, a14, a15                /* a3 = save area for CP 0         */
     xchal_cp0_load a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
-2:  
+2:
 #endif
 
 #if XCHAL_CP1_SA_SIZE
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_init.c b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_init.c
index 0be384a..e38fa22 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_init.c
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_init.c
@@ -1,25 +1,33 @@
+/*
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2003-2015 Cadence Design Systems, Inc.
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ */
+
 /*******************************************************************************
-*  // Copyright (c) 2003-2015 Cadence Design Systems, Inc.
-*  //
-*  // Permission is hereby granted, free of charge, to any person obtaining
-*  // a copy of this software and associated documentation files (the
-*  // "Software"), to deal in the Software without restriction, including
-*  // without limitation the rights to use, copy, modify, merge, publish,
-*  // distribute, sublicense, and/or sell copies of the Software, and to
-*  // permit persons to whom the Software is furnished to do so, subject to
-*  // the following conditions:
-*  //
-*  // The above copyright notice and this permission notice shall be included
-*  // in all copies or substantial portions of the Software.
-*  //
-*  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-*  // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-*  // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-*  // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-*  // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-*  // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-*  // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*  --------------------------------------------------------------------------------
 *
 *       XTENSA INITIALIZATION ROUTINES CODED IN C
 *
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr.c b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr.c
index 19c14a8..c72391f 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr.c
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr.c
@@ -1,25 +1,31 @@
-/*******************************************************************************
- * Copyright (c) 2006-2015 Cadence Design Systems Inc.
+/*
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2006-2015 Cadence Design Systems, Inc.
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
  *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
+ * SPDX-License-Identifier: MIT
  *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- ******************************************************************************/
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ */
 
 /******************************************************************************
 *  Xtensa-specific interrupt and exception functions for RTOS ports.
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr_asm.S b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr_asm.S
index ddfe4ba..ec5d102 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr_asm.S
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr_asm.S
@@ -1,25 +1,31 @@
-/*******************************************************************************

-Copyright (c) 2006-2015 Cadence Design Systems Inc.

-

-Permission is hereby granted, free of charge, to any person obtaining

-a copy of this software and associated documentation files (the

-"Software"), to deal in the Software without restriction, including

-without limitation the rights to use, copy, modify, merge, publish,

-distribute, sublicense, and/or sell copies of the Software, and to

-permit persons to whom the Software is furnished to do so, subject to

-the following conditions:

-

-The above copyright notice and this permission notice shall be included

-in all copies or substantial portions of the Software.

-

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-******************************************************************************/

+/*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2006-2015 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

+ *

+ * SPDX-License-Identifier: MIT

+ *

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

+ *

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

+ */

 

 /******************************************************************************

   Xtensa interrupt handling data and assembly routines.

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_loadstore_handler.S b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_loadstore_handler.S
index 32d7a8a..0b79329 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_loadstore_handler.S
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_loadstore_handler.S
@@ -1,18 +1,43 @@
 /*
- Copyright 2019 Espressif Systems (Shanghai) PTE LTD
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
+ *
+ * SPDX-License-Identifier: MIT AND Apache-2.0
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ * Copyright 2019 Espressif Systems (Shanghai) PTE LTD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 /*
  *  LoadStoreErrorCause:     Occurs when trying to access 32 bit addressable memory region as 8 bit or 16 bit
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_overlay_os_hook.c b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_overlay_os_hook.c
index ef893a7..a4acf19 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_overlay_os_hook.c
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_overlay_os_hook.c
@@ -1,27 +1,34 @@
+/*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2015 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

+ *

+ * SPDX-License-Identifier: MIT

+ *

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

+ *

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

+ */

+

 /* xtensa_overlay_os_hook.c -- Overlay manager OS hooks for FreeRTOS. */

 

-/* Copyright (c) 2015-2015 Cadence Design Systems Inc. */

-/* */

-/* Permission is hereby granted, free of charge, to any person obtaining */

-/* a copy of this software and associated documentation files (the */

-/* "Software"), to deal in the Software without restriction, including */

-/* without limitation the rights to use, copy, modify, merge, publish, */

-/* distribute, sublicense, and/or sell copies of the Software, and to */

-/* permit persons to whom the Software is furnished to do so, subject to */

-/* the following conditions: */

-/* */

-/* The above copyright notice and this permission notice shall be included */

-/* in all copies or substantial portions of the Software. */

-/* */

-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */

-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */

-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */

-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */

-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */

-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */

-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */

-

-

 #include "FreeRTOS.h"

 #include "semphr.h"

 

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vector_defaults.S b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vector_defaults.S
index 44362a1..f675991 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vector_defaults.S
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vector_defaults.S
@@ -1,16 +1,43 @@
-// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
+ *
+ * SPDX-License-Identifier: MIT AND Apache-2.0
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ * Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 #include "xtensa_rtos.h"
 #include "esp_idf_version.h"
@@ -23,7 +50,7 @@
 #include "soc/soc.h"
 
 /*
-This file contains the default handlers for the high interrupt levels as well as some specialized exceptions. 
+This file contains the default handlers for the high interrupt levels as well as some specialized exceptions.
 The default behaviour is to just exit the interrupt or call the panic handler on the exceptions
 */
 
diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S
index ad099fa..9196e29 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S
@@ -1,24 +1,33 @@
+/*
+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>
+ * Copyright (C) 2006-2015 Cadence Design Systems, Inc.
+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ */
+
 /*******************************************************************************
-Copyright (c) 2006-2015 Cadence Design Systems Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 --------------------------------------------------------------------------------
 
         XTENSA VECTORS AND LOW LEVEL HANDLERS FOR AN RTOS
@@ -34,14 +43,14 @@
   medium level interrupts, by calling xt_set_interrupt_handler(). These
   handlers can be written in C, and must obey C calling convention. The
   handler table is indexed by the interrupt number. Each handler may be
-  provided with an argument. 
+  provided with an argument.
 
   Note that the system timer interrupt is handled specially, and is
   dispatched to the RTOS-specific handler. This timer cannot be hooked
   by application code.
 
-  Optional hooks are also provided to install a handler per level at 
-  run-time, made available by compiling this source file with 
+  Optional hooks are also provided to install a handler per level at
+  run-time, made available by compiling this source file with
   '-DXT_INTEXC_HOOKS' (useful for automated testing).
 
 !!  This file is a template that usually needs to be modified to handle       !!
@@ -81,10 +90,10 @@
       This allows more flexibility in locating code without the performance
       overhead of the 'l32r' literal data load in cases where the destination
       is in range of 'call0'. There is an additional benefit in that 'call0'
-      has a longer range than 'j' due to the target being word-aligned, so 
+      has a longer range than 'j' due to the target being word-aligned, so
       the 'l32r' sequence is less likely needed.
-   3. The use of 'call0' with -mlongcalls requires that register a0 not be 
-      live at the time of the call, which is always the case for a function 
+   3. The use of 'call0' with -mlongcalls requires that register a0 not be
+      live at the time of the call, which is always the case for a function
       call but needs to be ensured if 'call0' is used as a jump in lieu of 'j'.
    4. This use of 'call0' is independent of the C function call ABI.
 
@@ -371,7 +380,7 @@
 /*
 --------------------------------------------------------------------------------
   Panic handler.
-  Should be reached by call0 (preferable) or jump only. If call0, a0 says where 
+  Should be reached by call0 (preferable) or jump only. If call0, a0 says where
   from. If on simulator, display panic message and abort, else loop indefinitely.
 --------------------------------------------------------------------------------
 */
@@ -443,7 +452,7 @@
 panic_print_hex_ok:
     s32i a5,a3,0
     slli a2,a2,4
-    
+
     addi a4,a4,-1
     bnei a4,0,panic_print_hex_loop
     movi a5,' '
@@ -462,12 +471,12 @@
 --------------------------------------------------------------------------------
     Hooks to dynamically install handlers for exceptions and interrupts.
     Allows automated regression frameworks to install handlers per test.
-    Consists of an array of function pointers indexed by interrupt level, 
+    Consists of an array of function pointers indexed by interrupt level,
     with index 0 containing the entry for user exceptions.
     Initialized with all 0s, meaning no handler is installed at each level.
     See comment in xtensa_rtos.h for more details.
 
-    *WARNING*  This array is for all CPUs, that is, installing a hook for 
+    *WARNING*  This array is for all CPUs, that is, installing a hook for
     one CPU will install it for all others as well!
 --------------------------------------------------------------------------------
 */
@@ -497,7 +506,7 @@
   the appropriate stack frame, saves a few vector-specific registers and
   calls XT_RTOS_INT_ENTER to save the rest of the interrupted context
   and enter the RTOS, then sets up a C environment. It then calls the
-  user's interrupt handler code (which may be coded in C) and finally 
+  user's interrupt handler code (which may be coded in C) and finally
   calls XT_RTOS_INT_EXIT to transfer control to the RTOS for scheduling.
 
   While XT_RTOS_INT_EXIT does not return directly to the interruptee,
@@ -903,7 +912,7 @@
 --------------------------------------------------------------------------------
 Co-Processor Exception Handler (jumped to from User Exception Handler).
 These exceptions are generated by co-processor instructions, which are only
-allowed in thread code (not in interrupts or kernel code). This restriction is 
+allowed in thread code (not in interrupts or kernel code). This restriction is
 deliberately imposed to reduce the burden of state-save/restore in interrupts.
 --------------------------------------------------------------------------------
 */
@@ -995,7 +1004,7 @@
     #if (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0))
     beqz    a15, .L_goto_invalid            /* not in a thread (invalid) */
     #else
-    #ifndef CONFIG_FREERTOS_FPU_IN_ISR     
+    #ifndef CONFIG_FREERTOS_FPU_IN_ISR
     beqz    a15, .L_goto_invalid
     #endif
     #endif /* ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0) */
@@ -1028,7 +1037,7 @@
     or      a4, a4, a2                      /* a4 = CPENABLE | (1 << n) */
     wsr     a4, CPENABLE
 
-/* 
+/*
 Keep loading _xt_coproc_owner_sa[n] atomic (=load once, then use that value
 everywhere): _xt_coproc_release assumes it works like this in order not to need
 locking.
@@ -1084,8 +1093,8 @@
 
     /*
     The config-specific HAL macro invoked below destroys a2-5, preserves a0-1.
-    It is theoretically possible for Xtensa processor designers to write TIE 
-    that causes more address registers to be affected, but it is generally 
+    It is theoretically possible for Xtensa processor designers to write TIE
+    that causes more address registers to be affected, but it is generally
     unlikely. If that ever happens, more registers needs to be saved/restored
     around this macro invocation, and the value in a15 needs to be recomputed.
     */
@@ -1113,8 +1122,8 @@
 
     /*
     The config-specific HAL macro invoked below destroys a2-5, preserves a0-1.
-    It is theoretically possible for Xtensa processor designers to write TIE 
-    that causes more address registers to be affected, but it is generally 
+    It is theoretically possible for Xtensa processor designers to write TIE
+    that causes more address registers to be affected, but it is generally
     unlikely. If that ever happens, more registers needs to be saved/restored
     around this macro invocation.
     */
@@ -1197,12 +1206,12 @@
     /* Save rest of interrupt context and enter RTOS. */
     call0   XT_RTOS_INT_ENTER               /* common RTOS interrupt entry */
 
-    /* !! We are now on the RTOS system stack !! */ 
+    /* !! We are now on the RTOS system stack !! */
 
     /* Set up PS for C, enable interrupts above this level and clear EXCM. */
     #ifdef __XTENSA_CALL0_ABI__
     movi    a0, PS_INTLEVEL(1) | PS_UM
-    #else 
+    #else
     movi    a0, PS_INTLEVEL(1) | PS_UM | PS_WOE
     #endif
     wsr     a0, PS
@@ -1234,7 +1243,7 @@
   the appropriate stack frame, saves a few vector-specific registers and
   calls XT_RTOS_INT_ENTER to save the rest of the interrupted context
   and enter the RTOS, then sets up a C environment. It then calls the
-  user's interrupt handler code (which may be coded in C) and finally 
+  user's interrupt handler code (which may be coded in C) and finally
   calls XT_RTOS_INT_EXIT to transfer control to the RTOS for scheduling.
 
   While XT_RTOS_INT_EXIT does not return directly to the interruptee,
@@ -1674,7 +1683,7 @@
 
 Here are templates for high priority (level 2+) interrupt vectors.
 They assume only one interrupt per level to avoid the burden of identifying
-which interrupts at this level are pending and enabled. This allows for 
+which interrupts at this level are pending and enabled. This allows for
 minimum latency and avoids having to save/restore a2 in addition to a0.
 If more than one interrupt per high priority level is configured, this burden
 is on the handler which in any case must provide a way to save and restore
@@ -1799,12 +1808,12 @@
 
 WINDOW OVERFLOW AND UNDERFLOW EXCEPTION VECTORS AND ALLOCA EXCEPTION HANDLER
 
-Here is the code for each window overflow/underflow exception vector and 
+Here is the code for each window overflow/underflow exception vector and
 (interspersed) efficient code for handling the alloca exception cause.
 Window exceptions are handled entirely in the vector area and are very
-tight for performance. The alloca exception is also handled entirely in 
+tight for performance. The alloca exception is also handled entirely in
 the window vector area so comes at essentially no cost in code size.
-Users should never need to modify them and Cadence Design Systems recommends 
+Users should never need to modify them and Cadence Design Systems recommends
 they do not.
 
 Window handlers go at predetermined vector locations according to the
diff --git a/portable/ThirdParty/XCC/Xtensa/port.c b/portable/ThirdParty/XCC/Xtensa/port.c
index f1212a8..5a6adde 100644
--- a/portable/ThirdParty/XCC/Xtensa/port.c
+++ b/portable/ThirdParty/XCC/Xtensa/port.c
@@ -1,10 +1,10 @@
-

 /*

  * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

  * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * SPDX-License-Identifier: MIT
- *
+ * SPDX-License-Identifier: MIT

+ *

  * Permission is hereby granted, free of charge, to any person obtaining a copy of

  * this software and associated documentation files (the "Software"), to deal in

  * the Software without restriction, including without limitation the rights to

@@ -27,29 +27,6 @@
  *

  */

 

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

- *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

- *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

- *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- */

-

 #include <stdlib.h>

 #include <xtensa/config/core.h>

 

@@ -81,7 +58,7 @@
 // User exception dispatcher when exiting

 void _xt_user_exit(void);

 

-/* 

+/*

  * Stack initialization

  */

 #if portUSING_MPU_WRAPPERS

diff --git a/portable/ThirdParty/XCC/Xtensa/portasm.S b/portable/ThirdParty/XCC/Xtensa/portasm.S
index 11017f3..a257d5b 100644
--- a/portable/ThirdParty/XCC/Xtensa/portasm.S
+++ b/portable/ThirdParty/XCC/Xtensa/portasm.S
@@ -1,25 +1,30 @@
-

 /*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 #include "xtensa_rtos.h"

@@ -51,10 +56,10 @@
 *******************************************************************************

 * _frxt_setup_switch

 * void _frxt_setup_switch(void);

-* 

+*

 * Sets an internal flag indicating that a task switch is required on return

 * from interrupt handling.

-* 

+*

 *******************************************************************************

 */

     .global     _frxt_setup_switch

diff --git a/portable/ThirdParty/XCC/Xtensa/portbenchmark.h b/portable/ThirdParty/XCC/Xtensa/portbenchmark.h
index 3df6103..eb33cac 100644
--- a/portable/ThirdParty/XCC/Xtensa/portbenchmark.h
+++ b/portable/ThirdParty/XCC/Xtensa/portbenchmark.h
@@ -1,25 +1,30 @@
-

 /*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

diff --git a/portable/ThirdParty/XCC/Xtensa/portclib.c b/portable/ThirdParty/XCC/Xtensa/portclib.c
index 7268923..d64b0ca 100644
--- a/portable/ThirdParty/XCC/Xtensa/portclib.c
+++ b/portable/ThirdParty/XCC/Xtensa/portclib.c
@@ -1,25 +1,30 @@
-

 /*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 #include "FreeRTOS.h"

diff --git a/portable/ThirdParty/XCC/Xtensa/portmacro.h b/portable/ThirdParty/XCC/Xtensa/portmacro.h
index 00f1140..98059da 100644
--- a/portable/ThirdParty/XCC/Xtensa/portmacro.h
+++ b/portable/ThirdParty/XCC/Xtensa/portmacro.h
@@ -1,9 +1,10 @@
 /*

  * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

  * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * SPDX-License-Identifier: MIT
- *
+ * SPDX-License-Identifier: MIT

+ *

  * Permission is hereby granted, free of charge, to any person obtaining a copy of

  * this software and associated documentation files (the "Software"), to deal in

  * the Software without restriction, including without limitation the rights to

@@ -26,29 +27,6 @@
  *

  */

 

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

- *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

- *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

- *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- */

-

 #ifndef PORTMACRO_H

 #define PORTMACRO_H

 

diff --git a/portable/ThirdParty/XCC/Xtensa/porttrace.h b/portable/ThirdParty/XCC/Xtensa/porttrace.h
index 498444b..15094af 100644
--- a/portable/ThirdParty/XCC/Xtensa/porttrace.h
+++ b/portable/ThirdParty/XCC/Xtensa/porttrace.h
@@ -1,32 +1,37 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

  * This utility helps tracing the entering and exiting from tasks.

  * It maintains a circular buffer of tasks in the order they execute,

  * and their execution time. To enable it, set configUSE_TRACE_FACILITY_2

- * to 1 in FreeRTOSConfig.h. You will also need to download the 

+ * to 1 in FreeRTOSConfig.h. You will also need to download the

  * FreeRTOS_trace patch that contains porttrace.c and the complete version

  * of porttrace.h.

  */

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_api.h b/portable/ThirdParty/XCC/Xtensa/xtensa_api.h
index 1be2905..e7f5a23 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_api.h
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_api.h
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -63,7 +68,7 @@
 /*

 -------------------------------------------------------------------------------

   Call this function to set a handler for the specified interrupt.

- 

+

     n        - Interrupt number.

     f        - Handler function address, NULL to uninstall handler.

     arg      - Argument to be passed to handler.

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_config.h b/portable/ThirdParty/XCC/Xtensa/xtensa_config.h
index 308361f..7036142 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_config.h
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_config.h
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -60,26 +65,26 @@
 * If this is not true, i.e. one or more interrupt handlers make deep calls then

 * the minimum must be increased.

 *

-* If the Xtensa processor configuration includes coprocessors, then space is 

+* If the Xtensa processor configuration includes coprocessors, then space is

 * allocated to save the coprocessor state on the stack.

 *

 * If thread safety is enabled for the C runtime library, (XT_USE_THREAD_SAFE_CLIB

 * is defined) then space is allocated to save the C library context in the TCB.

-* 

+*

 * Allocating insufficient stack space is a common source of hard-to-find errors.

 * During development, it is best to enable the FreeRTOS stack checking features.

 *

 * Usage:

-* 

+*

 * XT_USE_THREAD_SAFE_CLIB -- Define this to a nonzero value to enable thread-safe

 *                            use of the C library. This will require extra stack

 *                            space to be allocated for tasks that use the C library

 *                            reentrant functions. See below for more information.

-* 

+*

 * NOTE: The Xtensa toolchain supports multiple C libraries and not all of them

 * support thread safety. Check your core configuration to see which C library

 * was chosen for your system.

-* 

+*

 * XT_STACK_MIN_SIZE       -- The minimum stack size for any task. It is recommended

 *                            that you do not use a stack smaller than this for any

 *                            task. In case you want to use stacks smaller than this

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_context.S b/portable/ThirdParty/XCC/Xtensa/xtensa_context.S
index 7e10b13..55ce8e0 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_context.S
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_context.S
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -69,7 +74,7 @@
 Its counterpart is _xt_context_restore (which also restores A12, A13).

 

 Caller is expected to have saved PC, PS, A0, A1 (SP), A12, A13 in the frame.

-This function preserves A12 & A13 in order to provide the caller with 2 scratch 

+This function preserves A12 & A13 in order to provide the caller with 2 scratch

 regs that need not be saved over the call to this function. The choice of which

 2 regs to provide is governed by xthal_window_spill_nw and xthal_save_extra_nw,

 to avoid moving data more than necessary. Caller can assign regs accordingly.

@@ -78,7 +83,7 @@
     A0  = Return address in caller.

     A1  = Stack pointer of interrupted thread or handler ("interruptee").

     Original A12, A13 have already been saved in the interrupt stack frame.

-    Other processor state except PC, PS, A0, A1 (SP), A12, A13, is as at the 

+    Other processor state except PC, PS, A0, A1 (SP), A12, A13, is as at the

     point of interruption.

     If windowed ABI, PS.EXCM = 1 (exceptions disabled).

 

@@ -147,8 +152,8 @@
     and underflow exceptions disabled (assured by PS.EXCM == 1).

     */

     s32i    a12, sp, XT_STK_TMP0        /* temp. save stuff in stack frame */

-    s32i    a13, sp, XT_STK_TMP1    

-    s32i    a9,  sp, XT_STK_TMP2    

+    s32i    a13, sp, XT_STK_TMP1

+    s32i    a9,  sp, XT_STK_TMP2

 

     /*

     Save the overlay state if we are supporting overlays. Since we just saved

@@ -168,12 +173,12 @@
     call0   xthal_window_spill_nw       /* preserves only a4,5,8,9,12,13 */

     addi    sp,  sp, -XT_STK_FRMSZ

     l32i    a12, sp, XT_STK_TMP0        /* recover stuff from stack frame */

-    l32i    a13, sp, XT_STK_TMP1    

-    l32i    a9,  sp, XT_STK_TMP2    

+    l32i    a13, sp, XT_STK_TMP1

+    l32i    a9,  sp, XT_STK_TMP2

     #endif

 

     #if XCHAL_EXTRA_SA_SIZE > 0

-    /*  

+    /*

     NOTE: Normally the xthal_save_extra_nw macro only affects address

     registers a2-a5. It is theoretically possible for Xtensa processor

     designers to write TIE that causes more address registers to be

@@ -203,7 +208,7 @@
     !! MUST BE CALLED ONLY BY 'CALL0' INSTRUCTION !!

 

 Restores all Xtensa processor state except PC, PS, A0, A1 (SP) (and in Call0

-ABI, A14, A15 which are preserved by all interrupt handlers) from an interrupt 

+ABI, A14, A15 which are preserved by all interrupt handlers) from an interrupt

 stack frame defined in xtensa_rtos.h .

 Its counterpart is _xt_context_save (whose caller saved A12, A13).

 

@@ -216,7 +221,7 @@
 Exit conditions:

     A0  = Return address in caller.

     A1  = Stack pointer of interrupted thread or handler ("interruptee").

-    Other processor state except PC, PS, A0, A1 (SP), is as at the point 

+    Other processor state except PC, PS, A0, A1 (SP), is as at the point

     of interruption.

 

 *******************************************************************************/

@@ -227,7 +232,7 @@
 _xt_context_restore:

 

     #if XCHAL_EXTRA_SA_SIZE > 0

-    /*  

+    /*

     NOTE: Normally the xthal_restore_extra_nw macro only affects address

     registers a2-a5. It is theoretically possible for Xtensa processor

     designers to write TIE that causes more address registers to be

@@ -297,7 +302,7 @@
 

     /*

     Call0 ABI callee-saved regs a12-15 do not need to be restored here.

-    However a12-13 were saved for scratch before XT_RTOS_INT_ENTER(), 

+    However a12-13 were saved for scratch before XT_RTOS_INT_ENTER(),

     so need to be restored anyway, despite being callee-saved in Call0.

     */

     l32i    a12, sp, XT_STK_A12

@@ -320,7 +325,7 @@
 Called during initialization of the RTOS, before any threads run.

 

 This may be called from normal Xtensa single-threaded application code which

-might use co-processors. The Xtensa run-time initialization enables all 

+might use co-processors. The Xtensa run-time initialization enables all

 co-processors. They must remain enabled here, else a co-processor exception

 might occur outside of a thread, which the exception handler doesn't expect.

 

@@ -361,13 +366,13 @@
 

 _xt_coproc_release

 

-Releases any and all co-processors owned by a given thread. The thread is 

+Releases any and all co-processors owned by a given thread. The thread is

 identified by it's co-processor state save area defined in xtensa_context.h .

 

 Must be called before a thread's co-proc save area is deleted to avoid

 memory corruption when the exception handler tries to save the state.

 May be called when a thread terminates or completes but does not delete

-the co-proc save area, to avoid the exception handler having to save the 

+the co-proc save area, to avoid the exception handler having to save the

 thread's co-proc state before another thread can use it (optimization).

 

 Entry Conditions:

@@ -553,13 +558,13 @@
     s32i    a3, a15, XT_CP_CS_ST        /* update saved CP mask            */

     movi    a13, _xt_coproc_sa_offset   /* array of CP save offsets        */

     l32i    a15, a15, XT_CP_ASA         /* a15 = base of aligned save area */

-    

+

 #if XCHAL_CP0_SA_SIZE

     bbci.l  a2, 0, 2f                   /* CP 0 not enabled                */

     l32i    a14, a13, 0                 /* a14 = _xt_coproc_sa_offset[0]   */

     add     a3, a14, a15                /* a3 = save area for CP 0         */

     xchal_cp0_load a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL

-2:  

+2:

 #endif

 

 #if XCHAL_CP1_SA_SIZE

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_context.h b/portable/ThirdParty/XCC/Xtensa/xtensa_context.h
index 122d236..e416da4 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_context.h
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_context.h
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -78,16 +83,16 @@
   INTERRUPT/EXCEPTION STACK FRAME FOR A THREAD OR NESTED INTERRUPT

 

   A stack frame of this structure is allocated for any interrupt or exception.

-  It goes on the current stack. If the RTOS has a system stack for handling 

-  interrupts, every thread stack must allow space for just one interrupt stack 

+  It goes on the current stack. If the RTOS has a system stack for handling

+  interrupts, every thread stack must allow space for just one interrupt stack

   frame, then nested interrupt stack frames go on the system stack.

 

-  The frame includes basic registers (explicit) and "extra" registers introduced 

+  The frame includes basic registers (explicit) and "extra" registers introduced

   by user TIE or the use of the MAC16 option in the user's Xtensa config.

   The frame size is minimized by omitting regs not applicable to user's config.

 

   For Windowed ABI, this stack frame includes the interruptee's base save area,

-  another base save area to manage gcc nested functions, and a little temporary 

+  another base save area to manage gcc nested functions, and a little temporary

   space to help manage the spilling of the register windows.

 -------------------------------------------------------------------------------

 */

@@ -155,7 +160,7 @@
 

 #else

 

-#define XT_STK_NEXT2            XT_STK_NEXT1   

+#define XT_STK_NEXT2            XT_STK_NEXT1

 

 #endif

 

@@ -172,12 +177,12 @@
 -------------------------------------------------------------------------------

   SOLICITED STACK FRAME FOR A THREAD

 

-  A stack frame of this structure is allocated whenever a thread enters the 

+  A stack frame of this structure is allocated whenever a thread enters the

   RTOS kernel intentionally (and synchronously) to submit to thread scheduling.

   It goes on the current thread's stack.

 

   The solicited frame only includes registers that are required to be preserved

-  by the callee according to the compiler's ABI conventions, some space to save 

+  by the callee according to the compiler's ABI conventions, some space to save

   the return address for returning to the caller, and the caller's PS register.

 

   For Windowed ABI, this stack frame includes the caller's base save area.

@@ -185,7 +190,7 @@
   Note on XT_SOL_EXIT field:

       It is necessary to distinguish a solicited from an interrupt stack frame.

       This field corresponds to XT_STK_EXIT in the interrupt stack frame and is

-      always at the same offset (0). It can be written with a code (usually 0) 

+      always at the same offset (0). It can be written with a code (usually 0)

       to distinguish a solicted frame from an interrupt frame. An RTOS port may

       opt to ignore this field if it has another way of distinguishing frames.

 -------------------------------------------------------------------------------

@@ -230,7 +235,7 @@
   and the context switch of that co-processor is then peformed by the handler.

   Ownership represents which thread's state is currently in the co-processor.

 

-  Co-processors may not be used by interrupt or exception handlers. If an 

+  Co-processors may not be used by interrupt or exception handlers. If an

   co-processor instruction is executed by an interrupt or exception handler,

   the co-processor exception handler will trigger a kernel panic and freeze.

   This restriction is introduced to reduce the overhead of saving and restoring

@@ -241,7 +246,7 @@
   such as in the thread control block or above the thread stack area. It need

   not be in the interrupt stack frame since interrupts don't use co-processors.

 

-  Along with the save area for each co-processor, two bitmasks with flags per 

+  Along with the save area for each co-processor, two bitmasks with flags per

   co-processor (laid out as in the CPENABLE reg) help manage context-switching

   co-processors as efficiently as possible:

 

@@ -257,10 +262,10 @@
 

   XT_CPSTORED

     A bitmask with the same layout as CPENABLE, a bit per co-processor.

-    Indicates whether the state of each co-processor is saved in the state 

+    Indicates whether the state of each co-processor is saved in the state

     save area. When a thread enters the kernel, only the state of co-procs

-    still enabled in CPENABLE is saved. When the co-processor exception 

-    handler assigns ownership of a co-processor to a thread, it restores 

+    still enabled in CPENABLE is saved. When the co-processor exception

+    handler assigns ownership of a co-processor to a thread, it restores

     the saved state only if this bit is set, and clears this bit.

 

   XT_CP_CS_ST

@@ -316,7 +321,7 @@
   For framed functions the frame is created and the return address saved at

   base of frame (Call0 ABI) or as determined by hardware (Windowed ABI).

   For frameless functions, there is no frame and return address remains in a0.

-  Note: Because CPP macros expand to a single line, macros requiring multi-line 

+  Note: Because CPP macros expand to a single line, macros requiring multi-line

   expansions are implemented as assembler macros.

 -------------------------------------------------------------------------------

 */

@@ -329,7 +334,7 @@
     addi    sp, sp, -\size

     s32i    a0, sp, 0

     .endm

-  #define ENTRY0      

+  #define ENTRY0

   #define RET(sz)       ret1    sz

     .macro  ret1 size=0x10

     l32i    a0, sp, 0

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_init.c b/portable/ThirdParty/XCC/Xtensa/xtensa_init.c
index da8bf2d..ba5004d 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_init.c
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_init.c
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -41,7 +46,7 @@
 unsigned _xt_tick_divisor = 0;  /* cached number of cycles per tick */

 

 /*

-Compute and initialize at run-time the tick divisor (the number of 

+Compute and initialize at run-time the tick divisor (the number of

 processor clock cycles in an RTOS tick, used to set the tick timer).

 Called when the processor clock frequency is not known at compile-time.

 */

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_intr.c b/portable/ThirdParty/XCC/Xtensa/xtensa_intr.c
index 846aafb..f9ff4cb 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_intr.c
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_intr.c
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_intr_asm.S b/portable/ThirdParty/XCC/Xtensa/xtensa_intr_asm.S
index 45060f1..d2c6c43 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_intr_asm.S
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_intr_asm.S
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_overlay_os_hook.c b/portable/ThirdParty/XCC/Xtensa/xtensa_overlay_os_hook.c
index 050b495..f0b65c3 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_overlay_os_hook.c
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_overlay_os_hook.c
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_rtos.h b/portable/ThirdParty/XCC/Xtensa/xtensa_rtos.h
index 207a76c..cbe8056 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_rtos.h
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_rtos.h
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -33,10 +38,10 @@
  * Macros in this header map callouts from generic Xtensa files to specific

  * RTOS functions. It may also be included in C source files.

  *

- * Xtensa RTOS ports support all RTOS-compatible configurations of the Xtensa 

- * architecture, using the Xtensa hardware abstraction layer (HAL) to deal 

+ * Xtensa RTOS ports support all RTOS-compatible configurations of the Xtensa

+ * architecture, using the Xtensa hardware abstraction layer (HAL) to deal

  * with configuration specifics.

- * 

+ *

  * Should be included by all Xtensa generic and RTOS port-specific sources.

  */

 

@@ -118,7 +123,7 @@
 *******************************************************************************/

 

 /*

-Inform RTOS of entry into an interrupt handler that will affect it. 

+Inform RTOS of entry into an interrupt handler that will affect it.

 Allows RTOS to manage switch to any system stack and count nesting level.

 Called after minimal context has been saved, with interrupts disabled.

 RTOS port can call0 _xt_context_save to save the rest of the context.

@@ -151,12 +156,12 @@
 #define XT_TICK_PER_SEC     configTICK_RATE_HZ

 

 /*

-Return in a15 the base address of the co-processor state save area for the 

+Return in a15 the base address of the co-processor state save area for the

 thread that triggered a co-processor exception, or 0 if no thread was running.

-The state save area is structured as defined in xtensa_context.h and has size 

+The state save area is structured as defined in xtensa_context.h and has size

 XT_CP_SIZE. Co-processor instructions should only be used in thread code, never

 in interrupt handlers or the RTOS kernel. May only be called from assembly code

-and by the 'call0' instruction. A result of 0 indicates an unrecoverable error. 

+and by the 'call0' instruction. A result of 0 indicates an unrecoverable error.

 The implementation may use only a2-4, a15 (all other regs must be preserved).

 */

 // void* XT_RTOS_CP_STATE(void)

@@ -172,7 +177,7 @@
 case can install its own handler for user exceptions and each interrupt

 priority (level). This consists of an array of function pointers indexed

 by interrupt priority, with index 0 being the user exception handler hook.

-Each entry in the array is initially 0, and may be replaced by a function 

+Each entry in the array is initially 0, and may be replaced by a function

 pointer of type XT_INTEXC_HOOK. A handler may be uninstalled by installing 0.

 

 The handler for low and medium priority obeys ABI conventions so may be coded

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_timer.h b/portable/ThirdParty/XCC/Xtensa/xtensa_timer.h
index 7d7acaa..56fc14c 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_timer.h
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_timer.h
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -53,9 +58,9 @@
 #include    <FreeRTOSConfig.h>

 

 /*

-Select timer to use for periodic tick, and determine its interrupt number 

+Select timer to use for periodic tick, and determine its interrupt number

 and priority. User may specify a timer by defining XT_TIMER_INDEX with -D,

-in which case its validity is checked (it must exist in this core and must 

+in which case its validity is checked (it must exist in this core and must

 not be on a high priority interrupt - an error will be reported in invalid).

 Otherwise select the first low or medium priority interrupt timer available.

 */

@@ -112,16 +117,16 @@
 Set processor clock frequency, used to determine clock divisor for timer tick.

 User should BE SURE TO ADJUST THIS for the Xtensa platform being used.

 If using a supported board via the board-independent API defined in xtbsp.h,

-this may be left undefined and frequency and tick divisor will be computed 

+this may be left undefined and frequency and tick divisor will be computed

 and cached during run-time initialization.

 

 NOTE ON SIMULATOR:

-Under the Xtensa instruction set simulator, the frequency can only be estimated 

+Under the Xtensa instruction set simulator, the frequency can only be estimated

 because it depends on the speed of the host and the version of the simulator.

 Also because it runs much slower than hardware, it is not possible to achieve

 real-time performance for most applications under the simulator. A frequency

 too low does not allow enough time between timer interrupts, starving threads.

-To obtain a more convenient but non-real-time tick duration on the simulator, 

+To obtain a more convenient but non-real-time tick duration on the simulator,

 compile with xt-xcc option "-DXT_SIMULATOR".

 Adjust this frequency to taste (it's not real-time anyway!).

 */

diff --git a/portable/ThirdParty/XCC/Xtensa/xtensa_vectors.S b/portable/ThirdParty/XCC/Xtensa/xtensa_vectors.S
index 224ac87..897075f 100644
--- a/portable/ThirdParty/XCC/Xtensa/xtensa_vectors.S
+++ b/portable/ThirdParty/XCC/Xtensa/xtensa_vectors.S
@@ -1,25 +1,30 @@
-

-/*

- * Copyright (c) 2015-2019 Cadence Design Systems, Inc.

+ /*

+ * FreeRTOS Kernel <DEVELOPMENT BRANCH>

+ * Copyright (C) 2015-2019 Cadence Design Systems, Inc.

+ * Copyright (C) 2021 Amazon.com, Inc. or its affiliates.  All Rights Reserved.

  *

- * Permission is hereby granted, free of charge, to any person obtaining

- * a copy of this software and associated documentation files (the

- * "Software"), to deal in the Software without restriction, including

- * without limitation the rights to use, copy, modify, merge, publish,

- * distribute, sublicense, and/or sell copies of the Software, and to

- * permit persons to whom the Software is furnished to do so, subject to

- * the following conditions:

+ * SPDX-License-Identifier: MIT

  *

- * The above copyright notice and this permission notice shall be included

- * in all copies or substantial portions of the Software.

+ * Permission is hereby granted, free of charge, to any person obtaining a copy of

+ * this software and associated documentation files (the "Software"), to deal in

+ * the Software without restriction, including without limitation the rights to

+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of

+ * the Software, and to permit persons to whom the Software is furnished to do so,

+ * subject to the following conditions:

  *

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ * The above copyright notice and this permission notice shall be included in all

+ * copies or substantial portions of the Software.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS

+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR

+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER

+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN

+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ *

+ * https://www.FreeRTOS.org

+ * https://github.com/FreeRTOS

+ *

  */

 

 /*

@@ -36,14 +41,14 @@
   medium level interrupts, by calling xt_set_interrupt_handler(). These

   handlers can be written in C, and must obey C calling convention. The

   handler table is indexed by the interrupt number. Each handler may be

-  provided with an argument. 

+  provided with an argument.

 

   Note that the system timer interrupt is handled specially, and is

   dispatched to the RTOS-specific handler. This timer cannot be hooked

   by application code.

 

-  Optional hooks are also provided to install a handler per level at 

-  run-time, made available by compiling this source file with 

+  Optional hooks are also provided to install a handler per level at

+  run-time, made available by compiling this source file with

   '-DXT_INTEXC_HOOKS' (useful for automated testing).

 

 !!  This file is a template that usually needs to be modified to handle       !!

@@ -83,10 +88,10 @@
       This allows more flexibility in locating code without the performance

       overhead of the 'l32r' literal data load in cases where the destination

       is in range of 'call0'. There is an additional benefit in that 'call0'

-      has a longer range than 'j' due to the target being word-aligned, so 

+      has a longer range than 'j' due to the target being word-aligned, so

       the 'l32r' sequence is less likely needed.

-   3. The use of 'call0' with -mlongcalls requires that register a0 not be 

-      live at the time of the call, which is always the case for a function 

+   3. The use of 'call0' with -mlongcalls requires that register a0 not be

+      live at the time of the call, which is always the case for a function

       call but needs to be ensured if 'call0' is used as a jump in lieu of 'j'.

    4. This use of 'call0' is independent of the C function call ABI.

 

@@ -292,7 +297,7 @@
 /*

 --------------------------------------------------------------------------------

   Panic handler.

-  Should be reached by call0 (preferable) or jump only. If call0, a0 says where 

+  Should be reached by call0 (preferable) or jump only. If call0, a0 says where

   from. If on simulator, display panic message and abort, else loop indefinitely.

 --------------------------------------------------------------------------------

 */

@@ -326,7 +331,7 @@
 --------------------------------------------------------------------------------

     Hooks to dynamically install handlers for exceptions and interrupts.

     Allows automated regression frameworks to install handlers per test.

-    Consists of an array of function pointers indexed by interrupt level, 

+    Consists of an array of function pointers indexed by interrupt level,

     with index 0 containing the entry for user exceptions.

     Initialized with all 0s, meaning no handler is installed at each level.

     See comment in xtensa_rtos.h for more details.

@@ -358,7 +363,7 @@
   the appropriate stack frame, saves a few vector-specific registers and

   calls XT_RTOS_INT_ENTER to save the rest of the interrupted context

   and enter the RTOS, then sets up a C environment. It then calls the

-  user's interrupt handler code (which may be coded in C) and finally 

+  user's interrupt handler code (which may be coded in C) and finally

   calls XT_RTOS_INT_EXIT to transfer control to the RTOS for scheduling.

 

   While XT_RTOS_INT_EXIT does not return directly to the interruptee,

@@ -734,7 +739,7 @@
 --------------------------------------------------------------------------------

 Co-Processor Exception Handler (jumped to from User Exception Handler).

 These exceptions are generated by co-processor instructions, which are only

-allowed in thread code (not in interrupts or kernel code). This restriction is 

+allowed in thread code (not in interrupts or kernel code). This restriction is

 deliberately imposed to reduce the burden of state-save/restore in interrupts.

 --------------------------------------------------------------------------------

 */

@@ -874,8 +879,8 @@
 

     /*

     The config-specific HAL macro invoked below destroys a2-5, preserves a0-1.

-    It is theoretically possible for Xtensa processor designers to write TIE 

-    that causes more address registers to be affected, but it is generally 

+    It is theoretically possible for Xtensa processor designers to write TIE

+    that causes more address registers to be affected, but it is generally

     unlikely. If that ever happens, more registers needs to be saved/restored

     around this macro invocation, and the value in a15 needs to be recomputed.

     */

@@ -900,8 +905,8 @@
 

     /*

     The config-specific HAL macro invoked below destroys a2-5, preserves a0-1.

-    It is theoretically possible for Xtensa processor designers to write TIE 

-    that causes more address registers to be affected, but it is generally 

+    It is theoretically possible for Xtensa processor designers to write TIE

+    that causes more address registers to be affected, but it is generally

     unlikely. If that ever happens, more registers needs to be saved/restored

     around this macro invocation.

     */

@@ -953,7 +958,7 @@
 -------------------------------------------------------------------------------

 */

 

-    .text   

+    .text

     .type       _xt_lowint1,@function

     .align      4

 

@@ -973,12 +978,12 @@
     /* Save rest of interrupt context and enter RTOS. */

     call0   XT_RTOS_INT_ENTER               /* common RTOS interrupt entry */

 

-    /* !! We are now on the RTOS system stack !! */ 

+    /* !! We are now on the RTOS system stack !! */

 

     /* Set up PS for C, enable interrupts above this level and clear EXCM. */

     #ifdef __XTENSA_CALL0_ABI__

     movi    a0, PS_INTLEVEL(1) | PS_UM

-    #else 

+    #else

     movi    a0, PS_INTLEVEL(1) | PS_UM | PS_WOE

     #endif

     wsr     a0, PS

@@ -1010,7 +1015,7 @@
   the appropriate stack frame, saves a few vector-specific registers and

   calls XT_RTOS_INT_ENTER to save the rest of the interrupted context

   and enter the RTOS, then sets up a C environment. It then calls the

-  user's interrupt handler code (which may be coded in C) and finally 

+  user's interrupt handler code (which may be coded in C) and finally

   calls XT_RTOS_INT_EXIT to transfer control to the RTOS for scheduling.

 

   While XT_RTOS_INT_EXIT does not return directly to the interruptee,

@@ -1392,7 +1397,7 @@
 

 Here are templates for high priority (level 2+) interrupt vectors.

 They assume only one interrupt per level to avoid the burden of identifying

-which interrupts at this level are pending and enabled. This allows for 

+which interrupts at this level are pending and enabled. This allows for

 minimum latency and avoids having to save/restore a2 in addition to a0.

 If more than one interrupt per high priority level is configured, this burden

 is on the handler which in any case must provide a way to save and restore

@@ -1655,12 +1660,12 @@
 

 WINDOW OVERFLOW AND UNDERFLOW EXCEPTION VECTORS AND ALLOCA EXCEPTION HANDLER

 

-Here is the code for each window overflow/underflow exception vector and 

+Here is the code for each window overflow/underflow exception vector and

 (interspersed) efficient code for handling the alloca exception cause.

 Window exceptions are handled entirely in the vector area and are very

-tight for performance. The alloca exception is also handled entirely in 

+tight for performance. The alloca exception is also handled entirely in

 the window vector area so comes at essentially no cost in code size.

-Users should never need to modify them and Cadence Design Systems recommends 

+Users should never need to modify them and Cadence Design Systems recommends

 they do not.

 

 Window handlers go at predetermined vector locations according to the