]> git.sur5r.net Git - freertos/commitdiff
Final tidy up before V7.6.0 zip file creation.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 17 Nov 2013 15:46:08 +0000 (15:46 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 17 Nov 2013 15:46:08 +0000 (15:46 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2105 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

35 files changed:
FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/Makefile [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-PIC32MZ2048_SK.mk [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-genesis.properties [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-impl.mk [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-local-PIC32MZ2048_SK.mk [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-variables.mk [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Package-PIC32MZ2048_SK.bash [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/configurations.xml [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/private/configurations.xml [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/private/private.xml [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/project.properties [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/project.xml [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/main.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/scrap_from_main_blinky.txt [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h [new file with mode: 0644]
FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S [new file with mode: 0644]
FreeRTOS/Source/include/portable.h
FreeRTOS/Source/include/queue.h
FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h [new file with mode: 0644]
FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c [new file with mode: 0644]
FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S [new file with mode: 0644]
FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h [new file with mode: 0644]

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c
new file mode 100644 (file)
index 0000000..f855c74
--- /dev/null
@@ -0,0 +1,116 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/*\r
+ * This file implements functions to access and manipulate the PIC32 hardware\r
+ * without reliance on third party library functions that may be liable to\r
+ * change.\r
+ */\r
+\r
+/* FreeRTOS includes. */\r
+#include "FreeRTOS.h"\r
+\r
+/* Demo includes. */\r
+#include "ConfigPerformance.h"\r
+\r
+#define hwUNLOCK_KEY_0                                 ( 0xAA996655UL )\r
+#define hwUNLOCK_KEY_1                                 ( 0x556699AAUL )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vHardwareConfigurePerformance( void )\r
+{\r
+       /* set PBCLK2 to deliver 40Mhz clock for PMP/I2C/UART/SPI. */\r
+       SYSKEY = hwUNLOCK_KEY_0;\r
+       SYSKEY = hwUNLOCK_KEY_1;\r
+\r
+       /* 200MHz / 5 = 40MHz */\r
+       PB2DIVbits.PBDIV = 0b100;\r
+\r
+       /* Timers use clock PBCLK3, set this to 40MHz. */\r
+       PB3DIVbits.PBDIV = 0b100;\r
+\r
+       /* Ports use PBCLK4. */\r
+       PB4DIVbits.PBDIV = 0b000;\r
+\r
+       SYSKEY = 0;\r
+\r
+       /* Disable interrupts - note taskDISABLE_INTERRUPTS() cannot be used here as\r
+       FreeRTOS does not globally disable interrupt. */\r
+       __builtin_disable_interrupts();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vHardwareUseMultiVectoredInterrupts( void )\r
+{\r
+       /* Enable multi-vector interrupts. */\r
+       _CP0_BIS_CAUSE( 0x00800000U );\r
+       INTCONSET = _INTCON_MVEC_MASK;\r
+       __builtin_enable_interrupts();\r
+}\r
+\r
+\r
+\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h
new file mode 100644 (file)
index 0000000..c07b635
--- /dev/null
@@ -0,0 +1,81 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#ifndef CONFIG_PERFORMANCE_H\r
+#define CONFIG_PERFORMANCE_H\r
+\r
+/*\r
+ * Configures the hardware for maximum performance by setting the speed of the\r
+ * peripheral bus and enabling the cache.\r
+ */\r
+void vHardwareConfigurePerformance( void );\r
+\r
+/* \r
+ * Configure the interrupt controller to use a separate vector for each\r
+ * interrupt.\r
+ */\r
+void vHardwareUseMultiVectoredInterrupts( void );\r
+\r
+#endif /* CONFIG_PERFORMANCE_H */\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h
new file mode 100644 (file)
index 0000000..8e0b9eb
--- /dev/null
@@ -0,0 +1,145 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#ifndef FREERTOS_CONFIG_H\r
+#define FREERTOS_CONFIG_H\r
+\r
+#include <xc.h>\r
+\r
+/*-----------------------------------------------------------\r
+ * Application specific definitions.\r
+ *\r
+ * These definitions should be adjusted for your particular hardware and\r
+ * application requirements.\r
+ *\r
+ * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
+ * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
+ *\r
+ * See http://www.freertos.org/a00110.html.\r
+ *----------------------------------------------------------*/\r
+\r
+#define configUSE_PREEMPTION                                   1\r
+#define configUSE_PORT_OPTIMISED_TASK_SELECTION        1\r
+#define configUSE_QUEUE_SETS                                   1\r
+#define configUSE_IDLE_HOOK                                            0\r
+#define configUSE_TICK_HOOK                                            1\r
+#define configTICK_RATE_HZ                                             ( ( portTickType ) 1000 )\r
+#define configCPU_CLOCK_HZ                                             ( 200000000UL )\r
+#define configPERIPHERAL_CLOCK_HZ                              ( 40000000UL )\r
+#define configMAX_PRIORITIES                                   ( 5UL )\r
+#define configMINIMAL_STACK_SIZE                               ( 190 )\r
+#define configISR_STACK_SIZE                                   ( 300 )\r
+#define configTOTAL_HEAP_SIZE                                  ( ( size_t ) 56000 )\r
+#define configMAX_TASK_NAME_LEN                                        ( 8 )\r
+#define configUSE_TRACE_FACILITY                               0\r
+#define configUSE_16_BIT_TICKS                                 0\r
+#define configIDLE_SHOULD_YIELD                                        1\r
+#define configUSE_MUTEXES                                              1\r
+#define configCHECK_FOR_STACK_OVERFLOW                 3\r
+#define configQUEUE_REGISTRY_SIZE                              0\r
+#define configUSE_RECURSIVE_MUTEXES                            1\r
+#define configUSE_MALLOC_FAILED_HOOK                   1\r
+#define configUSE_APPLICATION_TASK_TAG                 0\r
+#define configUSE_COUNTING_SEMAPHORES                  1\r
+#define configGENERATE_RUN_TIME_STATS                  0\r
+\r
+/* Co-routine definitions. */\r
+#define configUSE_CO_ROUTINES                                  0\r
+#define configMAX_CO_ROUTINE_PRIORITIES                        ( 2 )\r
+\r
+/* Software timer definitions. */\r
+#define configUSE_TIMERS                                               1\r
+#define configTIMER_TASK_PRIORITY                              ( 2 )\r
+#define configTIMER_QUEUE_LENGTH                               5\r
+#define configTIMER_TASK_STACK_DEPTH                   ( configMINIMAL_STACK_SIZE * 2 )\r
+\r
+/* Set the following definitions to 1 to include the API function, or zero\r
+to exclude the API function. */\r
+\r
+#define INCLUDE_vTaskPrioritySet                               1\r
+#define INCLUDE_uxTaskPriorityGet                              1\r
+#define INCLUDE_vTaskDelete                                            1\r
+#define INCLUDE_vTaskCleanUpResources                  0\r
+#define INCLUDE_vTaskSuspend                                   1\r
+#define INCLUDE_vTaskDelayUntil                                        1\r
+#define INCLUDE_vTaskDelay                                             1\r
+#define INCLUDE_uxTaskGetStackHighWaterMark            1\r
+\r
+/* The priority at which the tick interrupt runs.  This should probably be\r
+kept at 1. */\r
+#define configKERNEL_INTERRUPT_PRIORITY                        0x01\r
+\r
+/* The maximum interrupt priority from which FreeRTOS.org API functions can\r
+be called.  Only API functions that end in ...FromISR() can be used within\r
+interrupts. */\r
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY   0x03\r
+\r
+/* Prevent C specific syntax being included in assembly files. */\r
+#ifndef __LANGUAGE_ASSEMBLY\r
+       extern void vAssertCalled( const char * pcFile, unsigned long ulLine );\r
+       #define configASSERT( x ) if( ( x ) == 0  ) vAssertCalled( __FILE__, __LINE__ )\r
+#endif\r
+\r
+#endif /* FREERTOS_CONFIG_H */\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c
new file mode 100644 (file)
index 0000000..e6e8f1b
--- /dev/null
@@ -0,0 +1,214 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/*\r
+ * Interrupt service routines that cannot nest have no special requirements and\r
+ * can be written as per the compiler documentation. However interrupts written\r
+ * in this manner will utilise the stack of whichever task was interrupts,\r
+ * rather than the system stack, necessitating that adequate stack space be\r
+ * allocated to each created task. It is therefore not recommended to write\r
+ * interrupt service routines in this manner.\r
+ *\r
+ * Interrupts service routines that can nest require a simple assembly wrapper.\r
+ * This file is provided as a example of how this is done.\r
+ *\r
+ * The example in this file creates a single task.  The task blocks on a\r
+ * semaphore which is periodically 'given' from a timer interrupt.  The assembly\r
+ * wrapper for the interrupt is implemented in ISRTriggeredTask_isr.S.  The\r
+ * C function called by the assembly wrapper is implemented in this file.\r
+ *\r
+ * The task toggle LED mainISR_TRIGGERED_LED each time it is unblocked by the\r
+ * interrupt.\r
+ */\r
+\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "semphr.h"\r
+\r
+/* Standard demo includes. */\r
+#include "ParTest.h"\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The LED controlled by the ISR triggered task. */\r
+#define mainISR_TRIGGERED_LED                          ( 1 )\r
+\r
+/* Constants used to configure T5. */\r
+#define mainT5PRESCALAR                                                ( 6 )\r
+#define mainT5_SEMAPHORE_RATE                          ( 31250 )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * The task that is periodically triggered by an interrupt, as described at the\r
+ * top of this file.\r
+ */\r
+static void prvISRTriggeredTask( void* pvParameters );\r
+\r
+/*\r
+ * Configures the T5 timer peripheral to generate the interrupts that unblock\r
+ * the task implemented by the prvISRTriggeredTask() function.\r
+ */\r
+static void prvSetupT5( void );\r
+\r
+/* The timer 5 interrupt handler.  As this interrupt uses the FreeRTOS assembly\r
+entry point the IPL setting in the following function prototype has no effect. */\r
+void __attribute__( (interrupt(ipl3), vector(_TIMER_5_VECTOR))) vT5InterruptWrapper( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The semaphore given by the T5 interrupt to unblock the task implemented by\r
+ the prvISRTriggeredTask() function. */\r
+static xSemaphoreHandle xBlockSemaphore = NULL;\r
+/*-----------------------------------------------------------*/\r
+\r
+void vStartISRTriggeredTask( void )\r
+{\r
+       /* Create the task described at the top of this file.  The timer is\r
+       configured by the task itself. */\r
+       xTaskCreate( prvISRTriggeredTask,                                       /* The function that implements the task. */\r
+                               ( const signed char * const ) "ISRt",   /* Text name to help debugging - not used by the kernel. */\r
+                               configMINIMAL_STACK_SIZE,                               /* The size of the stack to allocate to the task - defined in words, not bytes. */\r
+                               NULL,                                                                   /* The parameter to pass into the task.  Not used in this case. */\r
+                               configMAX_PRIORITIES - 1,                               /* The priority at which the task is created. */\r
+                               NULL );                                                                 /* Used to pass a handle to the created task out of the function.  Not used in this case. */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vT5InterruptHandler( void )\r
+{\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+\r
+       /* This function is the handler for the peripheral timer interrupt.\r
+       The interrupt is initially signalled in a separate assembly file\r
+       which switches to the system stack and then calls this function.\r
+       It gives a semaphore which signals the prvISRBlockTask */\r
+\r
+       /* Give the semaphore.  If giving the semaphore causes the task to leave the\r
+       Blocked state, and the priority of the task is higher than the priority of\r
+       the interrupted task, then xHigherPriorityTaskWoken will be set to pdTRUE\r
+       inside the xSemaphoreGiveFromISR() function.  xHigherPriorityTaskWoken is\r
+       later passed into portEND_SWITCHING_ISR(), where a context switch is\r
+       requested if it is pdTRUE.  The context switch ensures the interrupt returns\r
+       directly to the unblocked task. */\r
+       xSemaphoreGiveFromISR( xBlockSemaphore, &xHigherPriorityTaskWoken );\r
+\r
+       /* Clear the interrupt */\r
+       IFS0CLR = _IFS0_T5IF_MASK;\r
+\r
+       /* See comment above the call to xSemaphoreGiveFromISR(). */\r
+       portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvISRTriggeredTask( void* pvParameters )\r
+{\r
+       /* Avoid compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Create the semaphore used to signal this task */\r
+       xBlockSemaphore = xSemaphoreCreateBinary();\r
+\r
+       /* Configure the timer to generate the interrupts. */\r
+       prvSetupT5();\r
+\r
+       for( ;; )\r
+       {\r
+               /* Block on the binary semaphore given by the T5 interrupt. */\r
+               xSemaphoreTake( xBlockSemaphore, portMAX_DELAY );\r
+\r
+               /* Toggle the LED. */\r
+               vParTestToggleLED( mainISR_TRIGGERED_LED );\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupT5( void )\r
+{\r
+       /* Set up timer 5 to generate an interrupt every 50 ms */\r
+       T5CON = 0;\r
+       TMR5 = 0;\r
+       T5CONbits.TCKPS = mainT5PRESCALAR;\r
+       PR5 = mainT5_SEMAPHORE_RATE;\r
+\r
+       /* Setup timer 5 interrupt priority to be the maximum from which interrupt\r
+       safe FreeRTOS API functions can be called.  Interrupt safe FreeRTOS API\r
+       functions are those that end "FromISR". */\r
+       IPC6bits.T5IP = configMAX_SYSCALL_INTERRUPT_PRIORITY;\r
+\r
+       /* Clear the interrupt as a starting condition. */\r
+       IFS0bits.T5IF = 0;\r
+\r
+       /* Enable the interrupt. */\r
+       IEC0bits.T5IE = 1;\r
+\r
+       /* Start the timer. */\r
+       T5CONbits.TON = 1;\r
+}\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S
new file mode 100644 (file)
index 0000000..8fe853f
--- /dev/null
@@ -0,0 +1,98 @@
+/*\r
+    FreeRTOS V7.5.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+\r
+    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\r
+    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS tutorial books are available in pdf and paperback.        *\r
+     *    Complete, revised, and edited pdf reference manuals are also       *\r
+     *    available.                                                         *\r
+     *                                                                       *\r
+     *    Purchasing FreeRTOS documentation will not only help you, by       *\r
+     *    ensuring you get running as quickly as possible and with an        *\r
+     *    in-depth knowledge of how to use FreeRTOS, it will also help       *\r
+     *    the FreeRTOS project to continue with its mission of providing     *\r
+     *    professional grade, cross platform, de facto standard solutions    *\r
+     *    for microcontrollers - completely free of charge!                  *\r
+     *                                                                       *\r
+     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *\r
+     *                                                                       *\r
+     *    Thank you for using FreeRTOS, and thank you for your support!      *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+\r
+    >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
+    distribute a combined work that includes FreeRTOS without being obliged to\r
+    provide the source code for proprietary components outside of the FreeRTOS\r
+    kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\r
+    details. You should have received a copy of the GNU General Public License\r
+    and the FreeRTOS license exception along with FreeRTOS; if not it can be\r
+    viewed here: http://www.freertos.org/a00114.html and also obtained by\r
+    writing to Real Time Engineers Ltd., contact details for whom are available\r
+    on the FreeRTOS WEB site.\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
+    fully thread aware and reentrant UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems, who sell the code with commercial support,\r
+    indemnification and middleware, under the OpenRTOS brand.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+*/\r
+\r
+#include <xc.h>\r
+#include <sys/asm.h>\r
+#include "ISR_Support.h"\r
+\r
+       .set    nomips16\r
+       .set    noreorder\r
+\r
+       .extern vT5InterruptHandler\r
+       .extern xISRStackTop\r
+       .global vT5InterruptWrapper\r
+\r
+       .set    noreorder\r
+       .set    noat\r
+       .ent    vT5InterruptWrapper\r
+\r
+vT5InterruptWrapper:\r
+\r
+       portSAVE_CONTEXT\r
+       jal vT5InterruptHandler\r
+       nop\r
+       portRESTORE_CONTEXT\r
+\r
+       .end    vT5InterruptWrapper\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c
new file mode 100644 (file)
index 0000000..f133d60
--- /dev/null
@@ -0,0 +1,136 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#include "FreeRTOS.h"\r
+#include "IntQueueTimer.h"\r
+#include "IntQueue.h"\r
+\r
+#define timerINTERRUPT3_FREQUENCY      ( 2000UL )\r
+#define timerINTERRUPT4_FREQUENCY      ( 2001UL )\r
+\r
+void vT3InterruptHandler( void );\r
+void vT4InterruptHandler( void );\r
+\r
+/* As these interrupts use the FreeRTOS interrupt entry point, the IPL settings\r
+in the following prototypes have no effect.  The interrupt priorities are set\r
+by the ConfigIntTimerX() library calls in vInitialiseTimerForIntQueueTest(). */\r
+void __attribute__( (interrupt(ipl0), vector(_TIMER_3_VECTOR))) vT3InterruptWrapper( void );\r
+void __attribute__( (interrupt(ipl0), vector(_TIMER_4_VECTOR))) vT4InterruptWrapper( void );\r
+\r
+void vInitialiseTimerForIntQueueTest( void )\r
+{\r
+       /* Timer 1 is used for the tick interrupt, timer 2 is used for the high\r
+       frequency interrupt test.  This file therefore uses timers 3 and 4. */\r
+\r
+       T3CON = 0;\r
+       TMR3 = 0;\r
+       PR3 = ( unsigned short ) ( configPERIPHERAL_CLOCK_HZ / timerINTERRUPT3_FREQUENCY );\r
+\r
+       /* Setup timer 3 interrupt priority to be above the kernel priority. */\r
+       IPC3bits.T3IP = ( configMAX_SYSCALL_INTERRUPT_PRIORITY - 1 );\r
+\r
+       /* Clear the interrupt as a starting condition. */\r
+       IFS0bits.T3IF = 0;\r
+\r
+       /* Enable the interrupt. */\r
+       IEC0bits.T3IE = 1;\r
+\r
+       /* Start the timer. */\r
+       T3CONbits.TON = 1;\r
+\r
+\r
+       /* Do the same for timer 4. */\r
+       T4CON = 0;\r
+       TMR4 = 0;\r
+       PR4 = ( unsigned short ) ( configPERIPHERAL_CLOCK_HZ / timerINTERRUPT4_FREQUENCY );\r
+\r
+       /* Setup timer 4 interrupt priority to be above the kernel priority. */\r
+       IPC4bits.T4IP = configMAX_SYSCALL_INTERRUPT_PRIORITY;\r
+\r
+       /* Clear the interrupt as a starting condition. */\r
+       IFS0bits.T4IF = 0;\r
+\r
+       /* Enable the interrupt. */\r
+       IEC0bits.T4IE = 1;\r
+\r
+       /* Start the timer. */\r
+       T4CONbits.TON = 1;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vT3InterruptHandler( void )\r
+{\r
+       IFS0CLR = _IFS0_T3IF_MASK;\r
+       portEND_SWITCHING_ISR( xFirstTimerHandler() );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vT4InterruptHandler( void )\r
+{\r
+       IFS0CLR = _IFS0_T4IF_MASK;\r
+       portEND_SWITCHING_ISR( xSecondTimerHandler() );\r
+}\r
+\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h
new file mode 100644 (file)
index 0000000..83edd5d
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#ifndef INT_QUEUE_TIMER_H\r
+#define INT_QUEUE_TIMER_H\r
+\r
+void vInitialiseTimerForIntQueueTest( void );\r
+portBASE_TYPE xTimer0Handler( void );\r
+portBASE_TYPE xTimer1Handler( void );\r
+\r
+#endif\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S
new file mode 100644 (file)
index 0000000..c269954
--- /dev/null
@@ -0,0 +1,115 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#include <xc.h>\r
+#include <sys/asm.h>\r
+#include "ISR_Support.h"\r
+\r
+#define portEXC_CODE_MASK ( 0x1f << 2 )\r
+\r
+       .set    nomips16\r
+       .set    noreorder\r
+\r
+       .extern vT3InterruptHandler\r
+       .extern vT4InterruptHandler\r
+\r
+       .global vT3InterruptWrapper\r
+       .global vT4InterruptWrapper\r
+\r
+\r
+/******************************************************************/\r
+\r
+       .set    noreorder\r
+       .set    noat\r
+       .ent    vT3InterruptWrapper\r
+\r
+vT3InterruptWrapper:\r
+\r
+       portSAVE_CONTEXT\r
+\r
+       jal             vT3InterruptHandler\r
+       nop\r
+\r
+       portRESTORE_CONTEXT\r
+\r
+       .end vT3InterruptWrapper\r
+\r
+/******************************************************************/\r
+\r
+       .set    noreorder\r
+       .set    noat\r
+       .ent    vT4InterruptWrapper\r
+\r
+vT4InterruptWrapper:\r
+\r
+       portSAVE_CONTEXT\r
+\r
+       jal     vT4InterruptHandler\r
+       nop\r
+\r
+       portRESTORE_CONTEXT\r
+\r
+       .end vT4InterruptWrapper\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c
new file mode 100644 (file)
index 0000000..419f2dc
--- /dev/null
@@ -0,0 +1,128 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+\r
+/* Demo app includes. */\r
+#include "partest.h"\r
+\r
+#define ptOUTPUT       0\r
+#define ptALL_OFF      0\r
+#define ptNUM_LEDS     3\r
+\r
+/*-----------------------------------------------------------\r
+ * Simple parallel port IO routines.\r
+ *-----------------------------------------------------------*/\r
+\r
+void vParTestInitialise( void )\r
+{\r
+       /* All LEDs output. */\r
+       TRISH = ptOUTPUT;\r
+       LATH = ptALL_OFF;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
+{\r
+unsigned portBASE_TYPE uxLEDBit;\r
+\r
+       if( uxLED < ptNUM_LEDS )\r
+       {\r
+               /* Which port H bit is being modified? */\r
+               uxLEDBit = 1 << uxLED;\r
+\r
+               if( xValue )\r
+               {\r
+                       /* Turn the LED on.   Use of the LATHSET register removes the need\r
+                       to use a critical section. */\r
+                       LATHSET = uxLEDBit;\r
+               }\r
+               else\r
+               {\r
+                       /* Turn the LED off.  Use of the LATHCLR register removes the need\r
+                       to use a critical section. */\r
+                       LATHCLR = uxLEDBit;\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
+{\r
+unsigned portBASE_TYPE uxLEDBit;\r
+\r
+       if( uxLED < ptNUM_LEDS )\r
+       {\r
+               uxLEDBit = 1 << uxLED;\r
+\r
+               /* Use of the LATHINV register removes the need to use a critical \r
+               section. */\r
+               LATHINV = uxLEDBit;\r
+       }\r
+}\r
+\r
+\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/Makefile b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/Makefile
new file mode 100644 (file)
index 0000000..05a3fb1
--- /dev/null
@@ -0,0 +1,108 @@
+#
+#  There exist several targets which are by default empty and which can be 
+#  used for execution of your targets. These targets are usually executed 
+#  before and after some main targets. They are: 
+#
+#     .build-pre:              called before 'build' target
+#     .build-post:             called after 'build' target
+#     .clean-pre:              called before 'clean' target
+#     .clean-post:             called after 'clean' target
+#     .clobber-pre:            called before 'clobber' target
+#     .clobber-post:           called after 'clobber' target
+#     .all-pre:                called before 'all' target
+#     .all-post:               called after 'all' target
+#     .help-pre:               called before 'help' target
+#     .help-post:              called after 'help' target
+#
+#  Targets beginning with '.' are not intended to be called on their own.
+#
+#  Main targets can be executed directly, and they are:
+#  
+#     build                    build a specific configuration
+#     clean                    remove built files from a configuration
+#     clobber                  remove all built files
+#     all                      build all configurations
+#     help                     print help mesage
+#  
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+#  Available make variables:
+#
+#     CND_BASEDIR                base directory for relative paths
+#     CND_DISTDIR                default top distribution directory (build artifacts)
+#     CND_BUILDDIR               default top build directory (object files, ...)
+#     CONF                       name of current configuration
+#     CND_ARTIFACT_DIR_${CONF}   directory of build artifact (current configuration)
+#     CND_ARTIFACT_NAME_${CONF}  name of build artifact (current configuration)
+#     CND_ARTIFACT_PATH_${CONF}  path to build artifact (current configuration)
+#     CND_PACKAGE_DIR_${CONF}    directory of package (current configuration)
+#     CND_PACKAGE_NAME_${CONF}   name of package (current configuration)
+#     CND_PACKAGE_PATH_${CONF}   path to package (current configuration)
+#
+# NOCDDL
+
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post: .build-impl
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+
+.clean-post: .clean-impl
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post: .clobber-impl
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post: .all-impl
+# Add your post 'all' code here...
+
+
+# help
+help: .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post: .help-impl
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
+
+# include project make variables
+include nbproject/Makefile-variables.mk
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-PIC32MZ2048_SK.mk b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-PIC32MZ2048_SK.mk
new file mode 100644 (file)
index 0000000..94b0024
--- /dev/null
@@ -0,0 +1,506 @@
+#
+# Generated Makefile - do not edit!
+#
+# Edit the Makefile in the project folder instead (../Makefile). Each target
+# has a -pre and a -post target defined where you can add customized code.
+#
+# This makefile implements configuration specific macros and targets.
+
+
+# Include project Makefile
+ifeq "${IGNORE_LOCAL}" "TRUE"
+# do not include local makefile. User is passing all local related variables already
+else
+include Makefile
+# Include makefile containing local settings
+ifeq "$(wildcard nbproject/Makefile-local-PIC32MZ2048_SK.mk)" "nbproject/Makefile-local-PIC32MZ2048_SK.mk"
+include nbproject/Makefile-local-PIC32MZ2048_SK.mk
+endif
+endif
+
+# Environment
+MKDIR=gnumkdir -p
+RM=rm -f 
+MV=mv 
+CP=cp 
+
+# Macros
+CND_CONF=PIC32MZ2048_SK
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+IMAGE_TYPE=debug
+OUTPUT_SUFFIX=elf
+DEBUGGABLE_SUFFIX=elf
+FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+else
+IMAGE_TYPE=production
+OUTPUT_SUFFIX=hex
+DEBUGGABLE_SUFFIX=elf
+FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+endif
+
+# Object Directory
+OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
+
+# Distribution Directory
+DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
+
+# Source Files Quoted if spaced
+SOURCEFILES_QUOTED_IF_SPACED=../../Common/Minimal/GenQTest.c ../../Common/Minimal/QPeek.c ../../Common/Minimal/blocktim.c ../../Common/Minimal/flash_timer.c ../../Common/Minimal/semtest.c ../../Common/Minimal/IntQueue.c ../../Common/Minimal/QueueOverwrite.c ../../Common/Minimal/QueueSet.c ../../Common/Minimal/countsem.c ../../Common/Minimal/dynamic.c ../../Common/Minimal/recmutex.c ../../../Source/queue.c ../../../Source/tasks.c ../../../Source/list.c ../../../Source/timers.c ../../../Source/portable/MPLAB/PIC32MZ/port.c ../../../Source/portable/MPLAB/PIC32MZ/port_asm.S ../../../Source/portable/MemMang/heap_4.c ../main.c ../ParTest/ParTest.c ../main_blinky.c ../ConfigPerformance.c ../main_full.c ../RegisterTestTasks.S ../IntQueueTimer.c ../IntQueueTimer_isr.S ../timertest.c ../timertest_isr.S ../ISRTriggeredTask.c ../ISRTriggeredTask_isr.S
+
+# Object Files Quoted if spaced
+OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/_ext/1163846883/GenQTest.o ${OBJECTDIR}/_ext/1163846883/QPeek.o ${OBJECTDIR}/_ext/1163846883/blocktim.o ${OBJECTDIR}/_ext/1163846883/flash_timer.o ${OBJECTDIR}/_ext/1163846883/semtest.o ${OBJECTDIR}/_ext/1163846883/IntQueue.o ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o ${OBJECTDIR}/_ext/1163846883/QueueSet.o ${OBJECTDIR}/_ext/1163846883/countsem.o ${OBJECTDIR}/_ext/1163846883/dynamic.o ${OBJECTDIR}/_ext/1163846883/recmutex.o ${OBJECTDIR}/_ext/449926602/queue.o ${OBJECTDIR}/_ext/449926602/tasks.o ${OBJECTDIR}/_ext/449926602/list.o ${OBJECTDIR}/_ext/449926602/timers.o ${OBJECTDIR}/_ext/332309698/port.o ${OBJECTDIR}/_ext/332309698/port_asm.o ${OBJECTDIR}/_ext/1884096877/heap_4.o ${OBJECTDIR}/_ext/1472/main.o ${OBJECTDIR}/_ext/809743516/ParTest.o ${OBJECTDIR}/_ext/1472/main_blinky.o ${OBJECTDIR}/_ext/1472/ConfigPerformance.o ${OBJECTDIR}/_ext/1472/main_full.o ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o ${OBJECTDIR}/_ext/1472/IntQueueTimer.o ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o ${OBJECTDIR}/_ext/1472/timertest.o ${OBJECTDIR}/_ext/1472/timertest_isr.o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o
+POSSIBLE_DEPFILES=${OBJECTDIR}/_ext/1163846883/GenQTest.o.d ${OBJECTDIR}/_ext/1163846883/QPeek.o.d ${OBJECTDIR}/_ext/1163846883/blocktim.o.d ${OBJECTDIR}/_ext/1163846883/flash_timer.o.d ${OBJECTDIR}/_ext/1163846883/semtest.o.d ${OBJECTDIR}/_ext/1163846883/IntQueue.o.d ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o.d ${OBJECTDIR}/_ext/1163846883/QueueSet.o.d ${OBJECTDIR}/_ext/1163846883/countsem.o.d ${OBJECTDIR}/_ext/1163846883/dynamic.o.d ${OBJECTDIR}/_ext/1163846883/recmutex.o.d ${OBJECTDIR}/_ext/449926602/queue.o.d ${OBJECTDIR}/_ext/449926602/tasks.o.d ${OBJECTDIR}/_ext/449926602/list.o.d ${OBJECTDIR}/_ext/449926602/timers.o.d ${OBJECTDIR}/_ext/332309698/port.o.d ${OBJECTDIR}/_ext/332309698/port_asm.o.d ${OBJECTDIR}/_ext/1884096877/heap_4.o.d ${OBJECTDIR}/_ext/1472/main.o.d ${OBJECTDIR}/_ext/809743516/ParTest.o.d ${OBJECTDIR}/_ext/1472/main_blinky.o.d ${OBJECTDIR}/_ext/1472/ConfigPerformance.o.d ${OBJECTDIR}/_ext/1472/main_full.o.d ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.d ${OBJECTDIR}/_ext/1472/IntQueueTimer.o.d ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.d ${OBJECTDIR}/_ext/1472/timertest.o.d ${OBJECTDIR}/_ext/1472/timertest_isr.o.d ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o.d ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.d
+
+# Object Files
+OBJECTFILES=${OBJECTDIR}/_ext/1163846883/GenQTest.o ${OBJECTDIR}/_ext/1163846883/QPeek.o ${OBJECTDIR}/_ext/1163846883/blocktim.o ${OBJECTDIR}/_ext/1163846883/flash_timer.o ${OBJECTDIR}/_ext/1163846883/semtest.o ${OBJECTDIR}/_ext/1163846883/IntQueue.o ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o ${OBJECTDIR}/_ext/1163846883/QueueSet.o ${OBJECTDIR}/_ext/1163846883/countsem.o ${OBJECTDIR}/_ext/1163846883/dynamic.o ${OBJECTDIR}/_ext/1163846883/recmutex.o ${OBJECTDIR}/_ext/449926602/queue.o ${OBJECTDIR}/_ext/449926602/tasks.o ${OBJECTDIR}/_ext/449926602/list.o ${OBJECTDIR}/_ext/449926602/timers.o ${OBJECTDIR}/_ext/332309698/port.o ${OBJECTDIR}/_ext/332309698/port_asm.o ${OBJECTDIR}/_ext/1884096877/heap_4.o ${OBJECTDIR}/_ext/1472/main.o ${OBJECTDIR}/_ext/809743516/ParTest.o ${OBJECTDIR}/_ext/1472/main_blinky.o ${OBJECTDIR}/_ext/1472/ConfigPerformance.o ${OBJECTDIR}/_ext/1472/main_full.o ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o ${OBJECTDIR}/_ext/1472/IntQueueTimer.o ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o ${OBJECTDIR}/_ext/1472/timertest.o ${OBJECTDIR}/_ext/1472/timertest_isr.o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o
+
+# Source Files
+SOURCEFILES=../../Common/Minimal/GenQTest.c ../../Common/Minimal/QPeek.c ../../Common/Minimal/blocktim.c ../../Common/Minimal/flash_timer.c ../../Common/Minimal/semtest.c ../../Common/Minimal/IntQueue.c ../../Common/Minimal/QueueOverwrite.c ../../Common/Minimal/QueueSet.c ../../Common/Minimal/countsem.c ../../Common/Minimal/dynamic.c ../../Common/Minimal/recmutex.c ../../../Source/queue.c ../../../Source/tasks.c ../../../Source/list.c ../../../Source/timers.c ../../../Source/portable/MPLAB/PIC32MZ/port.c ../../../Source/portable/MPLAB/PIC32MZ/port_asm.S ../../../Source/portable/MemMang/heap_4.c ../main.c ../ParTest/ParTest.c ../main_blinky.c ../ConfigPerformance.c ../main_full.c ../RegisterTestTasks.S ../IntQueueTimer.c ../IntQueueTimer_isr.S ../timertest.c ../timertest_isr.S ../ISRTriggeredTask.c ../ISRTriggeredTask_isr.S
+
+
+CFLAGS=
+ASFLAGS=
+LDLIBSOPTIONS=
+
+############# Tool locations ##########################################
+# If you copy a project from one host to another, the path where the  #
+# compiler is installed may be different.                             #
+# If you open this project with MPLAB X in the new host, this         #
+# makefile will be regenerated and the paths will be corrected.       #
+#######################################################################
+# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build
+FIXDEPS=fixDeps
+
+.build-conf:  ${BUILD_SUBPROJECTS}
+       ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-PIC32MZ2048_SK.mk dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+
+MP_PROCESSOR_OPTION=32MZ2048ECH144
+MP_LINKER_FILE_OPTION=
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: assemble
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+else
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: assembleWithPreprocess
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+${OBJECTDIR}/_ext/332309698/port_asm.o: ../../../Source/portable/MPLAB/PIC32MZ/port_asm.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/332309698 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port_asm.o.d 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port_asm.o 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port_asm.o.ok ${OBJECTDIR}/_ext/332309698/port_asm.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/332309698/port_asm.o.d" "${OBJECTDIR}/_ext/332309698/port_asm.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/332309698/port_asm.o.d"  -o ${OBJECTDIR}/_ext/332309698/port_asm.o ../../../Source/portable/MPLAB/PIC32MZ/port_asm.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/332309698/port_asm.o.asm.d",--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--gdwarf-2,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/RegisterTestTasks.o: ../RegisterTestTasks.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.ok ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.d" "${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.d"  -o ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o ../RegisterTestTasks.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.asm.d",--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--gdwarf-2,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o: ../IntQueueTimer_isr.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.ok ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.d" "${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.d"  -o ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o ../IntQueueTimer_isr.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.asm.d",--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--gdwarf-2,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/timertest_isr.o: ../timertest_isr.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest_isr.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest_isr.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest_isr.o.ok ${OBJECTDIR}/_ext/1472/timertest_isr.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/timertest_isr.o.d" "${OBJECTDIR}/_ext/1472/timertest_isr.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/timertest_isr.o.d"  -o ${OBJECTDIR}/_ext/1472/timertest_isr.o ../timertest_isr.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/timertest_isr.o.asm.d",--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--gdwarf-2,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o: ../ISRTriggeredTask_isr.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.ok ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.d" "${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.d"  -o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o ../ISRTriggeredTask_isr.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.asm.d",--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--gdwarf-2,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+else
+${OBJECTDIR}/_ext/332309698/port_asm.o: ../../../Source/portable/MPLAB/PIC32MZ/port_asm.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/332309698 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port_asm.o.d 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port_asm.o 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port_asm.o.ok ${OBJECTDIR}/_ext/332309698/port_asm.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/332309698/port_asm.o.d" "${OBJECTDIR}/_ext/332309698/port_asm.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/332309698/port_asm.o.d"  -o ${OBJECTDIR}/_ext/332309698/port_asm.o ../../../Source/portable/MPLAB/PIC32MZ/port_asm.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/332309698/port_asm.o.asm.d",--gdwarf-2 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/RegisterTestTasks.o: ../RegisterTestTasks.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.ok ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.d" "${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.d"  -o ${OBJECTDIR}/_ext/1472/RegisterTestTasks.o ../RegisterTestTasks.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/RegisterTestTasks.o.asm.d",--gdwarf-2 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o: ../IntQueueTimer_isr.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.ok ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.d" "${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.d"  -o ${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o ../IntQueueTimer_isr.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/IntQueueTimer_isr.o.asm.d",--gdwarf-2 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/timertest_isr.o: ../timertest_isr.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest_isr.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest_isr.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest_isr.o.ok ${OBJECTDIR}/_ext/1472/timertest_isr.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/timertest_isr.o.d" "${OBJECTDIR}/_ext/1472/timertest_isr.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/timertest_isr.o.d"  -o ${OBJECTDIR}/_ext/1472/timertest_isr.o ../timertest_isr.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/timertest_isr.o.asm.d",--gdwarf-2 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o: ../ISRTriggeredTask_isr.S  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.ok ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.err 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.d" "${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.asm.d" -t $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC} $(MP_EXTRA_AS_PRE)  -c -mprocessor=$(MP_PROCESSOR_OPTION)  -MMD -MF "${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.d"  -o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o ../ISRTriggeredTask_isr.S  -Wa,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_AS_POST),-MD="${OBJECTDIR}/_ext/1472/ISRTriggeredTask_isr.o.asm.d",--gdwarf-2 -I../../../Source/portable/MPLAB/PIC32MZ -I../
+       
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: compile
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+${OBJECTDIR}/_ext/1163846883/GenQTest.o: ../../Common/Minimal/GenQTest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/GenQTest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/GenQTest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/GenQTest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/GenQTest.o.d" -o ${OBJECTDIR}/_ext/1163846883/GenQTest.o ../../Common/Minimal/GenQTest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/QPeek.o: ../../Common/Minimal/QPeek.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QPeek.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QPeek.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/QPeek.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/QPeek.o.d" -o ${OBJECTDIR}/_ext/1163846883/QPeek.o ../../Common/Minimal/QPeek.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/blocktim.o: ../../Common/Minimal/blocktim.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/blocktim.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/blocktim.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/blocktim.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/blocktim.o.d" -o ${OBJECTDIR}/_ext/1163846883/blocktim.o ../../Common/Minimal/blocktim.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/flash_timer.o: ../../Common/Minimal/flash_timer.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/flash_timer.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/flash_timer.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/flash_timer.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/flash_timer.o.d" -o ${OBJECTDIR}/_ext/1163846883/flash_timer.o ../../Common/Minimal/flash_timer.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/semtest.o: ../../Common/Minimal/semtest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/semtest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/semtest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/semtest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/semtest.o.d" -o ${OBJECTDIR}/_ext/1163846883/semtest.o ../../Common/Minimal/semtest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/IntQueue.o: ../../Common/Minimal/IntQueue.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/IntQueue.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/IntQueue.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/IntQueue.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/IntQueue.o.d" -o ${OBJECTDIR}/_ext/1163846883/IntQueue.o ../../Common/Minimal/IntQueue.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o: ../../Common/Minimal/QueueOverwrite.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o.d" -o ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o ../../Common/Minimal/QueueOverwrite.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/QueueSet.o: ../../Common/Minimal/QueueSet.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueSet.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueSet.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/QueueSet.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/QueueSet.o.d" -o ${OBJECTDIR}/_ext/1163846883/QueueSet.o ../../Common/Minimal/QueueSet.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/countsem.o: ../../Common/Minimal/countsem.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/countsem.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/countsem.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/countsem.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/countsem.o.d" -o ${OBJECTDIR}/_ext/1163846883/countsem.o ../../Common/Minimal/countsem.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/dynamic.o: ../../Common/Minimal/dynamic.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/dynamic.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/dynamic.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/dynamic.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/dynamic.o.d" -o ${OBJECTDIR}/_ext/1163846883/dynamic.o ../../Common/Minimal/dynamic.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/recmutex.o: ../../Common/Minimal/recmutex.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/recmutex.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/recmutex.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/recmutex.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/recmutex.o.d" -o ${OBJECTDIR}/_ext/1163846883/recmutex.o ../../Common/Minimal/recmutex.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/queue.o: ../../../Source/queue.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/queue.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/queue.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/queue.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/queue.o.d" -o ${OBJECTDIR}/_ext/449926602/queue.o ../../../Source/queue.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/tasks.o: ../../../Source/tasks.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/tasks.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/tasks.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/tasks.o.d" -o ${OBJECTDIR}/_ext/449926602/tasks.o ../../../Source/tasks.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/list.o: ../../../Source/list.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/list.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/list.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/list.o.d" -o ${OBJECTDIR}/_ext/449926602/list.o ../../../Source/list.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/timers.o: ../../../Source/timers.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/timers.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/timers.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/timers.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/timers.o.d" -o ${OBJECTDIR}/_ext/449926602/timers.o ../../../Source/timers.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/332309698/port.o: ../../../Source/portable/MPLAB/PIC32MZ/port.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/332309698 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port.o.d 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/332309698/port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/332309698/port.o.d" -o ${OBJECTDIR}/_ext/332309698/port.o ../../../Source/portable/MPLAB/PIC32MZ/port.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1884096877/heap_4.o: ../../../Source/portable/MemMang/heap_4.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1884096877 
+       @${RM} ${OBJECTDIR}/_ext/1884096877/heap_4.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1884096877/heap_4.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1884096877/heap_4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1884096877/heap_4.o.d" -o ${OBJECTDIR}/_ext/1884096877/heap_4.o ../../../Source/portable/MemMang/heap_4.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/main.o: ../main.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/main.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/main.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/main.o.d" -o ${OBJECTDIR}/_ext/1472/main.o ../main.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/809743516/ParTest.o: ../ParTest/ParTest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/809743516 
+       @${RM} ${OBJECTDIR}/_ext/809743516/ParTest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/809743516/ParTest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/809743516/ParTest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/809743516/ParTest.o.d" -o ${OBJECTDIR}/_ext/809743516/ParTest.o ../ParTest/ParTest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/main_blinky.o: ../main_blinky.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_blinky.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_blinky.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/main_blinky.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/main_blinky.o.d" -o ${OBJECTDIR}/_ext/1472/main_blinky.o ../main_blinky.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/ConfigPerformance.o: ../ConfigPerformance.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/ConfigPerformance.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/ConfigPerformance.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/ConfigPerformance.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/ConfigPerformance.o.d" -o ${OBJECTDIR}/_ext/1472/ConfigPerformance.o ../ConfigPerformance.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/main_full.o: ../main_full.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_full.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_full.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/main_full.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/main_full.o.d" -o ${OBJECTDIR}/_ext/1472/main_full.o ../main_full.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/IntQueueTimer.o: ../IntQueueTimer.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/IntQueueTimer.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/IntQueueTimer.o.d" -o ${OBJECTDIR}/_ext/1472/IntQueueTimer.o ../IntQueueTimer.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/timertest.o: ../timertest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/timertest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/timertest.o.d" -o ${OBJECTDIR}/_ext/1472/timertest.o ../timertest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o: ../ISRTriggeredTask.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist  -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o.d" -o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o ../ISRTriggeredTask.c    -Wall -Wextra
+       
+else
+${OBJECTDIR}/_ext/1163846883/GenQTest.o: ../../Common/Minimal/GenQTest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/GenQTest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/GenQTest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/GenQTest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/GenQTest.o.d" -o ${OBJECTDIR}/_ext/1163846883/GenQTest.o ../../Common/Minimal/GenQTest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/QPeek.o: ../../Common/Minimal/QPeek.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QPeek.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QPeek.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/QPeek.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/QPeek.o.d" -o ${OBJECTDIR}/_ext/1163846883/QPeek.o ../../Common/Minimal/QPeek.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/blocktim.o: ../../Common/Minimal/blocktim.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/blocktim.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/blocktim.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/blocktim.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/blocktim.o.d" -o ${OBJECTDIR}/_ext/1163846883/blocktim.o ../../Common/Minimal/blocktim.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/flash_timer.o: ../../Common/Minimal/flash_timer.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/flash_timer.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/flash_timer.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/flash_timer.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/flash_timer.o.d" -o ${OBJECTDIR}/_ext/1163846883/flash_timer.o ../../Common/Minimal/flash_timer.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/semtest.o: ../../Common/Minimal/semtest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/semtest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/semtest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/semtest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/semtest.o.d" -o ${OBJECTDIR}/_ext/1163846883/semtest.o ../../Common/Minimal/semtest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/IntQueue.o: ../../Common/Minimal/IntQueue.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/IntQueue.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/IntQueue.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/IntQueue.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/IntQueue.o.d" -o ${OBJECTDIR}/_ext/1163846883/IntQueue.o ../../Common/Minimal/IntQueue.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o: ../../Common/Minimal/QueueOverwrite.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o.d" -o ${OBJECTDIR}/_ext/1163846883/QueueOverwrite.o ../../Common/Minimal/QueueOverwrite.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/QueueSet.o: ../../Common/Minimal/QueueSet.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueSet.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/QueueSet.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/QueueSet.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/QueueSet.o.d" -o ${OBJECTDIR}/_ext/1163846883/QueueSet.o ../../Common/Minimal/QueueSet.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/countsem.o: ../../Common/Minimal/countsem.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/countsem.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/countsem.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/countsem.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/countsem.o.d" -o ${OBJECTDIR}/_ext/1163846883/countsem.o ../../Common/Minimal/countsem.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/dynamic.o: ../../Common/Minimal/dynamic.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/dynamic.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/dynamic.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/dynamic.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/dynamic.o.d" -o ${OBJECTDIR}/_ext/1163846883/dynamic.o ../../Common/Minimal/dynamic.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1163846883/recmutex.o: ../../Common/Minimal/recmutex.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1163846883 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/recmutex.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1163846883/recmutex.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1163846883/recmutex.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1163846883/recmutex.o.d" -o ${OBJECTDIR}/_ext/1163846883/recmutex.o ../../Common/Minimal/recmutex.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/queue.o: ../../../Source/queue.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/queue.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/queue.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/queue.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/queue.o.d" -o ${OBJECTDIR}/_ext/449926602/queue.o ../../../Source/queue.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/tasks.o: ../../../Source/tasks.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/tasks.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/tasks.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/tasks.o.d" -o ${OBJECTDIR}/_ext/449926602/tasks.o ../../../Source/tasks.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/list.o: ../../../Source/list.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/list.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/list.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/list.o.d" -o ${OBJECTDIR}/_ext/449926602/list.o ../../../Source/list.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/449926602/timers.o: ../../../Source/timers.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/449926602 
+       @${RM} ${OBJECTDIR}/_ext/449926602/timers.o.d 
+       @${RM} ${OBJECTDIR}/_ext/449926602/timers.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/449926602/timers.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/449926602/timers.o.d" -o ${OBJECTDIR}/_ext/449926602/timers.o ../../../Source/timers.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/332309698/port.o: ../../../Source/portable/MPLAB/PIC32MZ/port.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/332309698 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port.o.d 
+       @${RM} ${OBJECTDIR}/_ext/332309698/port.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/332309698/port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/332309698/port.o.d" -o ${OBJECTDIR}/_ext/332309698/port.o ../../../Source/portable/MPLAB/PIC32MZ/port.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1884096877/heap_4.o: ../../../Source/portable/MemMang/heap_4.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1884096877 
+       @${RM} ${OBJECTDIR}/_ext/1884096877/heap_4.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1884096877/heap_4.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1884096877/heap_4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1884096877/heap_4.o.d" -o ${OBJECTDIR}/_ext/1884096877/heap_4.o ../../../Source/portable/MemMang/heap_4.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/main.o: ../main.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/main.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/main.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/main.o.d" -o ${OBJECTDIR}/_ext/1472/main.o ../main.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/809743516/ParTest.o: ../ParTest/ParTest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/809743516 
+       @${RM} ${OBJECTDIR}/_ext/809743516/ParTest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/809743516/ParTest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/809743516/ParTest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/809743516/ParTest.o.d" -o ${OBJECTDIR}/_ext/809743516/ParTest.o ../ParTest/ParTest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/main_blinky.o: ../main_blinky.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_blinky.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_blinky.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/main_blinky.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/main_blinky.o.d" -o ${OBJECTDIR}/_ext/1472/main_blinky.o ../main_blinky.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/ConfigPerformance.o: ../ConfigPerformance.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/ConfigPerformance.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/ConfigPerformance.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/ConfigPerformance.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/ConfigPerformance.o.d" -o ${OBJECTDIR}/_ext/1472/ConfigPerformance.o ../ConfigPerformance.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/main_full.o: ../main_full.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_full.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/main_full.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/main_full.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/main_full.o.d" -o ${OBJECTDIR}/_ext/1472/main_full.o ../main_full.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/IntQueueTimer.o: ../IntQueueTimer.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/IntQueueTimer.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/IntQueueTimer.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/IntQueueTimer.o.d" -o ${OBJECTDIR}/_ext/1472/IntQueueTimer.o ../IntQueueTimer.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/timertest.o: ../timertest.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/timertest.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/timertest.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/timertest.o.d" -o ${OBJECTDIR}/_ext/1472/timertest.o ../timertest.c    -Wall -Wextra
+       
+${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o: ../ISRTriggeredTask.c  nbproject/Makefile-${CND_CONF}.mk
+       @${MKDIR} ${OBJECTDIR}/_ext/1472 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o.d 
+       @${RM} ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o 
+       @${FIXDEPS} "${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o.d" $(SILENT) -rsi ${MP_CC_DIR}../  -c ${MP_CC}  $(MP_EXTRA_CC_PRE)  -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"../../../Source/include" -I"../../../Source/portable/MPLAB/PIC32MZ" -I"../../Common/include" -I"../" -Wall -MMD -MF "${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o.d" -o ${OBJECTDIR}/_ext/1472/ISRTriggeredTask.o ../ISRTriggeredTask.c    -Wall -Wextra
+       
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: compileCPP
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+else
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: link
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES}  nbproject/Makefile-${CND_CONF}.mk    
+       @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} 
+       ${MP_CC} $(MP_EXTRA_LD_PRE)  -mdebugger -D__MPLAB_DEBUGGER_PK3=1 -mprocessor=$(MP_PROCESSOR_OPTION)  -o dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}           -mreserve=data@0x0:0x27F   -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1,--defsym=_min_heap_size=0,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"
+       
+else
+dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES}  nbproject/Makefile-${CND_CONF}.mk   
+       @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} 
+       ${MP_CC} $(MP_EXTRA_LD_PRE)  -mprocessor=$(MP_PROCESSOR_OPTION)  -o dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}          -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=_min_heap_size=0,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"
+       ${MP_CC_DIR}\\xc32-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} 
+endif
+
+
+# Subprojects
+.build-subprojects:
+
+
+# Subprojects
+.clean-subprojects:
+
+# Clean Targets
+.clean-conf: ${CLEAN_SUBPROJECTS}
+       ${RM} -r build/PIC32MZ2048_SK
+       ${RM} -r dist/PIC32MZ2048_SK
+
+# Enable dependency checking
+.dep.inc: .depcheck-impl
+
+DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES})
+ifneq (${DEPFILES},)
+include ${DEPFILES}
+endif
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-genesis.properties b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-genesis.properties
new file mode 100644 (file)
index 0000000..3694f5a
--- /dev/null
@@ -0,0 +1,8 @@
+#\r
+#Wed Nov 06 11:50:32 GMT 2013\r
+PIC32MZ2048_SK.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.30-TC9\\bin\r
+PIC32MZ2048_SK.languagetoolchain.version=1.30\r
+com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=40187da407bdeaa7cd9b46222921dc29\r
+host.platform=windows\r
+conf.ids=PIC32MZ2048_SK\r
+PIC32MZ2048_SK.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=17fa0f767981f346ca4a53c17aed08b0\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-impl.mk b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-impl.mk
new file mode 100644 (file)
index 0000000..da02e68
--- /dev/null
@@ -0,0 +1,69 @@
+#
+# Generated Makefile - do not edit!
+#
+# Edit the Makefile in the project folder instead (../Makefile). Each target
+# has a pre- and a post- target defined where you can add customization code.
+#
+# This makefile implements macros and targets common to all configurations.
+#
+# NOCDDL
+
+
+# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
+# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
+# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
+# and .clean-reqprojects-conf unless SUB has the value 'no'
+SUB_no=NO
+SUBPROJECTS=${SUB_${SUB}}
+BUILD_SUBPROJECTS_=.build-subprojects
+BUILD_SUBPROJECTS_NO=
+BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
+CLEAN_SUBPROJECTS_=.clean-subprojects
+CLEAN_SUBPROJECTS_NO=
+CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
+
+
+# Project Name
+PROJECTNAME=RTOSDemo.X
+
+# Active Configuration
+DEFAULTCONF=PIC32MZ2048_SK
+CONF=${DEFAULTCONF}
+
+# All Configurations
+ALLCONFS=PIC32MZ2048_SK 
+
+
+# build
+.build-impl: .build-pre
+       ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
+
+
+# clean
+.clean-impl: .clean-pre
+       ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
+
+# clobber
+.clobber-impl: .clobber-pre .depcheck-impl
+           ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=PIC32MZ2048_SK clean
+
+
+
+# all
+.all-impl: .all-pre .depcheck-impl
+           ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=PIC32MZ2048_SK build
+
+
+
+# dependency checking support
+.depcheck-impl:
+#      @echo "# This code depends on make tool being used" >.dep.inc
+#      @if [ -n "${MAKE_VERSION}" ]; then \
+#          echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
+#          echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
+#          echo "include \$${DEPFILES}" >>.dep.inc; \
+#          echo "endif" >>.dep.inc; \
+#      else \
+#          echo ".KEEP_STATE:" >>.dep.inc; \
+#          echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
+#      fi
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-local-PIC32MZ2048_SK.mk b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-local-PIC32MZ2048_SK.mk
new file mode 100644 (file)
index 0000000..3c5d594
--- /dev/null
@@ -0,0 +1,37 @@
+#
+# Generated Makefile - do not edit!
+#
+#
+# This file contains information about the location of compilers and other tools.
+# If you commmit this file into your revision control server, you will be able to 
+# to checkout the project and build it from the command line with make. However,
+# if more than one person works on the same project, then this file might show
+# conflicts since different users are bound to have compilers in different places.
+# In that case you might choose to not commit this file and let MPLAB X recreate this file
+# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
+# least once so the file gets created and the project can be built. Finally, you can also
+# avoid using this file at all if you are only building from the command line with make.
+# You can invoke make with the values of the macros:
+# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...  
+#
+SHELL=cmd.exe
+PATH_TO_IDE_BIN=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/
+# Adding MPLAB X bin directory to path.
+PATH:=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH)
+# Path to java used to run MPLAB X when this makefile was created
+MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.7.0_25-windows\java-windows/bin/"
+OS_CURRENT="$(shell uname -s)"
+MP_CC="C:\devtools\Microchip\xc32\v1.30-TC9\bin\xc32-gcc.exe"
+MP_CPPC="C:\devtools\Microchip\xc32\v1.30-TC9\bin\xc32-g++.exe"
+# MP_BC is not defined
+MP_AS="C:\devtools\Microchip\xc32\v1.30-TC9\bin\xc32-as.exe"
+MP_LD="C:\devtools\Microchip\xc32\v1.30-TC9\bin\xc32-ld.exe"
+MP_AR="C:\devtools\Microchip\xc32\v1.30-TC9\bin\xc32-ar.exe"
+DEP_GEN=${MP_JAVA_PATH}java -jar "C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" 
+MP_CC_DIR="C:\devtools\Microchip\xc32\v1.30-TC9\bin"
+MP_CPPC_DIR="C:\devtools\Microchip\xc32\v1.30-TC9\bin"
+# MP_BC_DIR is not defined
+MP_AS_DIR="C:\devtools\Microchip\xc32\v1.30-TC9\bin"
+MP_LD_DIR="C:\devtools\Microchip\xc32\v1.30-TC9\bin"
+MP_AR_DIR="C:\devtools\Microchip\xc32\v1.30-TC9\bin"
+# MP_BC_DIR is not defined
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-variables.mk b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Makefile-variables.mk
new file mode 100644 (file)
index 0000000..571e551
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# Generated - do not edit!
+#
+# NOCDDL
+#
+CND_BASEDIR=`pwd`
+# PIC32MZ2048_SK configuration
+CND_ARTIFACT_DIR_PIC32MZ2048_SK=dist/PIC32MZ2048_SK/production
+CND_ARTIFACT_NAME_PIC32MZ2048_SK=RTOSDemo.X.production.hex
+CND_ARTIFACT_PATH_PIC32MZ2048_SK=dist/PIC32MZ2048_SK/production/RTOSDemo.X.production.hex
+CND_PACKAGE_DIR_PIC32MZ2048_SK=${CND_DISTDIR}/PIC32MZ2048_SK/package
+CND_PACKAGE_NAME_PIC32MZ2048_SK=rtosdemo.x.tar
+CND_PACKAGE_PATH_PIC32MZ2048_SK=${CND_DISTDIR}/PIC32MZ2048_SK/package/rtosdemo.x.tar
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Package-PIC32MZ2048_SK.bash b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/Package-PIC32MZ2048_SK.bash
new file mode 100644 (file)
index 0000000..aa05477
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/bash -x
+
+#
+# Generated - do not edit!
+#
+
+# Macros
+TOP=`pwd`
+CND_CONF=PIC32MZ2048_SK
+CND_DISTDIR=dist
+TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
+TMPDIRNAME=tmp-packaging
+OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+OUTPUT_BASENAME=RTOSDemo.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+PACKAGE_TOP_DIR=rtosdemo.x/
+
+# Functions
+function checkReturnCode
+{
+    rc=$?
+    if [ $rc != 0 ]
+    then
+        exit $rc
+    fi
+}
+function makeDirectory
+# $1 directory path
+# $2 permission (optional)
+{
+    mkdir -p "$1"
+    checkReturnCode
+    if [ "$2" != "" ]
+    then
+      chmod $2 "$1"
+      checkReturnCode
+    fi
+}
+function copyFileToTmpDir
+# $1 from-file path
+# $2 to-file path
+# $3 permission
+{
+    cp "$1" "$2"
+    checkReturnCode
+    if [ "$3" != "" ]
+    then
+        chmod $3 "$2"
+        checkReturnCode
+    fi
+}
+
+# Setup
+cd "${TOP}"
+mkdir -p ${CND_DISTDIR}/${CND_CONF}/package
+rm -rf ${TMPDIR}
+mkdir -p ${TMPDIR}
+
+# Copy files and create directories and links
+cd "${TOP}"
+makeDirectory ${TMPDIR}/rtosdemo.x/bin
+copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
+
+
+# Generate tar file
+cd "${TOP}"
+rm -f ${CND_DISTDIR}/${CND_CONF}/package/rtosdemo.x.tar
+cd ${TMPDIR}
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/rtosdemo.x.tar *
+checkReturnCode
+
+# Cleanup
+cd "${TOP}"
+rm -rf ${TMPDIR}
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/configurations.xml b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/configurations.xml
new file mode 100644 (file)
index 0000000..e68215b
--- /dev/null
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<configurationDescriptor version="62">\r
+  <logicalFolder name="root" displayName="root" projectFiles="true">\r
+    <logicalFolder name="HeaderFiles"\r
+                   displayName="Header Files"\r
+                   projectFiles="true">\r
+      <logicalFolder name="f1" displayName="FreeRTOS Source" projectFiles="true">\r
+        <itemPath>../../../Source/include/portable.h</itemPath>\r
+        <itemPath>../../../Source/include/task.h</itemPath>\r
+        <itemPath>../../../Source/include/croutine.h</itemPath>\r
+        <itemPath>../../../Source/include/FreeRTOS.h</itemPath>\r
+        <itemPath>../../../Source/include/list.h</itemPath>\r
+        <itemPath>../../../Source/include/projdefs.h</itemPath>\r
+        <itemPath>../../../Source/include/queue.h</itemPath>\r
+        <itemPath>../../../Source/include/semphr.h</itemPath>\r
+        <itemPath>../../../Source/portable/MPLAB/PIC32MZ/ISR_Support.h</itemPath>\r
+        <itemPath>../../../Source/portable/MPLAB/PIC32MZ/portmacro.h</itemPath>\r
+      </logicalFolder>\r
+      <itemPath>../FreeRTOSConfig.h</itemPath>\r
+    </logicalFolder>\r
+    <logicalFolder name="LinkerScript"\r
+                   displayName="Linker Files"\r
+                   projectFiles="true">\r
+    </logicalFolder>\r
+    <logicalFolder name="SourceFiles"\r
+                   displayName="Source Files"\r
+                   projectFiles="true">\r
+      <logicalFolder name="f1" displayName="Common Demo Source" projectFiles="true">\r
+        <itemPath>../../Common/Minimal/GenQTest.c</itemPath>\r
+        <itemPath>../../Common/Minimal/QPeek.c</itemPath>\r
+        <itemPath>../../Common/Minimal/blocktim.c</itemPath>\r
+        <itemPath>../../Common/Minimal/flash_timer.c</itemPath>\r
+        <itemPath>../../Common/Minimal/semtest.c</itemPath>\r
+        <itemPath>../../Common/Minimal/IntQueue.c</itemPath>\r
+        <itemPath>../../Common/Minimal/QueueOverwrite.c</itemPath>\r
+        <itemPath>../../Common/Minimal/QueueSet.c</itemPath>\r
+        <itemPath>../../Common/Minimal/countsem.c</itemPath>\r
+        <itemPath>../../Common/Minimal/dynamic.c</itemPath>\r
+        <itemPath>../../Common/Minimal/recmutex.c</itemPath>\r
+      </logicalFolder>\r
+      <logicalFolder name="FreeRTOS Source"\r
+                     displayName="FreeRTOS Source"\r
+                     projectFiles="true">\r
+        <itemPath>../../../Source/queue.c</itemPath>\r
+        <itemPath>../../../Source/tasks.c</itemPath>\r
+        <itemPath>../../../Source/list.c</itemPath>\r
+        <itemPath>../../../Source/timers.c</itemPath>\r
+        <itemPath>../../../Source/portable/MPLAB/PIC32MZ/port.c</itemPath>\r
+        <itemPath>../../../Source/portable/MPLAB/PIC32MZ/port_asm.S</itemPath>\r
+        <itemPath>../../../Source/portable/MemMang/heap_4.c</itemPath>\r
+      </logicalFolder>\r
+      <itemPath>../main.c</itemPath>\r
+      <itemPath>../ParTest/ParTest.c</itemPath>\r
+      <itemPath>../main_blinky.c</itemPath>\r
+      <itemPath>../ConfigPerformance.c</itemPath>\r
+      <itemPath>../main_full.c</itemPath>\r
+      <itemPath>../RegisterTestTasks.S</itemPath>\r
+      <itemPath>../IntQueueTimer.c</itemPath>\r
+      <itemPath>../IntQueueTimer_isr.S</itemPath>\r
+      <itemPath>../timertest.c</itemPath>\r
+      <itemPath>../timertest_isr.S</itemPath>\r
+      <itemPath>../ISRTriggeredTask.c</itemPath>\r
+      <itemPath>../ISRTriggeredTask_isr.S</itemPath>\r
+    </logicalFolder>\r
+    <logicalFolder name="ExternalFiles"\r
+                   displayName="Important Files"\r
+                   projectFiles="false">\r
+      <itemPath>Makefile</itemPath>\r
+    </logicalFolder>\r
+  </logicalFolder>\r
+  <sourceRootList>\r
+    <Elem>../</Elem>\r
+    <Elem>../../../Source/portable/MPLAB/PIC32MZ</Elem>\r
+    <Elem>../../Common/Minimal</Elem>\r
+    <Elem>../../../Source/portable/MemMang</Elem>\r
+  </sourceRootList>\r
+  <projectmakefile>Makefile</projectmakefile>\r
+  <confs>\r
+    <conf name="PIC32MZ2048_SK" type="2">\r
+      <toolsSet>\r
+        <developmentServer>localhost</developmentServer>\r
+        <targetDevice>PIC32MZ2048ECH144</targetDevice>\r
+        <targetHeader></targetHeader>\r
+        <targetPluginBoard></targetPluginBoard>\r
+        <platformTool>PKOBSKDEPlatformTool</platformTool>\r
+        <languageToolchain>XC32</languageToolchain>\r
+        <languageToolchainVersion>1.30</languageToolchainVersion>\r
+        <platform>3</platform>\r
+      </toolsSet>\r
+      <compileType>\r
+        <linkerTool>\r
+          <linkerLibItems>\r
+          </linkerLibItems>\r
+        </linkerTool>\r
+        <loading>\r
+          <useAlternateLoadableFile>false</useAlternateLoadableFile>\r
+          <alternateLoadableFile></alternateLoadableFile>\r
+        </loading>\r
+      </compileType>\r
+      <makeCustomizationType>\r
+        <makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>\r
+        <makeCustomizationPreStep></makeCustomizationPreStep>\r
+        <makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>\r
+        <makeCustomizationPostStep></makeCustomizationPostStep>\r
+        <makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>\r
+        <makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>\r
+        <makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>\r
+      </makeCustomizationType>\r
+      <C32>\r
+        <property key="additional-warnings" value="true"/>\r
+        <property key="enable-app-io" value="false"/>\r
+        <property key="enable-omit-frame-pointer" value="false"/>\r
+        <property key="enable-symbols" value="true"/>\r
+        <property key="enable-unroll-loops" value="false"/>\r
+        <property key="exclude-floating-point" value="false"/>\r
+        <property key="extra-include-directories"\r
+                  value="../../../Source/include;../../../Source/portable/MPLAB/PIC32MZ;../../Common/include;../"/>\r
+        <property key="generate-16-bit-code" value="false"/>\r
+        <property key="isolate-each-function" value="false"/>\r
+        <property key="make-warnings-into-errors" value="false"/>\r
+        <property key="optimization-level" value=""/>\r
+        <property key="place-data-into-section" value="false"/>\r
+        <property key="post-instruction-scheduling" value="default"/>\r
+        <property key="pre-instruction-scheduling" value="default"/>\r
+        <property key="preprocessor-macros" value=""/>\r
+        <property key="strict-ansi" value="false"/>\r
+        <property key="support-ansi" value="false"/>\r
+        <property key="use-cci" value="false"/>\r
+        <property key="use-iar" value="false"/>\r
+        <property key="use-indirect-calls" value="false"/>\r
+        <appendMe value="-Wall -Wextra"/>\r
+      </C32>\r
+      <C32-AS>\r
+        <property key="assembler-symbols" value=""/>\r
+        <property key="enable-symbols" value="true"/>\r
+        <property key="exclude-floating-point-library" value="false"/>\r
+        <property key="expand-macros" value="false"/>\r
+        <property key="extra-include-directories-for-assembler" value=""/>\r
+        <property key="extra-include-directories-for-preprocessor" value=""/>\r
+        <property key="false-conditionals" value="false"/>\r
+        <property key="keep-locals" value="false"/>\r
+        <property key="list-assembly" value="false"/>\r
+        <property key="list-source" value="false"/>\r
+        <property key="list-symbols" value="false"/>\r
+        <property key="oXC32asm-list-to-file" value="false"/>\r
+        <property key="omit-debug-dirs" value="false"/>\r
+        <property key="omit-forms" value="false"/>\r
+        <property key="preprocessor-macros" value=""/>\r
+        <property key="warning-level" value=""/>\r
+        <appendMe value="-I../../../Source/portable/MPLAB/PIC32MZ -I../"/>\r
+      </C32-AS>\r
+      <C32-LD>\r
+        <property key="additional-options-use-response-files" value="false"/>\r
+        <property key="enable-check-sections" value="false"/>\r
+        <property key="exclude-floating-point-library" value="false"/>\r
+        <property key="exclude-standard-libraries" value="false"/>\r
+        <property key="extra-lib-directories" value=""/>\r
+        <property key="generate-16-bit-code" value="false"/>\r
+        <property key="generate-cross-reference-file" value="false"/>\r
+        <property key="heap-size" value="0"/>\r
+        <property key="input-libraries" value=""/>\r
+        <property key="linker-symbols" value=""/>\r
+        <property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>\r
+        <property key="no-startup-files" value="false"/>\r
+        <property key="oXC32ld-extra-opts" value=""/>\r
+        <property key="optimization-level" value=""/>\r
+        <property key="preprocessor-macros" value=""/>\r
+        <property key="remove-unused-sections" value="false"/>\r
+        <property key="report-memory-usage" value="false"/>\r
+        <property key="stack-size" value=""/>\r
+        <property key="symbol-stripping" value=""/>\r
+        <property key="trace-symbols" value=""/>\r
+        <property key="warn-section-align" value="false"/>\r
+      </C32-LD>\r
+      <C32CPP>\r
+        <property key="additional-warnings" value="false"/>\r
+        <property key="check-new" value="false"/>\r
+        <property key="eh-specs" value="true"/>\r
+        <property key="enable-app-io" value="false"/>\r
+        <property key="enable-omit-frame-pointer" value="false"/>\r
+        <property key="enable-symbols" value="true"/>\r
+        <property key="enable-unroll-loops" value="false"/>\r
+        <property key="exceptions" value="true"/>\r
+        <property key="exclude-floating-point" value="false"/>\r
+        <property key="extra-include-directories" value=""/>\r
+        <property key="generate-16-bit-code" value="false"/>\r
+        <property key="isolate-each-function" value="false"/>\r
+        <property key="make-warnings-into-errors" value="false"/>\r
+        <property key="optimization-level" value=""/>\r
+        <property key="place-data-into-section" value="false"/>\r
+        <property key="post-instruction-scheduling" value="default"/>\r
+        <property key="pre-instruction-scheduling" value="default"/>\r
+        <property key="preprocessor-macros" value=""/>\r
+        <property key="rtti" value="true"/>\r
+        <property key="strict-ansi" value="false"/>\r
+        <property key="use-cci" value="false"/>\r
+        <property key="use-iar" value="false"/>\r
+        <property key="use-indirect-calls" value="false"/>\r
+      </C32CPP>\r
+      <C32Global>\r
+        <property key="legacy-libc" value="false"/>\r
+        <property key="save-temps" value="false"/>\r
+        <property key="wpo-lto" value="false"/>\r
+      </C32Global>\r
+      <PKOBSKDEPlatformTool>\r
+        <property key="AutoSelectMemRanges" value="auto"/>\r
+        <property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>\r
+        <property key="ToolFirmwareFilePath"\r
+                  value="Press to browse for a specific firmware version"/>\r
+        <property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>\r
+        <property key="memories.configurationmemory" value="false"/>\r
+        <property key="memories.eeprom" value="false"/>\r
+        <property key="memories.id" value="false"/>\r
+        <property key="memories.programmemory" value="true"/>\r
+        <property key="memories.programmemory.end" value="0x1d1fffff"/>\r
+        <property key="memories.programmemory.start" value="0x1d000000"/>\r
+        <property key="poweroptions.powerenable" value="false"/>\r
+        <property key="programoptions.eraseb4program" value="true"/>\r
+        <property key="programoptions.preserveeeprom" value="false"/>\r
+        <property key="programoptions.preserveprogramrange" value="false"/>\r
+        <property key="programoptions.preserveprogramrange.end" value="0x1d0007ff"/>\r
+        <property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>\r
+        <property key="programoptions.usehighvoltageonmclr" value="false"/>\r
+        <property key="programoptions.uselvpprogramming" value="false"/>\r
+        <property key="voltagevalue" value="3.25"/>\r
+      </PKOBSKDEPlatformTool>\r
+    </conf>\r
+  </confs>\r
+</configurationDescriptor>\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/private/configurations.xml b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/private/configurations.xml
new file mode 100644 (file)
index 0000000..6401d28
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<configurationDescriptor version="62">\r
+  <projectmakefile>Makefile</projectmakefile>\r
+  <defaultConf>0</defaultConf>\r
+  <confs>\r
+    <conf name="PIC32MZ2048_SK" type="2">\r
+      <platformToolSN>:=MPLABCommUSB:=04D8:=8107:=0002:=Microchip Technology Incorporated:=PIC32MZ EC Family:=MTI132990155:=x:=h:=en</platformToolSN>\r
+      <languageToolchainDir>C:\devtools\Microchip\xc32\v1.30-TC9\bin</languageToolchainDir>\r
+      <mdbdebugger version="1">\r
+        <placeholder1>place holder 1</placeholder1>\r
+        <placeholder2>place holder 2</placeholder2>\r
+      </mdbdebugger>\r
+      <runprofile version="6">\r
+        <args></args>\r
+        <rundir></rundir>\r
+        <buildfirst>true</buildfirst>\r
+        <console-type>0</console-type>\r
+        <terminal-type>0</terminal-type>\r
+        <remove-instrumentation>0</remove-instrumentation>\r
+        <environment>\r
+        </environment>\r
+      </runprofile>\r
+    </conf>\r
+  </confs>\r
+</configurationDescriptor>\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/private/private.xml b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/private/private.xml
new file mode 100644 (file)
index 0000000..4c4d050
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project-private xmlns="http://www.netbeans.org/ns/project-private/1">\r
+    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>\r
+    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">\r
+        <file>file:/C:/E/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c</file>\r
+    </open-files>\r
+</project-private>\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/project.properties b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/project.properties
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/project.xml b/FreeRTOS/Demo/PIC32MZ_MPLAB/RTOSDemo.X/nbproject/project.xml
new file mode 100644 (file)
index 0000000..34bfa24
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">\r
+    <type>com.microchip.mplab.nbide.embedded.makeproject</type>\r
+    <configuration>\r
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">\r
+            <name>RTOSDemo</name>\r
+            <creation-uuid>55ff5cee-2e70-4454-810e-9beac606f4f5</creation-uuid>\r
+            <make-project-type>0</make-project-type>\r
+            <c-extensions>c</c-extensions>\r
+            <cpp-extensions/>\r
+            <header-extensions>h</header-extensions>\r
+            <sourceEncoding>ISO-8859-1</sourceEncoding>\r
+            <make-dep-projects/>\r
+        </data>\r
+    </configuration>\r
+</project>\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S
new file mode 100644 (file)
index 0000000..6c1af04
--- /dev/null
@@ -0,0 +1,628 @@
+       /*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+#include <xc.h>\r
+#include <sys/asm.h>\r
+\r
+       .set    nomips16\r
+       .set    noreorder\r
+\r
+\r
+       .global vRegTest1\r
+       .global vRegTest2\r
+\r
+       .set    noreorder\r
+       .set    noat\r
+       .ent    error_loop\r
+\r
+/* Reg test tasks call the error loop when they find an error.  Sitting in the\r
+tight error loop prevents them incrementing their ulRegTestnCycles counter, and\r
+so allows the check softwate timer to know an error has been found. */\r
+error_loop:\r
+       b               .\r
+       nop\r
+\r
+       .end error_loop\r
+\r
+\r
+       .set    noreorder\r
+       .set    noat\r
+       .ent    vRegTest1\r
+\r
+vRegTest1:\r
+       /* Fill the registers with known values. */\r
+       addiu   $1, $0, 0x11\r
+       addiu   $2, $0, 0x12\r
+       addiu   $3, $0, 0x13\r
+       /* $4 contains the address of the loop counter - don't mess with $4. */\r
+       addiu   $5, $0, 0x15\r
+       addiu   $6, $0, 0x16\r
+       addiu   $7, $0, 0x17\r
+       addiu   $8, $0, 0x18\r
+       addiu   $9, $0, 0x19\r
+       addiu   $10, $0, 0x110\r
+       addiu   $11, $0, 0x111\r
+       addiu   $12, $0, 0x112\r
+       addiu   $13, $0, 0x113\r
+       addiu   $14, $0, 0x114\r
+       addiu   $15, $0, 0x115\r
+       addiu   $16, $0, 0x116\r
+       addiu   $17, $0, 0x117\r
+       addiu   $18, $0, 0x118\r
+       addiu   $19, $0, 0x119\r
+       addiu   $20, $0, 0x120\r
+       addiu   $21, $0, 0x121\r
+       addiu   $23, $0, 0x123\r
+       addiu   $24, $0, 0x124\r
+       addiu   $25, $0, 0x125\r
+       addiu   $30, $0, 0x130\r
+       addiu   $22, $0, 0x131\r
+       mthi    $22, $ac1\r
+       addiu   $22, $0, 0x132\r
+       mtlo    $22, $ac1\r
+       addiu   $22, $0, 0x133\r
+       mthi    $22, $ac2\r
+       addiu   $22, $0, 0x134\r
+       mtlo    $22, $ac2\r
+       addiu   $22, $0, 0x135\r
+       mthi    $22, $ac3\r
+       addiu   $22, $0, 0x136\r
+       mtlo    $22, $ac3\r
+\r
+vRegTest1Loop:\r
+       /* Check each register maintains the value assigned to it for the lifetime\r
+       of the task. */\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $1, -0x11\r
+       beq             $22, $0, .+16\r
+       nop\r
+       /* The register value was not that expected.  Jump to the error loop so the\r
+       cycle counter stops incrementing. */\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $2, -0x12\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $3, -0x13\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $5, -0x15\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $6, -0x16\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $7, -0x17\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $8, -0x18\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $9, -0x19\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $10, -0x110\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $11, -0x111\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $12, -0x112\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $13, -0x113\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $14, -0x114\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $15, -0x115\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $16, -0x116\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $17, -0x117\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $18, -0x118\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $19, -0x119\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $20, -0x120\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $21, -0x121\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $23, -0x123\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $24, -0x124\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $25, -0x125\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $30, -0x130\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mfhi    $22, $ac1\r
+       addiu   $22, $22, -0x131\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mflo    $22, $ac1\r
+       addiu   $22, $22, -0x132\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mfhi    $22, $ac2\r
+       addiu   $22, $22, -0x133\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mflo    $22, $ac2\r
+       addiu   $22, $22, -0x134\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mfhi    $22, $ac3\r
+       addiu   $22, $22, -0x135\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mflo    $22, $ac3\r
+       addiu   $22, $22, -0x136\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       /* No errors detected.  Increment the loop count so the check timer knows\r
+       this task is still running without error, then loop back to do it all\r
+       again.  The address of the loop counter is in $4. */\r
+       lw              $22, 0( $4 )\r
+       addiu   $22, $22, 0x01\r
+       sw              $22, 0( $4 )\r
+       b               vRegTest1Loop\r
+       nop\r
+\r
+       .end    vRegTest1\r
+\r
+\r
+       .set    noreorder\r
+       .set    noat\r
+       .ent    vRegTest2\r
+\r
+vRegTest2:\r
+       addiu   $1, $0, 0x21\r
+       addiu   $2, $0, 0x22\r
+       addiu   $3, $0, 0x23\r
+       /* $4 contains the address of the loop counter - don't mess with $4. */\r
+       addiu   $5, $0, 0x25\r
+       addiu   $6, $0, 0x26\r
+       addiu   $7, $0, 0x27\r
+       addiu   $8, $0, 0x28\r
+       addiu   $9, $0, 0x29\r
+       addiu   $10, $0, 0x210\r
+       addiu   $11, $0, 0x211\r
+       addiu   $12, $0, 0x212\r
+       addiu   $13, $0, 0x213\r
+       addiu   $14, $0, 0x214\r
+       addiu   $15, $0, 0x215\r
+       addiu   $16, $0, 0x216\r
+       addiu   $17, $0, 0x217\r
+       addiu   $18, $0, 0x218\r
+       addiu   $19, $0, 0x219\r
+       addiu   $20, $0, 0x220\r
+       addiu   $21, $0, 0x221\r
+       addiu   $23, $0, 0x223\r
+       addiu   $24, $0, 0x224\r
+       addiu   $25, $0, 0x225\r
+       addiu   $30, $0, 0x230\r
+       addiu   $22, $0, 0x231\r
+       mthi    $22, $ac1\r
+       addiu   $22, $0, 0x232\r
+       mtlo    $22, $ac1\r
+       addiu   $22, $0, 0x233\r
+       mthi    $22, $ac2\r
+       addiu   $22, $0, 0x234\r
+       mtlo    $22, $ac2\r
+       addiu   $22, $0, 0x235\r
+       mthi    $22, $ac3\r
+       addiu   $22, $0, 0x236\r
+       mtlo    $22, $ac3\r
+\r
+vRegTest2Loop:\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $1, -0x21\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $2, -0x22\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $3, -0x23\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $5, -0x25\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $6, -0x26\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $7, -0x27\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $8, -0x28\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $9, -0x29\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $10, -0x210\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $11, -0x211\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $12, -0x212\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $13, -0x213\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $14, -0x214\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $15, -0x215\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $16, -0x216\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $17, -0x217\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $18, -0x218\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $19, -0x219\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $20, -0x220\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $21, -0x221\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $23, -0x223\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $24, -0x224\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $25, -0x225\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       addiu   $22, $0, 0x00\r
+       addiu   $22, $30, -0x230\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mfhi    $22, $ac1\r
+       addiu   $22, $22, -0x231\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mflo    $22, $ac1\r
+       addiu   $22, $22, -0x232\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mfhi    $22, $ac2\r
+       addiu   $22, $22, -0x233\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mflo    $22, $ac2\r
+       addiu   $22, $22, -0x234\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mfhi    $22, $ac3\r
+       addiu   $22, $22, -0x235\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       mflo    $22, $ac3\r
+       addiu   $22, $22, -0x236\r
+       beq             $22, $0, .+16\r
+       nop\r
+       b               error_loop\r
+       nop\r
+\r
+       /* No errors detected.  Increment the loop count so the check timer knows\r
+       this task is still running without error, then loop back to do it all\r
+       again.  The address of the loop counter is in $4. */\r
+       lw              $22, 0( $4 )\r
+       addiu   $22, $22, 0x01\r
+       sw              $22, 0( $4 )\r
+       b               vRegTest2Loop\r
+       nop\r
+\r
+       .end    vRegTest2\r
+\r
+\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c
new file mode 100644 (file)
index 0000000..8fb0f2b
--- /dev/null
@@ -0,0 +1,292 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/******************************************************************************\r
+ * This project provides two demo applications.  A simple blinky style project,\r
+ * and a more comprehensive test and demo application.  The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to\r
+ * select between the two.  The simply blinky demo is implemented and described\r
+ * in main_blinky.c.  The more comprehensive test and demo application is\r
+ * implemented and described in main_full.c.\r
+ *\r
+ * This file implements the code that is not demo specific, including the\r
+ * hardware setup and FreeRTOS hook functions.\r
+ */\r
+\r
+/* Kernel includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Standard demo includes. */\r
+#include "partest.h"\r
+#include "QueueOverwrite.h"\r
+#include "QueueSet.h"\r
+\r
+/* Hardware specific includes. */\r
+#include "ConfigPerformance.h"\r
+\r
+/* Core configuration fuse settings */\r
+#pragma config FMIIEN = OFF, FETHIO = OFF, PGL1WAY = OFF, PMDL1WAY = OFF, IOL1WAY = OFF, FUSBIDIO = OFF\r
+#pragma config FNOSC = SPLL, FSOSCEN = OFF, IESO = OFF, POSCMOD = EC\r
+#pragma config OSCIOFNC = OFF, FCKSM = CSECMD, FWDTEN = OFF, FDMTEN = OFF\r
+#pragma config DMTINTV = WIN_127_128, WDTSPGM = STOP, WINDIS= NORMAL\r
+#pragma config WDTPS = PS1048576, FWDTWINSZ = WINSZ_25, DMTCNT = DMT31\r
+#pragma config FPLLIDIV = DIV_3, FPLLRNG = RANGE_13_26_MHZ, FPLLICLK = PLL_POSC\r
+#pragma config FPLLMULT = MUL_50, FPLLODIV = DIV_2, UPLLFSEL = FREQ_12MHZ, UPLLEN = OFF\r
+#pragma config EJTAGBEN = NORMAL, DBGPER = PG_ALL, FSLEEP = OFF, FECCCON = OFF_UNLOCKED\r
+#pragma config BOOTISA = MIPS32, TRCEN = ON, ICESEL = ICS_PGx2, JTAGEN = OFF, DEBUG = ON\r
+#pragma config CP = OFF\r
+#pragma config_alt FWDTEN=OFF\r
+#pragma config_alt USERID = 0x1234u\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
+or 0 to run the more comprehensive test and demo application. */\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     0\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Set up the hardware ready to run this demo.\r
+ */\r
+static void prvSetupHardware( void );\r
+\r
+/*\r
+ * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
+ */\r
+extern void main_blinky( void );\r
+extern void main_full( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Create the demo tasks then start the scheduler.\r
+ */\r
+int main( void )\r
+{\r
+       /* Prepare the hardware to run this demo. */\r
+       prvSetupHardware();\r
+\r
+       /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
+       of this file. */\r
+       #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1\r
+       {\r
+               main_blinky();\r
+       }\r
+       #else\r
+       {\r
+               main_full();\r
+       }\r
+       #endif\r
+\r
+       return 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupHardware( void )\r
+{\r
+       /* Configure the hardware for maximum performance. */\r
+       vHardwareConfigurePerformance();\r
+\r
+       /* Setup to use the external interrupt controller. */\r
+       vHardwareUseMultiVectoredInterrupts();\r
+\r
+       portDISABLE_INTERRUPTS();\r
+\r
+       /* Setup the digital IO for the LED's. */\r
+       vParTestInitialise();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationMallocFailedHook( void )\r
+{\r
+       /* vApplicationMallocFailedHook() will only be called if\r
+       configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h.  It is a hook\r
+       function that will get called if a call to pvPortMalloc() fails.\r
+       pvPortMalloc() is called internally by the kernel whenever a task, queue,\r
+       timer or semaphore is created.  It is also called by various parts of the\r
+       demo application.  If heap_1.c or heap_2.c are used, then the size of the\r
+       heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in\r
+       FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used\r
+       to query the size of free heap space that remains (although it does not\r
+       provide information on how the remaining heap might be fragmented). */\r
+       taskDISABLE_INTERRUPTS();\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationIdleHook( void )\r
+{\r
+       /* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set\r
+       to 1 in FreeRTOSConfig.h.  It will be called on each iteration of the idle\r
+       task.  It is essential that code added to this hook function never attempts\r
+       to block in any way (for example, call xQueueReceive() with a block time\r
+       specified, or call vTaskDelay()).  If the application makes use of the\r
+       vTaskDelete() API function (as this demo application does) then it is also\r
+       important that vApplicationIdleHook() is permitted to return to its calling\r
+       function, because it is the responsibility of the idle task to clean up\r
+       memory allocated by the kernel to any task that has since been deleted. */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName )\r
+{\r
+       ( void ) pcTaskName;\r
+       ( void ) pxTask;\r
+\r
+       /* Run time task stack overflow checking is performed if\r
+       configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2.  This hook function is\r
+       called if a task stack overflow is detected.  Note the system/interrupt\r
+       stack is not checked. */\r
+       taskDISABLE_INTERRUPTS();\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationTickHook( void )\r
+{\r
+       /* This function will be called by each tick interrupt if\r
+       configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h.  User code can be\r
+       added here, but the tick hook is called from an interrupt context, so\r
+       code must not attempt to block, and only the interrupt safe FreeRTOS API\r
+       functions can be used (those that end in FromISR()). */\r
+\r
+       #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )\r
+       {\r
+               /* Call the periodic queue overwrite from ISR demo. */\r
+               vQueueOverwritePeriodicISRDemo();\r
+\r
+               /* Call the queue set ISR test function. */\r
+               vQueueSetAccessQueueSetFromISR();\r
+       }\r
+       #endif\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+extern void vAssertCalled( const char * pcFile, unsigned long ulLine )\r
+{\r
+volatile char *pcFileName;\r
+volatile unsigned long ulLineNumber;\r
+\r
+       /* Prevent things that are useful to view in the debugger from being\r
+       optimised away. */\r
+       pcFileName = ( char * ) pcFile;\r
+       ( void ) pcFileName;\r
+       ulLineNumber = ulLine;\r
+\r
+       /* Set ulLineNumber to 0 in the debugger to break out of this loop and\r
+       return to the line that triggered the assert. */\r
+       while( ulLineNumber != 0 )\r
+       {\r
+               __asm volatile( "NOP" );\r
+               __asm volatile( "NOP" );\r
+               __asm volatile( "NOP" );\r
+               __asm volatile( "NOP" );\r
+               __asm volatile( "NOP" );\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/* This function overrides the normal _weak_ generic handler. */\r
+void _general_exception_handler(void)\r
+{\r
+static enum {\r
+       EXCEP_IRQ = 0,  /* interrupt */\r
+       EXCEP_AdEL = 4, /* address error exception (load or ifetch) */\r
+       EXCEP_AdES,     /* address error exception (store) */\r
+       EXCEP_IBE,              /* bus error (ifetch) */\r
+       EXCEP_DBE,              /* bus error (load/store) */\r
+       EXCEP_Sys,              /* syscall */\r
+       EXCEP_Bp,               /* breakpoint */\r
+       EXCEP_RI,               /* reserved instruction */\r
+       EXCEP_CpU,              /* coprocessor unusable */\r
+       EXCEP_Overflow, /* arithmetic overflow */\r
+       EXCEP_Trap,     /* trap (possible divide by zero) */\r
+       EXCEP_IS1 = 16, /* implementation specfic 1 */\r
+       EXCEP_CEU,              /* CorExtend Unuseable */\r
+       EXCEP_C2E               /* coprocessor 2 */\r
+} _excep_code;\r
+\r
+static unsigned long _epc_code;\r
+static unsigned long _excep_addr;\r
+\r
+    asm volatile( "mfc0 %0,$13" : "=r" (_epc_code) );\r
+    asm volatile( "mfc0 %0,$14" : "=r" (_excep_addr) );\r
+\r
+    _excep_code = ( _epc_code & 0x0000007C ) >> 2;\r
+\r
+    for( ;; )\r
+       {\r
+               /* Examine _excep_code to identify the type of exception.  Examine\r
+               _excep_addr to find the address that caused the exception */\r
+               LATHSET = 0x0007;\r
+               Nop();\r
+               Nop();\r
+               Nop();\r
+    }\r
+}\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c
new file mode 100644 (file)
index 0000000..e4aba61
--- /dev/null
@@ -0,0 +1,285 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/******************************************************************************\r
+ * NOTE 1:  This project provides two demo applications.  A simple blinky style\r
+ * project, and a more comprehensive test and demo application.  The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
+ * between the two.  See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
+ * in main.c.  This file implements the simply blinky style version.\r
+ *\r
+ * NOTE 2:  This file only contains the source code that is specific to the\r
+ * basic demo.  Generic functions, such FreeRTOS hook functions, and functions\r
+ * required to configure the hardware, are defined in main.c.\r
+ ******************************************************************************\r
+ *\r
+ * main_blinky() creates one queue, two tasks, and one software timer.  It then\r
+ * starts the scheduler.\r
+ *\r
+ * The Blinky Software Timer:\r
+ * This demonstrates an auto-reload software timer.  The timer callback function\r
+ * does nothing but toggle an LED.\r
+ *\r
+ * The Queue Send Task:\r
+ * The queue send task is implemented by prvQueueSendTask() in main_blinky.c.\r
+ * prvQueueSendTask() repeatedly blocks for 200 milliseconds before sending the\r
+ * value 100 to the queue that was created in main_blinky().\r
+ *\r
+ * The Queue Receive Task:\r
+ * The queue receive task is implemented by prvQueueReceiveTask() in\r
+ * main_blinky.c.  prvQueueReceiveTask() repeatedly blocks on attempts to read\r
+ * from the queue that was created in main_blinky(), toggling an LED each time\r
+ * data is received. The queue send task sends data to the queue every 200\r
+ * milliseconds, so the LED will toggle every 200 milliseconds.\r
+ */\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+\r
+/* Kernel includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "queue.h"\r
+#include "timers.h"\r
+\r
+/* Standard demo includes. */\r
+#include "partest.h"\r
+#include "semphr.h"\r
+\r
+/* Priorities at which the tasks are created. */\r
+#define mainQUEUE_SEND_TASK_PRIORITY   ( tskIDLE_PRIORITY + 1 )\r
+#define mainQUEUE_RECEIVE_TASK_PRIORITY        ( tskIDLE_PRIORITY + 2 )\r
+\r
+/* The rate at which data is sent to the queue.  The 200ms value is converted\r
+to ticks using the portTICK_RATE_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS            ( 200 / portTICK_RATE_MS )\r
+\r
+/* The number of items the queue can hold.  This is 1 as the receive task\r
+will remove items as they are added, meaning the send task should always find\r
+the queue empty. */\r
+#define mainQUEUE_LENGTH                               ( 1 )\r
+\r
+/* Values passed to the two tasks just to check the task parameter\r
+functionality. */\r
+#define mainQUEUE_SEND_PARAMETER               ( 0x1111UL )\r
+#define mainQUEUE_RECEIVE_PARAMETER            ( 0x22UL )\r
+\r
+/* The period of the blinky software timer.  The period is specified in ms and\r
+converted to ticks using the portTICK_RATE_MS constant. */\r
+#define mainBLINKY_TIMER_PERIOD                        ( 50 / portTICK_RATE_MS )\r
+\r
+/* The LED used by the communicating tasks and the blinky timer respectively. */\r
+#define mainTASKS_LED                                  ( 0 )\r
+#define mainTIMER_LED                                  ( 1 )\r
+\r
+/* Misc. */\r
+#define mainDONT_BLOCK                                 ( 0 )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * The tasks as described in the comments at the top of this file.\r
+ */\r
+static void prvQueueReceiveTask( void *pvParameters );\r
+static void prvQueueSendTask( void *pvParameters );\r
+\r
+/*\r
+ * The callback function for the blinky software timer, as described at the top\r
+ * of this file.\r
+ */\r
+static void prvBlinkyTimerCallback( xTimerHandle xTimer );\r
+\r
+/*\r
+ * Called by main() to create the simply blinky style application if\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ */\r
+void main_blinky( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The queue used by both tasks. */\r
+static xQueueHandle xQueue = NULL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void main_blinky( void )\r
+{\r
+xTimerHandle xTimer;\r
+\r
+       /* Create the queue. */\r
+       xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );\r
+       configASSERT( xQueue );\r
+\r
+       if( xQueue != NULL )\r
+       {\r
+               /* Create the two tasks as described in the comments at the top of this\r
+               file. */\r
+               xTaskCreate(    prvQueueReceiveTask,                                    /* The function that implements the task. */\r
+                                               ( signed char * ) "Rx",                                 /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
+                                               configMINIMAL_STACK_SIZE,                               /* The size of the stack to allocate to the task. */\r
+                                               ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */\r
+                                               mainQUEUE_RECEIVE_TASK_PRIORITY,                /* The priority assigned to the task. */\r
+                                               NULL );                                                                 /* The task handle is not required, so NULL is passed. */\r
+\r
+               xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
+\r
+\r
+               /* Create the blinky software timer as described at the top of this file. */\r
+               xTimer = xTimerCreate(  ( const signed char * ) "Blinky",/* A text name, purely to help debugging. */\r
+                                                               ( mainBLINKY_TIMER_PERIOD ),    /* The timer period. */\r
+                                                               pdTRUE,                                                 /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+                                                               ( void * ) 0,                                   /* The ID is not used, so can be set to anything. */\r
+                                                               prvBlinkyTimerCallback );               /* The callback function that inspects the status of all the other tasks. */\r
+               configASSERT( xTimer );\r
+\r
+               if( xTimer != NULL )\r
+               {\r
+                       xTimerStart( xTimer, mainDONT_BLOCK );\r
+               }\r
+\r
+               /* Start the tasks and timer running. */\r
+               vTaskStartScheduler();\r
+       }\r
+\r
+       /* If all is well, the scheduler will now be running, and the following\r
+       line will never be reached.  If the following line does execute, then\r
+       there was insufficient FreeRTOS heap memory available for the idle and/or\r
+       timer tasks     to be created.  See the memory management section on the\r
+       FreeRTOS web site for more details. http://www.freertos.org/a00111.html */\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvQueueSendTask( void *pvParameters )\r
+{\r
+portTickType xNextWakeTime;\r
+const unsigned long ulValueToSend = 100UL;\r
+\r
+       /* Remove compiler warnigns in the case that configASSERT() is not dfined. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Check the task parameter is as expected. */\r
+       configASSERT( ( ( unsigned long ) pvParameters ) == mainQUEUE_SEND_PARAMETER );\r
+\r
+       /* Initialise xNextWakeTime - this only needs to be done once. */\r
+       xNextWakeTime = xTaskGetTickCount();\r
+\r
+       for( ;; )\r
+       {\r
+               /* Place this task in the blocked state until it is time to run again.\r
+               The block time is specified in ticks, the constant used converts ticks\r
+               to ms.  While in the Blocked state this task will not consume any CPU\r
+               time. */\r
+               vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );\r
+\r
+               /* Send to the queue - causing the queue receive task to unblock and\r
+               toggle the LED.  0 is used as the block time so the sending operation\r
+               will not block - it shouldn't need to block as the queue should always\r
+               be empty at this point in the code. */\r
+               xQueueSend( xQueue, &ulValueToSend, 0U );\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvQueueReceiveTask( void *pvParameters )\r
+{\r
+unsigned long ulReceivedValue;\r
+\r
+       /* Remove compiler warnings in the case where configASSERT() is not defined. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Check the task parameter is as expected. */\r
+       configASSERT( ( ( unsigned long ) pvParameters ) == mainQUEUE_RECEIVE_PARAMETER );\r
+\r
+       for( ;; )\r
+       {\r
+               /* Wait until something arrives in the queue - this task will block\r
+               indefinitely provided INCLUDE_vTaskSuspend is set to 1 in\r
+               FreeRTOSConfig.h. */\r
+               xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );\r
+\r
+               /*  To get here something must have been received from the queue, but\r
+               is it the expected value?  If it is, toggle the LED. */\r
+               if( ulReceivedValue == 100UL )\r
+               {\r
+                       vParTestToggleLED( mainTASKS_LED );\r
+                       ulReceivedValue = 0U;\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvBlinkyTimerCallback( xTimerHandle xTimer )\r
+{\r
+       /* Avoid compiler warnings. */\r
+       ( void ) xTimer;\r
+\r
+       /* This function is called when the blinky software time expires.  All the\r
+       function does is toggle the LED.  LED mainTIMER_LED should therefore toggle\r
+       with the period set by mainBLINKY_TIMER_PERIOD. */\r
+       vParTestToggleLED( mainTIMER_LED );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c
new file mode 100644 (file)
index 0000000..a176abf
--- /dev/null
@@ -0,0 +1,431 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/******************************************************************************\r
+ * NOTE 1:  This project provides two demo applications.  A simple blinky style\r
+ * project, and a more comprehensive test and demo application.  The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
+ * between the two.  See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
+ * in main.c.  This file implements the comprehensive test and demo version.\r
+ *\r
+ * NOTE 2:  This file only contains the source code that is specific to the\r
+ * full demo.  Generic functions, such FreeRTOS hook functions, and functions\r
+ * required to configure the hardware, are defined in main.c.\r
+ ******************************************************************************\r
+ *\r
+ * main_full() creates all the demo application tasks and software timers, then\r
+ * starts the scheduler.  The WEB documentation provides more details of the\r
+ * standard demo application tasks.  In addition to the standard demo tasks, the\r
+ * following tasks and tests are also defined:\r
+ *\r
+ * "Register test" tasks - These tasks are used in part to test the kernel port.\r
+ * They set each processor register to a known value, then check that the\r
+ * register still contains that value.  Each of the tasks sets the registers\r
+ * to different values, and will get swapping in and out between setting and\r
+ * then subsequently checking the register values.  Discovery of an incorrect\r
+ * value would be indicative of an error in the task switching mechanism.\r
+ *\r
+ * "ISR triggered task" - This is provided as an example of how to write a\r
+ * FreeRTOS compatible interrupt service routine.  See the comments in\r
+ * ISRTriggeredTask.c.\r
+ *\r
+ * "High Frequency Timer Test" - The high frequency timer is created to test\r
+ * the interrupt nesting method.  The standard demo interrupt nesting test tasks\r
+ * are created with priorities at or below configMAX_SYSCALL_INTERRUPT_PRIORITY\r
+ * because they use interrupt safe FreeRTOS API functions.  The high frequency\r
+ * time is created with a priority above configMAX_SYSCALL_INTERRUPT_PRIORITY,\r
+ * so cannot us the same API functions.\r
+\r
+ * By way of demonstration, the demo application defines\r
+ * configMAX_SYSCALL_INTERRUPT_PRIORITY to be 3, configKERNEL_INTERRUPT_PRIORITY\r
+ * to be 1, and all other interrupts as follows:\r
+ *\r
+ * See the online documentation for this demo for more information on interrupt\r
+ * usage.\r
+ *\r
+ * "Check" timer - The check software timer period is initially set to three\r
+ * seconds.  The callback function associated with the check software timer\r
+ * checks that all the standard demo tasks, and the register check tasks, are\r
+ * not only still executing, but are executing without reporting any errors.  If\r
+ * the check software timer discovers that a task has either stalled, or\r
+ * reported an error, then it changes its own execution period from the initial\r
+ * three seconds, to just 200ms.  The check software timer also toggle LED\r
+ * mainCHECK_LED;  If mainCHECK_LED toggles every 3 seconds, no errors have\r
+ * been detected.  If mainCHECK_LED toggles every 200ms then an error has been\r
+ * detected in at least one task.\r
+ *\r
+ */\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "queue.h"\r
+#include "semphr.h"\r
+#include "timers.h"\r
+\r
+/* Demo application includes. */\r
+#include "partest.h"\r
+#include "blocktim.h"\r
+#include "flash_timer.h"\r
+#include "semtest.h"\r
+#include "GenQTest.h"\r
+#include "QPeek.h"\r
+#include "IntQueue.h"\r
+#include "countsem.h"\r
+#include "dynamic.h"\r
+#include "QueueOverwrite.h"\r
+#include "QueueSet.h"\r
+#include "recmutex.h"\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The period after which the check timer will expire, in ms, provided no errors\r
+have been reported by any of the standard demo tasks.  ms are converted to the\r
+equivalent in ticks using the portTICK_RATE_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS                      ( 3000UL / portTICK_RATE_MS )\r
+\r
+/* The period at which the check timer will expire, in ms, if an error has been\r
+reported in one of the standard demo tasks.  ms are converted to the equivalent\r
+in ticks using the portTICK_RATE_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS        ( 200UL / portTICK_RATE_MS )\r
+\r
+/* The priorities of the various demo application tasks. */\r
+#define mainSEM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 1 )\r
+#define mainBLOCK_Q_PRIORITY                           ( tskIDLE_PRIORITY + 2 )\r
+#define mainCOM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 2 )\r
+#define mainINTEGER_TASK_PRIORITY           ( tskIDLE_PRIORITY )\r
+#define mainGEN_QUEUE_TASK_PRIORITY                    ( tskIDLE_PRIORITY )\r
+#define mainQUEUE_OVERWRITE_TASK_PRIORITY      ( tskIDLE_PRIORITY )\r
+\r
+/* The LED controlled by the 'check' software timer. */\r
+#define mainCHECK_LED                                          ( 2 )\r
+\r
+/* The number of LEDs that should be controlled by the flash software timer\r
+standard demo.  In this case it is only 1 as the starter kit has three LEDs, one\r
+of which is controlled by the check timer and one of which is controlled by the\r
+ISR triggered task. */\r
+#define mainNUM_FLASH_TIMER_LEDS                       ( 1 )\r
+\r
+/* Misc. */\r
+#define mainDONT_BLOCK                                         ( 0 )\r
+\r
+/* The frequency at which the "high frequency interrupt" interrupt will\r
+occur. */\r
+#define mainTEST_INTERRUPT_FREQUENCY           ( 20000 )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * The check timer callback function, as described at the top of this file.\r
+ */\r
+static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+\r
+/*\r
+ * It is important to ensure the high frequency timer test does not start before\r
+ * the kernel.  It is therefore started from inside a software timer callback\r
+ * function, which will not execute until the timer service/daemon task is\r
+ * executing.  A one-shot timer is used, so the callback function will only\r
+ * execute once (unless it is manually reset/restarted).\r
+ */\r
+static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer );\r
+\r
+/*\r
+ * Tasks that test the context switch mechanism by filling the processor\r
+ * registers with known values, then checking that the values contained\r
+ * within the registers is as expected.  The tasks are likely to get swapped\r
+ * in and out between setting the register values and checking the register\r
+ * values.\r
+ */\r
+static void prvRegTestTask1( void *pvParameters );\r
+static void prvRegTestTask2( void *pvParameters );\r
+\r
+/*\r
+ * The task that is periodically triggered by an interrupt, as described at the\r
+ * top of this file.\r
+ */\r
+extern void vStartISRTriggeredTask( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively\r
+on each iteration of their function.  These are used to detect errors in the\r
+reg test tasks. */\r
+volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Create the demo tasks then start the scheduler.\r
+ */\r
+int main_full( void )\r
+{\r
+xTimerHandle xTimer = NULL;\r
+\r
+       /* Create all the other standard demo tasks. */\r
+       vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS );\r
+       vCreateBlockTimeTasks();\r
+       vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
+       vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );\r
+       vStartQueuePeekTasks();\r
+       vStartInterruptQueueTasks();\r
+       vStartISRTriggeredTask();\r
+       vStartCountingSemaphoreTasks();\r
+       vStartDynamicPriorityTasks();\r
+       vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );\r
+       vStartQueueSetTasks();\r
+       vStartRecursiveMutexTasks();\r
+\r
+       /* Create the tasks defined within this file. */\r
+       xTaskCreate( prvRegTestTask1,                                           /* The function that implements the task. */\r
+                               ( const signed char * const ) "Reg1",   /* Text name for the task to assist debugger - not used by FreeRTOS itself. */\r
+                               configMINIMAL_STACK_SIZE,                               /* The stack size to allocate for the task - specified in words not bytes. */\r
+                               NULL,                                                                   /* The parameter to pass into the task - not used in this case so set to NULL. */\r
+                               tskIDLE_PRIORITY,                                               /* The priority to assign to the task. */\r
+                               NULL );                                                                 /* Used to obtain a handle to the task being created - not used in this case so set to NULL. */\r
+\r
+       xTaskCreate( prvRegTestTask2, ( const signed char * const ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+\r
+       /* Create the software timer that performs the 'check' functionality, as\r
+       described at the top of this file. */\r
+       xTimer = xTimerCreate(  ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */\r
+                                                       ( mainCHECK_TIMER_PERIOD_MS ),          /* The timer period, in this case 3000ms (3s). */\r
+                                                       pdTRUE,                                                         /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+                                                       ( void * ) 0,                                           /* The ID is not used, so can be set to anything. */\r
+                                                       prvCheckTimerCallback );                        /* The callback function that inspects the status of all the other tasks. */\r
+\r
+       if( xTimer != NULL )\r
+       {\r
+               xTimerStart( xTimer, mainDONT_BLOCK );\r
+       }\r
+\r
+       /* A software timer is also used to start the high frequency timer test.\r
+       This is to ensure the test does not start before the kernel.  This time a\r
+       one shot software timer is used. */\r
+       xTimer = xTimerCreate( ( const signed char * ) "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest );\r
+       if( xTimer != NULL )\r
+       {\r
+               xTimerStart( xTimer, mainDONT_BLOCK );\r
+       }\r
+\r
+       /* Finally start the scheduler. */\r
+       vTaskStartScheduler();\r
+\r
+       /* If all is well, the scheduler will now be running, and the following line\r
+       will never be reached.  If the following line does execute, then there was\r
+       insufficient FreeRTOS heap memory available for the idle and/or timer tasks\r
+       to be created.  See the memory management section on the FreeRTOS web site\r
+       for more details.  http://www.freertos.org/a00111.html */\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTask1( void *pvParameters )\r
+{\r
+extern void vRegTest1( volatile unsigned long * );\r
+\r
+       /* Avoid compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Pass the address of the RegTest1 loop counter into the test function,\r
+       which is necessarily implemented in assembler. */\r
+       vRegTest1( &ulRegTest1Cycles );\r
+\r
+       /* vRegTest1 should never exit! */\r
+       vTaskDelete( NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTask2( void *pvParameters )\r
+{\r
+extern void vRegTest2( volatile unsigned long * );\r
+\r
+       /* Avoid compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Pass the address of the RegTest2 loop counter into the test function,\r
+       which is necessarily implemented in assembler. */\r
+       vRegTest2( &ulRegTest2Cycles );\r
+\r
+       /* vRegTest1 should never exit! */\r
+       vTaskDelete( NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+{\r
+static long lChangedTimerPeriodAlready = pdFALSE;\r
+static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0, ulLastHighFrequencyTimerInterrupts = 0;\r
+static const unsigned long ulExpectedHighFrequencyInterrupts = ( ( mainTEST_INTERRUPT_FREQUENCY / 1000UL ) * mainCHECK_TIMER_PERIOD_MS ) - 10; /* 10 allows for a margin of error. */\r
+unsigned long ulErrorOccurred = pdFALSE;\r
+\r
+/* The count of the high frequency timer interrupts. */\r
+extern unsigned long ulHighFrequencyTimerInterrupts;\r
+\r
+       /* Avoid compiler warnings. */\r
+       ( void ) xTimer;\r
+\r
+       /* Check that the register test 1 task is still running. */\r
+       if( ulLastRegTest1Value == ulRegTest1Cycles )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 1UL );\r
+       }\r
+       ulLastRegTest1Value = ulRegTest1Cycles;\r
+\r
+\r
+       /* Check that the register test 2 task is still running. */\r
+       if( ulLastRegTest2Value == ulRegTest2Cycles )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 2UL );\r
+       }\r
+       ulLastRegTest2Value = ulRegTest2Cycles;\r
+\r
+       /* Have any of the standard demo tasks detected an error in their\r
+       operation? */\r
+       if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 3UL );\r
+       }\r
+       else if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 4UL );\r
+       }\r
+       else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 5UL );\r
+       }\r
+       else if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 6UL );\r
+       }\r
+       else if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 7UL );\r
+       }\r
+       else if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 8UL );\r
+       }\r
+       else if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 9UL );\r
+       }\r
+       else if( xIsQueueOverwriteTaskStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 10UL );\r
+       }\r
+       else if( xAreQueueSetTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 11UL );\r
+       }\r
+       else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 12UL );\r
+       }\r
+\r
+       /* Ensure the expected number of high frequency interrupts have occurred. */\r
+       if( ulLastHighFrequencyTimerInterrupts != 0 )\r
+       {\r
+               if( ( ulHighFrequencyTimerInterrupts - ulLastHighFrequencyTimerInterrupts ) < ulExpectedHighFrequencyInterrupts )\r
+               {\r
+                       ulErrorOccurred |= ( 0x01UL << 13UL );\r
+               }\r
+       }\r
+       ulLastHighFrequencyTimerInterrupts = ulHighFrequencyTimerInterrupts;\r
+\r
+       if( ulErrorOccurred != pdFALSE )\r
+       {\r
+               /* An error occurred.  Increase the frequency at which the check timer\r
+               toggles its LED to give visual feedback of the potential error\r
+               condition. */\r
+               if( lChangedTimerPeriodAlready == pdFALSE )\r
+               {\r
+                       lChangedTimerPeriodAlready = pdTRUE;\r
+\r
+                       /* This call to xTimerChangePeriod() uses a zero block time.\r
+                       Functions called from inside of a timer callback function must\r
+                       *never* attempt to block as to do so could impact other software\r
+                       timers. */\r
+                       xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );\r
+               }\r
+       }\r
+\r
+       vParTestToggleLED( mainCHECK_LED );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer )\r
+{\r
+void vSetupTimerTest( unsigned short usFrequencyHz );\r
+\r
+       /* Avoid compiler warnings. */\r
+       ( void ) xTimer;\r
+\r
+       /* Setup the high frequency, high priority, timer test.  It is setup in this\r
+       software timer callback to ensure it does not start before the kernel does.\r
+       This is a one shot timer - so the setup routine will only be executed once. */\r
+       vSetupTimerTest( mainTEST_INTERRUPT_FREQUENCY );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/scrap_from_main_blinky.txt b/FreeRTOS/Demo/PIC32MZ_MPLAB/scrap_from_main_blinky.txt
new file mode 100644 (file)
index 0000000..d367e97
--- /dev/null
@@ -0,0 +1,159 @@
+#define mainISR_TASK_PRIORITY                  ( tskIDLE_PRIORITY + 3 )\r
+#define mainISRTASK_LED                                        ( 2 )\r
+#define mainT5PRESCALAR                                        ( 6 )\r
+#define mainT5_SEMAPHORE_RATE                  ( 31250 )\r
+\r
+static void prvISRBlockTask( void* pvParameters )\r
+{\r
+    /* local variables marked as volatile so the compiler does not optimize them away */\r
+    volatile uint64_t resAcc;\r
+    volatile uint32_t arg1, arg2;\r
+\r
+        /* Create the semaphore used to signal this task */\r
+        vSemaphoreCreateBinary( xBlockSemaphore );\r
+\r
+        /* Set up timer 5 to generate an interrupt every 50 ms */\r
+       T5CON = 0;\r
+       TMR5 = 0;\r
+\r
+       /* Timer 5 is going to interrupt at 20Hz Hz. (40,000,000 / (64 * 20) */\r
+        T5CONbits.TCKPS = mainT5PRESCALAR;\r
+       PR5 = mainT5_SEMAPHORE_RATE;\r
+\r
+       /* Setup timer 5 interrupt priority to be the maximum allowed */\r
+       IPC6bits.T5IP = ( configMAX_SYSCALL_INTERRUPT_PRIORITY );\r
+\r
+       /* Clear the interrupt as a starting condition. */\r
+       IFS0bits.T5IF = 0;\r
+\r
+       /* Enable the interrupt. */\r
+       IEC0bits.T5IE = 1;\r
+\r
+       /* Start the timer. */\r
+       T5CONbits.TON = 1;\r
+\r
+        arg1 = 10;\r
+        arg2 = 2;\r
+\r
+        for( ;; )\r
+        {\r
+            /* block on the binary semaphore given by an ISR */\r
+            xSemaphoreTake( xBlockSemaphore, portMAX_DELAY );\r
+\r
+            vParTestToggleLED( mainISRTASK_LED );\r
+            /* perform some maths operations to exercise the accumulators */\r
+            resAcc = resAcc * arg2 + arg1;\r
+        }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vT5InterruptHandler( void )\r
+{\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+\r
+        /* This function is the handler for the peripheral timer interrupt.\r
+         The interrupt is initially signalled in a separate assembly file\r
+         which switches to the system stack and then calls this function.\r
+         It gives a semaphore which signals the prvISRBlockTask */\r
+        xSemaphoreGiveFromISR( xBlockSemaphore, &xHigherPriorityTaskWoken );\r
+\r
+        /* Clear the interrupt */\r
+        IFS0CLR = _IFS0_T5IF_MASK;\r
+\r
+        portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );\r
+}\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+#define DMA_BUFF_SIZE   400\r
+uint32_t dmaBuff[2][DMA_BUFF_SIZE];\r
+static void dmaTask(void* pvParameters)\r
+{\r
+    uint32_t i;\r
+    /* this tasks hammers the dma copying data from one buffer to another */\r
+    DMACONbits.SUSPEND = 1; //Suspend ALL DMA transfers\r
+\r
+    /* currently the data will be placed in the cache and nothing will be copied\r
+     * by the dma as it only accesses physical memory, this test is designed to stress the system\r
+     * and confirm correct operation in a heavy interrupt environment */\r
+    for(i = 0; i < DMA_BUFF_SIZE; i++) {\r
+        dmaBuff[0][i] = i;\r
+    }\r
+\r
+    /* set the transfer event control: what event is to start the DMA transfer */\r
+    DCH1ECONbits.CHSIRQ = _TIMER_6_VECTOR;\r
+    DCH1ECONbits.SIRQEN = 1;\r
+\r
+    /* set up transfer */\r
+    DCH1SSA = KVA_TO_PA((void*) &dmaBuff[0][0]);\r
+    DCH1DSA = KVA_TO_PA((void*) &dmaBuff[1][0]);\r
+    DCH1SSIZ = DMA_BUFF_SIZE;\r
+    DCH1DSIZ = DMA_BUFF_SIZE;\r
+    DCH1CSIZ = 4;\r
+\r
+    /* setup interrupt response */\r
+    IPC33bits.DMA1IP = 3;\r
+    DCH1INTbits.CHBCIE = 1;\r
+    IEC4bits.DMA1IE = 1;\r
+    DCH1CONbits.CHPRI = 0b10;\r
+\r
+    /* once we configured the DMA channel we can enable it */\r
+    DCH1CONbits.CHEN = 1;\r
+    DMACONbits.ON = 1;\r
+    DMACONbits.SUSPEND = 0;\r
+\r
+    /* setup T6 to trigger the transfers */\r
+    T6CON = 0x0000;\r
+    IEC0CLR = _IEC0_T6IE_MASK;\r
+    IFS0CLR = _IFS0_T6IF_MASK;\r
+    TMR6 = 0;\r
+    PR6 = 1;\r
+    T6CONSET = _T6CON_ON_MASK;\r
+\r
+    /* once the dma is setup we delete this task */\r
+    vTaskDelete(NULL);\r
+}\r
+\r
+void __attribute__((vector(_DMA1_VECTOR), interrupt(ipl3))) DMAInterruptHandler(void)\r
+{\r
+    portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+    uint32_t i;\r
+\r
+    /* clear the destination buffer */\r
+    for(i = 0; i < DMA_BUFF_SIZE; i++) {\r
+        dmaBuff[1][i] = 0;\r
+    }\r
+\r
+    xSemaphoreGiveFromISR( xBlockSemaphore, &xHigherPriorityTaskWoken );\r
+\r
+    /* we have just finished copying from buffer0 to buffer 1 so restart the copy operation */\r
+    DCH1INTCLR = _DCH1INT_CHBCIF_MASK;\r
+    IFS4CLR = _IFS4_DMA1IF_MASK;\r
+    DCH1CONSET = _DCH1CON_CHEN_MASK;\r
+    portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );\r
+}\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+ * The Blinky ISR Test:\r
+ * This demonstrates triggering an ISR from a peripheral timer. A task is created\r
+ * which blocks on a semaphore. Separately a peripheral timer is set to cause an\r
+ * interrupt every 50ms. The ISR handler (in a separate assembly file) then\r
+ * releases the semaphore which causes the task to unblock and toggle an LED. This\r
+ * sequence tests operation of the ISR and system stack handling.\r
+ *\r
+static void prvISRBlockTask( void *pvParameters );\r
+static void dmaTask(void *pvParameters);\r
+\r
+/* The timer 5 interrupt handler.  As this interrupt uses the FreeRTOS assembly\r
+entry point the IPL setting in the following function prototype has no effect. */\r
+void __attribute__( (interrupt(ipl3), vector(_TIMER_5_VECTOR))) vT5InterruptWrapper( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The semaphore used to signal the ISRBlockTask */\r
+static xSemaphoreHandle xBlockSemaphore;\r
+\r
+\r
+//                xTaskCreate( prvISRBlockTask, ( signed char * ) "ISR", configMINIMAL_STACK_SIZE, ( void * ) NULL, mainISR_TASK_PRIORITY, NULL );\r
+//                xTaskCreate( dmaTask, (signed char *) "DMA", configMINIMAL_STACK_SIZE, (void*) NULL, 2, NULL);\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c
new file mode 100644 (file)
index 0000000..227d21f
--- /dev/null
@@ -0,0 +1,138 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/* High speed timer test as described in main.c. */\r
+\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+\r
+/* The maximum value the 16bit timer can contain. */\r
+#define timerMAX_COUNT                         0xffff\r
+\r
+/* The timer 2 interrupt handler.  As this interrupt uses the FreeRTOS assembly\r
+entry point the IPL setting in the following function prototype has no effect.\r
+The interrupt priority is set by ConfigIntTimer2() in vSetupTimerTest(). */\r
+void __attribute__( (interrupt(ipl0), vector(_TIMER_2_VECTOR))) vT2InterruptWrapper( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Incremented every 20,000 interrupts, so should count in seconds. */\r
+unsigned long ulHighFrequencyTimerInterrupts = 0;\r
+\r
+/* The frequency at which the timer is interrupting. */\r
+static unsigned long ulFrequencyHz;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vSetupTimerTest( unsigned short usFrequencyHz )\r
+{\r
+       /* Remember the frequency so it can be used from the ISR. */\r
+       ulFrequencyHz = ( unsigned long ) usFrequencyHz;\r
+\r
+       /* T2 is used to generate interrupts above the kernel and max syscall \r
+       interrupt priority. */\r
+       T2CON = 0;\r
+       TMR2 = 0;\r
+\r
+       /* Timer 2 is going to interrupt at usFrequencyHz Hz. */\r
+       PR2 = ( unsigned short ) ( ( configPERIPHERAL_CLOCK_HZ / ( unsigned long ) usFrequencyHz ) - 1 );\r
+\r
+       /* Setup timer 2 interrupt priority to be above the kernel priority so\r
+       the timer jitter is not effected by the kernel activity. */\r
+       IPC2bits.T2IP = ( configMAX_SYSCALL_INTERRUPT_PRIORITY + 1 );\r
+\r
+       /* Clear the interrupt as a starting condition. */\r
+       IFS0bits.T2IF = 0;\r
+\r
+       /* Enable the interrupt. */\r
+       IEC0bits.T2IE = 1;\r
+\r
+       /* Start the timer. */\r
+       T2CONbits.TON = 1;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vT2InterruptHandler( void )\r
+{\r
+extern unsigned long uxInterruptNesting;\r
+static unsigned long ulMaxNestingDepth = 0;\r
+\r
+       /* Keep a count of interrupts so the check timer can ensure they are\r
+       occurring at the expected rate. */\r
+       ulHighFrequencyTimerInterrupts++;\r
+\r
+       /* Establish the maximum nesting count reached to ensure the test is doing\r
+       what it is supposed to. */\r
+       if( uxInterruptNesting > ulMaxNestingDepth )\r
+       {\r
+               ulMaxNestingDepth = uxInterruptNesting;\r
+       }\r
+\r
+       /* Clear the timer interrupt. */\r
+       IFS0CLR = _IFS0_T2IF_MASK;\r
+}\r
+\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h
new file mode 100644 (file)
index 0000000..c446d7d
--- /dev/null
@@ -0,0 +1,75 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#ifndef TIMER_TEST_H\r
+#define TIMER_TEST_H\r
+\r
+/* Setup the high frequency timer interrupt. */\r
+void vSetupTimerTest( unsigned short usFrequencyHz );\r
+\r
+#endif /* TIMER_TEST_H */\r
+\r
+\r
+\r
diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S
new file mode 100644 (file)
index 0000000..8fa185d
--- /dev/null
@@ -0,0 +1,89 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#include <xc.h>\r
+#include <sys/asm.h>\r
+#include "ISR_Support.h"\r
+\r
+       .set    nomips16\r
+       .set    noreorder\r
+       \r
+       .extern vT2InterruptHandler\r
+       .extern xISRStackTop\r
+       .global vT2InterruptWrapper\r
+\r
+       .set    noreorder\r
+       .set    noat\r
+       .ent    vT2InterruptWrapper\r
+\r
+vT2InterruptWrapper:\r
+\r
+       portSAVE_CONTEXT\r
+       jal vT2InterruptHandler\r
+       nop\r
+       portRESTORE_CONTEXT\r
+\r
+       .end    vT2InterruptWrapper\r
+\r
index 288e558fd725b7f9b6d93dd27f194c0bb082d564..cb3bacbab0f0097afc227d7610a3cc5458dd133e 100644 (file)
 #endif\r
 \r
 #ifdef MPLAB_PIC32MX_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"\r
+       #include "../../Source/portable/MPLAB/PIC32MX/portmacro.h"\r
 #endif\r
 \r
 #ifdef _FEDPICC\r
index fc35f87a88a3d26dab78f94eff82601f684c8148..6873611ca04816047d19d0f2f187464f948978b4 100644 (file)
@@ -1246,7 +1246,7 @@ unsigned long ulVarToSend, ulValReceived;
        if( xHigherPriorityTaskWoken )\r
        {\r
                // Actual macro used here is port specific.\r
-               taskYIELD_FROM_ISR ();\r
+               portYIELD_FROM_ISR ();\r
        }\r
  }\r
  </pre>\r
diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h
new file mode 100644 (file)
index 0000000..1ca3a42
--- /dev/null
@@ -0,0 +1,272 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#include "FreeRTOSConfig.h"\r
+\r
+#define portCONTEXT_SIZE 160\r
+#define portEPC_STACK_LOCATION 152\r
+#define portSTATUS_STACK_LOCATION 156\r
+\r
+/******************************************************************/\r
+.macro portSAVE_CONTEXT\r
+\r
+       /* Make room for the context. First save the current status so it can be\r
+       manipulated, and the cause and EPC registers so their original values are\r
+       captured. */\r
+       mfc0            k0, _CP0_CAUSE\r
+       addiu           sp, sp, -portCONTEXT_SIZE\r
+       mfc0            k1, _CP0_STATUS\r
+\r
+       /* Also save s6 and s5 so they can be used.  Any nesting interrupts should\r
+       maintain the values of these registers across the ISR. */\r
+       sw                      s6, 44(sp)\r
+       sw                      s5, 40(sp)\r
+       sw                      k1, portSTATUS_STACK_LOCATION(sp)\r
+\r
+       /* Prepare to enable interrupts above the current priority. */\r
+       srl                     k0, k0, 0xa\r
+       ins             k1, k0, 10, 7\r
+       srl                     k0, k0, 0x7 /* This copies the MSB of the IPL, but it would be an error if it was set anyway. */\r
+       ins             k1, k0, 18, 1\r
+       ins                     k1, zero, 1, 4\r
+\r
+       /* s5 is used as the frame pointer. */\r
+       add                     s5, zero, sp\r
+\r
+       /* Check the nesting count value. */\r
+       la                      k0, uxInterruptNesting\r
+       lw                      s6, (k0)\r
+\r
+       /* If the nesting count is 0 then swap to the the system stack, otherwise\r
+       the system stack is already being used. */\r
+       bne                     s6, zero, 1f\r
+       nop\r
+\r
+       /* Swap to the system stack. */\r
+       la                      sp, xISRStackTop\r
+       lw                      sp, (sp)\r
+\r
+       /* Increment and save the nesting count. */\r
+1:     addiu           s6, s6, 1\r
+       sw                      s6, 0(k0)\r
+\r
+       /* s6 holds the EPC value, this is saved after interrupts are re-enabled. */\r
+       mfc0            s6, _CP0_EPC\r
+\r
+       /* Re-enable interrupts. */\r
+       mtc0            k1, _CP0_STATUS\r
+\r
+       /* Save the context into the space just created.  s6 is saved again\r
+       here as it now contains the EPC value.  No other s registers need be\r
+       saved. */\r
+       sw                      ra, 120(s5)\r
+       sw                      s8, 116(s5)\r
+       sw                      t9, 112(s5)\r
+       sw                      t8, 108(s5)\r
+       sw                      t7, 104(s5)\r
+       sw                      t6, 100(s5)\r
+       sw                      t5, 96(s5)\r
+       sw                      t4, 92(s5)\r
+       sw                      t3, 88(s5)\r
+       sw                      t2, 84(s5)\r
+       sw                      t1, 80(s5)\r
+       sw                      t0, 76(s5)\r
+       sw                      a3, 72(s5)\r
+       sw                      a2, 68(s5)\r
+       sw                      a1, 64(s5)\r
+       sw                      a0, 60(s5)\r
+       sw                      v1, 56(s5)\r
+       sw                      v0, 52(s5)\r
+       sw                      s6, portEPC_STACK_LOCATION(s5)\r
+       sw                      $1, 16(s5)\r
+\r
+       /* Save the AC0, AC1, AC2, AC3 registers from the DSP.  s6 is used as a\r
+       scratch register. */\r
+       mfhi            s6, $ac1\r
+       sw                      s6, 128(s5)\r
+       mflo            s6, $ac1\r
+       sw                      s6, 124(s5)\r
+\r
+       mfhi            s6, $ac2\r
+       sw                      s6, 136(s5)\r
+       mflo            s6, $ac2\r
+       sw                      s6, 132(s5)\r
+\r
+       mfhi            s6, $ac3\r
+       sw                      s6, 144(s5)\r
+       mflo            s6, $ac3\r
+       sw                      s6, 140(s5)\r
+\r
+       /* Save the DSP Control register */\r
+       rddsp           s6\r
+       sw                      s6, 148(s5)\r
+\r
+       /* ac0 is done separately to match the MX port. */\r
+       mfhi            s6, $ac0\r
+       sw                      s6, 12(s5)\r
+       mflo            s6, $ac0\r
+       sw                      s6, 8(s5)\r
+\r
+       /* Update the task stack pointer value if nesting is zero. */\r
+       la                      s6, uxInterruptNesting\r
+       lw                      s6, (s6)\r
+       addiu           s6, s6, -1\r
+       bne                     s6, zero, 1f\r
+       nop\r
+\r
+       /* Save the stack pointer. */\r
+       la                      s6, uxSavedTaskStackPointer\r
+       sw                      s5, (s6)\r
+1:\r
+       .endm\r
+\r
+/******************************************************************/\r
+.macro portRESTORE_CONTEXT\r
+\r
+       /* Restore the stack pointer from the TCB.  This is only done if the\r
+       nesting count is 1. */\r
+       la                      s6, uxInterruptNesting\r
+       lw                      s6, (s6)\r
+       addiu           s6, s6, -1\r
+       bne                     s6, zero, 1f\r
+       nop\r
+       la                      s6, uxSavedTaskStackPointer\r
+       lw                      s5, (s6)\r
+\r
+       /* Restore the context. */\r
+1:     lw                      s6, 128(s5)\r
+       mthi            s6, $ac1\r
+       lw                      s6, 124(s5)\r
+       mtlo            s6, $ac1\r
+\r
+       lw                      s6, 136(s5)\r
+       mthi            s6, $ac2\r
+       lw                      s6, 132(s5)\r
+       mtlo            s6, $ac2\r
+\r
+       lw                      s6, 144(s5)\r
+       mthi            s6, $ac3\r
+       lw                      s6, 140(s5)\r
+       mtlo                    s6, $ac3\r
+\r
+       /* Restore DSPControl. */\r
+       lw                      s6, 148(s5)\r
+       wrdsp           s6\r
+\r
+       lw                      s6, 8(s5)\r
+       mtlo            s6, $ac0\r
+       lw                      s6, 12(s5)\r
+       mthi            s6, $ac0\r
+       lw                      $1, 16(s5)\r
+\r
+       /* s6 is loaded as it was used as a scratch register and therefore saved\r
+       as part of the interrupt context. */\r
+       lw                      s6, 44(s5)\r
+       lw                      v0, 52(s5)\r
+       lw                      v1, 56(s5)\r
+       lw                      a0, 60(s5)\r
+       lw                      a1, 64(s5)\r
+       lw                      a2, 68(s5)\r
+       lw                      a3, 72(s5)\r
+       lw                      t0, 76(s5)\r
+       lw                      t1, 80(s5)\r
+       lw                      t2, 84(s5)\r
+       lw                      t3, 88(s5)\r
+       lw                      t4, 92(s5)\r
+       lw                      t5, 96(s5)\r
+       lw                      t6, 100(s5)\r
+       lw                      t7, 104(s5)\r
+       lw                      t8, 108(s5)\r
+       lw                      t9, 112(s5)\r
+       lw                      s8, 116(s5)\r
+       lw                      ra, 120(s5)\r
+\r
+       /* Protect access to the k registers, and others. */\r
+       di\r
+       ehb\r
+\r
+       /* Decrement the nesting count. */\r
+       la                      k0, uxInterruptNesting\r
+       lw                      k1, (k0)\r
+       addiu           k1, k1, -1\r
+       sw                      k1, 0(k0)\r
+\r
+       lw                      k0, portSTATUS_STACK_LOCATION(s5)\r
+       lw                      k1, portEPC_STACK_LOCATION(s5)\r
+\r
+       /* Leave the stack in its original state.  First load sp from s5, then\r
+       restore s5 from the stack. */\r
+       add                     sp, zero, s5\r
+       lw                      s5, 40(sp)\r
+       addiu           sp, sp, portCONTEXT_SIZE\r
+\r
+       mtc0            k0, _CP0_STATUS\r
+       mtc0            k1, _CP0_EPC\r
+       ehb\r
+       eret\r
+       nop\r
+\r
+       .endm\r
+\r
diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c
new file mode 100644 (file)
index 0000000..4e62b77
--- /dev/null
@@ -0,0 +1,380 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/*-----------------------------------------------------------\r
+ * Implementation of functions defined in portable.h for the PIC32MZ port.\r
+  *----------------------------------------------------------*/\r
+\r
+#include <xc.h>\r
+\r
+/* Scheduler include files. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+#if !defined(__PIC32MZ__)\r
+    #error This port is designed to work with XC32 on PIC32MZ MCUs.  Please update your C compiler version or settings.\r
+#endif\r
+\r
+#if( ( configMAX_SYSCALL_INTERRUPT_PRIORITY >= 0x7 ) || ( configMAX_SYSCALL_INTERRUPT_PRIORITY == 0 ) )\r
+       #error configMAX_SYSCALL_INTERRUPT_PRIORITY must be less than 7 and greater than 0\r
+#endif\r
+\r
+/* Hardware specifics. */\r
+#define portTIMER_PRESCALE     8\r
+#define portPRESCALE_BITS      1\r
+\r
+/* Bits within various registers. */\r
+#define portIE_BIT                                     ( 0x00000001 )\r
+#define portEXL_BIT                                    ( 0x00000002 )\r
+#define portMX_BIT                                     ( 0x01000000 ) /* Allow access to DSP instructions. */\r
+\r
+/* Bits within the CAUSE register. */\r
+#define portCORE_SW_0                          ( 0x00000100 )\r
+#define portCORE_SW_1                          ( 0x00000200 )\r
+\r
+/* The EXL bit is set to ensure interrupts do not occur while the context of\r
+the first task is being restored. */\r
+#define portINITIAL_SR                         ( portIE_BIT | portEXL_BIT | portMX_BIT )\r
+\r
+/*\r
+By default port.c generates its tick interrupt from TIMER1.  The user can\r
+override this behaviour by:\r
+       1: Providing their own implementation of vApplicationSetupTickTimerInterrupt(),\r
+          which is the function that configures the timer.  The function is defined\r
+          as a weak symbol in this file so if the same function name is used in the\r
+          application code then the version in the application code will be linked\r
+          into the application in preference to the version defined in this file.\r
+       2: Define configTICK_INTERRUPT_VECTOR to the vector number of the timer used\r
+          to generate the tick interrupt.  For example, when timer 1 is used then\r
+          configTICK_INTERRUPT_VECTOR is set to _TIMER_1_VECTOR.\r
+          configTICK_INTERRUPT_VECTOR should be defined in FreeRTOSConfig.h.\r
+       3: Define configCLEAR_TICK_TIMER_INTERRUPT() to clear the interrupt in the\r
+          timer used to generate the tick interrupt.  For example, when timer 1 is\r
+          used configCLEAR_TICK_TIMER_INTERRUPT() is defined to\r
+          IFS0CLR = _IFS0_T1IF_MASK.\r
+*/\r
+#ifndef configTICK_INTERRUPT_VECTOR\r
+       #define configTICK_INTERRUPT_VECTOR _TIMER_1_VECTOR\r
+       #define configCLEAR_TICK_TIMER_INTERRUPT() IFS0CLR = _IFS0_T1IF_MASK\r
+#else\r
+       #ifndef configCLEAR_TICK_TIMER_INTERRUPT\r
+               #error If configTICK_INTERRUPT_VECTOR is defined in application code then configCLEAR_TICK_TIMER_INTERRUPT must also be defined in application code.\r
+       #endif\r
+#endif\r
+\r
+/* Let the user override the pre-loading of the initial RA with the address of\r
+prvTaskExitError() in case is messes up unwinding of the stack in the\r
+debugger - in which case configTASK_RETURN_ADDRESS can be defined as 0 (NULL). */\r
+#ifdef configTASK_RETURN_ADDRESS\r
+       #define portTASK_RETURN_ADDRESS configTASK_RETURN_ADDRESS\r
+#else\r
+       #define portTASK_RETURN_ADDRESS prvTaskExitError\r
+#endif\r
+\r
+/* Set configCHECK_FOR_STACK_OVERFLOW to 3 to add ISR stack checking to task\r
+stack checking.  A problem in the ISR stack will trigger an assert, not call the\r
+stack overflow hook function (because the stack overflow hook is specific to a\r
+task stack, not the ISR stack). */\r
+#if( configCHECK_FOR_STACK_OVERFLOW > 2 )\r
+\r
+       /* Don't use 0xa5 as the stack fill bytes as that is used by the kernerl for\r
+       the task stacks, and so will legitimately appear in many positions within\r
+       the ISR stack. */\r
+       #define portISR_STACK_FILL_BYTE 0xee\r
+\r
+       static const unsigned char ucExpectedStackBytes[] = {\r
+                                                                       portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE,             \\r
+                                                                       portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE,             \\r
+                                                                       portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE,             \\r
+                                                                       portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE,             \\r
+                                                                       portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE, portISR_STACK_FILL_BYTE };   \\r
+\r
+       #define portCHECK_ISR_STACK() configASSERT( ( memcmp( ( void * ) xISRStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) == 0 ) )\r
+#else\r
+       /* Define the function away. */\r
+       #define portCHECK_ISR_STACK()\r
+#endif /* configCHECK_FOR_STACK_OVERFLOW > 2 */\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Place the prototype here to ensure the interrupt vector is correctly installed.\r
+ * Note that because the interrupt is written in assembly, the IPL setting in the\r
+ * following line of code has no effect.  The interrupt priority is set by the\r
+ * call to ConfigIntTimer1() in vApplicationSetupTickTimerInterrupt().\r
+ */\r
+extern void __attribute__( (interrupt(ipl1), vector( configTICK_INTERRUPT_VECTOR ))) vPortTickInterruptHandler( void );\r
+\r
+/*\r
+ * The software interrupt handler that performs the yield.  Note that, because\r
+ * the interrupt is written in assembly, the IPL setting in the following line of\r
+ * code has no effect.  The interrupt priority is set by the call to\r
+ * mConfigIntCoreSW0() in xPortStartScheduler().\r
+ */\r
+void __attribute__( (interrupt(ipl1), vector(_CORE_SOFTWARE_0_VECTOR))) vPortYieldISR( void );\r
+\r
+/*\r
+ * Used to catch tasks that attempt to return from their implementing function.\r
+ */\r
+static void prvTaskExitError( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Records the interrupt nesting depth.  This is initialised to one as it is\r
+decremented to 0 when the first task starts. */\r
+volatile unsigned portBASE_TYPE uxInterruptNesting = 0x01;\r
+\r
+/* Stores the task stack pointer when a switch is made to use the system stack. */\r
+unsigned portBASE_TYPE uxSavedTaskStackPointer = 0;\r
+\r
+/* The stack used by interrupt service routines that cause a context switch. */\r
+portSTACK_TYPE xISRStack[ configISR_STACK_SIZE ] = { 0 };\r
+\r
+/* The top of stack value ensures there is enough space to store 6 registers on\r
+the callers stack, as some functions seem to want to do this. */\r
+const portSTACK_TYPE * const xISRStackTop = &( xISRStack[ configISR_STACK_SIZE - 7 ] );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * See header file for description.\r
+ */\r
+portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )\r
+{\r
+       /* Ensure byte alignment is maintained when leaving this function. */\r
+       pxTopOfStack--;\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) 0xDEADBEEF;\r
+       pxTopOfStack--;\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) 0x12345678;    /* Word to which the stack pointer will be left pointing after context restore. */\r
+       pxTopOfStack--;\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) _CP0_GET_CAUSE();\r
+       pxTopOfStack--;\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) portINITIAL_SR;/* CP0_STATUS */\r
+       pxTopOfStack--;\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) pxCode;                /* CP0_EPC */\r
+       pxTopOfStack -= 7;                                                      /* Includes space for AC1 - AC3. */\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) 0x00000000;    /* DSPControl */\r
+       pxTopOfStack--;\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) portTASK_RETURN_ADDRESS;       /* ra */\r
+       pxTopOfStack -= 15;\r
+\r
+       *pxTopOfStack = (portSTACK_TYPE) pvParameters; /* Parameters to pass in. */\r
+       pxTopOfStack -= 15;\r
+\r
+       return pxTopOfStack;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvTaskExitError( void )\r
+{\r
+       /* A function that implements a task must not exit or attempt to return to\r
+       its caller as there is nothing to return to.  If a task wants to exit it\r
+       should instead call vTaskDelete( NULL ).\r
+\r
+       Artificially force an assert() to be triggered if configASSERT() is\r
+       defined, then stop here so application writers can catch the error. */\r
+       configASSERT( uxSavedTaskStackPointer == 0UL );\r
+       portDISABLE_INTERRUPTS();\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Setup a timer for a regular tick.  This function uses peripheral timer 1.\r
+ * The function is declared weak so an application writer can use a different\r
+ * timer by redefining this implementation.  If a different timer is used then\r
+ * configTICK_INTERRUPT_VECTOR must also be defined in FreeRTOSConfig.h to\r
+ * ensure the RTOS provided tick interrupt handler is installed on the correct\r
+ * vector number.  When Timer 1 is used the vector number is defined as\r
+ * _TIMER_1_VECTOR.\r
+ */\r
+__attribute__(( weak )) void vApplicationSetupTickTimerInterrupt( void )\r
+{\r
+const unsigned long ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ ) - 1;\r
+\r
+       T1CON = 0x0000;\r
+       T1CONbits.TCKPS = portPRESCALE_BITS;\r
+       PR1 = ulCompareMatch;\r
+       IPC1bits.T1IP = configKERNEL_INTERRUPT_PRIORITY;\r
+\r
+       /* Clear the interrupt as a starting condition. */\r
+       IFS0bits.T1IF = 0;\r
+\r
+       /* Enable the interrupt. */\r
+       IEC0bits.T1IE = 1;\r
+\r
+       /* Start the timer. */\r
+       T1CONbits.TON = 1;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vPortEndScheduler(void)\r
+{\r
+       /* It is unlikely that the scheduler for the PIC port will get stopped\r
+       once running.  If required disable the tick interrupt here, then return\r
+       to xPortStartScheduler(). */\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+portBASE_TYPE xPortStartScheduler( void )\r
+{\r
+extern void vPortStartFirstTask( void );\r
+extern void *pxCurrentTCB;\r
+\r
+       #if ( configCHECK_FOR_STACK_OVERFLOW > 2 )\r
+       {\r
+               /* Fill the ISR stack to make it easy to asses how much is being used. */\r
+               memset( ( void * ) xISRStack, portISR_STACK_FILL_BYTE, sizeof( xISRStack ) );\r
+       }\r
+       #endif /* configCHECK_FOR_STACK_OVERFLOW > 2 */\r
+\r
+       /* Clear the software interrupt flag. */\r
+       IFS0CLR = _IFS0_CS0IF_MASK;\r
+\r
+       /* Set software timer priority. */\r
+       IPC0CLR = _IPC0_CS0IP_MASK;\r
+       IPC0SET = ( configKERNEL_INTERRUPT_PRIORITY << _IPC0_CS0IP_POSITION );\r
+\r
+       /* Enable software interrupt. */\r
+       IEC0CLR = _IEC0_CS0IE_MASK;\r
+       IEC0SET = 1 << _IEC0_CS0IE_POSITION;\r
+\r
+       /* Setup the timer to generate the tick.  Interrupts will have been\r
+       disabled by the time we get here. */\r
+       vApplicationSetupTickTimerInterrupt();\r
+\r
+       /* Kick off the highest priority task that has been created so far.\r
+       Its stack location is loaded into uxSavedTaskStackPointer. */\r
+       uxSavedTaskStackPointer = *( unsigned portBASE_TYPE * ) pxCurrentTCB;\r
+       vPortStartFirstTask();\r
+\r
+       /* Should never get here as the tasks will now be executing!  Call the task\r
+       exit error function to prevent compiler warnings about a static function\r
+       not being called in the case that the application writer overrides this\r
+       functionality by defining configTASK_RETURN_ADDRESS. */\r
+       prvTaskExitError();\r
+\r
+       return pdFALSE;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vPortIncrementTick( void )\r
+{\r
+unsigned portBASE_TYPE uxSavedStatus;\r
+\r
+       uxSavedStatus = uxPortSetInterruptMaskFromISR();\r
+       {\r
+               if( xTaskIncrementTick() != pdFALSE )\r
+               {\r
+                       /* Pend a context switch. */\r
+                       _CP0_BIS_CAUSE( portCORE_SW_0 );\r
+               }\r
+       }\r
+       vPortClearInterruptMaskFromISR( uxSavedStatus );\r
+\r
+       /* Look for the ISR stack getting near or past its limit. */\r
+       portCHECK_ISR_STACK();\r
+\r
+       /* Clear timer interrupt. */\r
+       configCLEAR_TICK_TIMER_INTERRUPT();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR( void )\r
+{\r
+unsigned portBASE_TYPE uxSavedStatusRegister;\r
+\r
+       __builtin_disable_interrupts();\r
+       uxSavedStatusRegister = _CP0_GET_STATUS() | 0x01;\r
+       /* This clears the IPL bits, then sets them to\r
+       configMAX_SYSCALL_INTERRUPT_PRIORITY.  This function should not be called\r
+       from an interrupt that has a priority above\r
+       configMAX_SYSCALL_INTERRUPT_PRIORITY so, when used correctly, the action\r
+       can only result in the IPL being unchanged or raised, and therefore never\r
+       lowered. */\r
+       _CP0_SET_STATUS( ( ( uxSavedStatusRegister & ( ~portALL_IPL_BITS ) ) ) | ( configMAX_SYSCALL_INTERRUPT_PRIORITY << portIPL_SHIFT ) );\r
+\r
+       return uxSavedStatusRegister;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE uxSavedStatusRegister )\r
+{\r
+       _CP0_SET_STATUS( uxSavedStatusRegister );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+\r
+\r
+\r
+\r
diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S
new file mode 100644 (file)
index 0000000..dd38ca0
--- /dev/null
@@ -0,0 +1,349 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#include <xc.h>\r
+#include <sys/asm.h>\r
+#include "ISR_Support.h"\r
+\r
+\r
+       .set    nomips16\r
+       .set    noreorder\r
+\r
+       .extern pxCurrentTCB\r
+       .extern vTaskSwitchContext\r
+       .extern vPortIncrementTick\r
+       .extern xISRStackTop\r
+\r
+       .global vPortStartFirstTask\r
+       .global vPortYieldISR\r
+       .global vPortTickInterruptHandler\r
+\r
+\r
+/******************************************************************/\r
+\r
+       .set            noreorder\r
+       .set            noat\r
+       .ent            vPortTickInterruptHandler\r
+\r
+vPortTickInterruptHandler:\r
+\r
+       portSAVE_CONTEXT\r
+\r
+       jal             vPortIncrementTick\r
+       nop\r
+\r
+       portRESTORE_CONTEXT\r
+\r
+       .end vPortTickInterruptHandler\r
+\r
+/******************************************************************/\r
+\r
+       .set            noreorder\r
+       .set            noat\r
+       .ent            vPortStartFirstTask\r
+\r
+vPortStartFirstTask:\r
+\r
+       /* Simply restore the context of the highest priority task that has been\r
+       created so far. */\r
+       portRESTORE_CONTEXT\r
+\r
+       .end vPortStartFirstTask\r
+\r
+\r
+\r
+/*******************************************************************/\r
+\r
+       .set            noreorder\r
+       .set            noat\r
+       .ent            vPortYieldISR\r
+\r
+vPortYieldISR:\r
+\r
+       /* Make room for the context. First save the current status so it can be\r
+       manipulated, and the cause and EPC registers so thier original values are\r
+       captured. */\r
+       addiu           sp, sp, -portCONTEXT_SIZE\r
+       mfc0            k1, _CP0_STATUS\r
+\r
+       /* Also save s6 and s5 so they can be used.  Any nesting interrupts should\r
+       maintain the values of these registers across the ISR. */\r
+       sw                      s6, 44(sp)\r
+       sw                      s5, 40(sp)\r
+       sw                      k1, portSTATUS_STACK_LOCATION(sp)\r
+\r
+       /* Prepare to re-enabled interrupts above the kernel priority. */\r
+       ins             k1, zero, 10, 7         /* Clear IPL bits 0:6. */\r
+    ins                k1, zero, 18, 1         /* Clear IPL bit 7.  It would be an error here if this bit were set anyway. */\r
+       ori                     k1, k1, ( configMAX_SYSCALL_INTERRUPT_PRIORITY << 10 )\r
+    ins                        k1, zero, 1, 4          /* Clear EXL, ERL and UM. */\r
+\r
+       /* s5 is used as the frame pointer. */\r
+       add                     s5, zero, sp\r
+\r
+       /* Swap to the system stack.  This is not conditional on the nesting\r
+       count as this interrupt is always the lowest priority and therefore\r
+       the nesting is always 0. */\r
+       la                      sp, xISRStackTop\r
+       lw                      sp, (sp)\r
+\r
+       /* Set the nesting count. */\r
+       la                      k0, uxInterruptNesting\r
+       addiu           s6, zero, 1\r
+       sw                      s6, 0(k0)\r
+\r
+       /* s6 holds the EPC value, this is saved with the rest of the context\r
+       after interrupts are enabled. */\r
+       mfc0            s6, _CP0_EPC\r
+\r
+       /* Re-enable interrupts above configMAX_SYSCALL_INTERRUPT_PRIORITY. */\r
+       mtc0            k1, _CP0_STATUS\r
+\r
+       /* Save the context into the space just created.  s6 is saved again\r
+       here as it now contains the EPC value. */\r
+       sw                      ra, 120(s5)\r
+       sw                      s8, 116(s5)\r
+       sw                      t9, 112(s5)\r
+       sw                      t8, 108(s5)\r
+       sw                      t7, 104(s5)\r
+       sw                      t6, 100(s5)\r
+       sw                      t5, 96(s5)\r
+       sw                      t4, 92(s5)\r
+       sw                      t3, 88(s5)\r
+       sw                      t2, 84(s5)\r
+       sw                      t1, 80(s5)\r
+       sw                      t0, 76(s5)\r
+       sw                      a3, 72(s5)\r
+       sw                      a2, 68(s5)\r
+       sw                      a1, 64(s5)\r
+       sw                      a0, 60(s5)\r
+       sw                      v1, 56(s5)\r
+       sw                      v0, 52(s5)\r
+       sw                      s7, 48(s5)\r
+       sw                      s6, portEPC_STACK_LOCATION(s5)\r
+       /* s5 and s6 has already been saved. */\r
+       sw                      s4,     36(s5)\r
+       sw                      s3, 32(s5)\r
+       sw                      s2, 28(s5)\r
+       sw                      s1, 24(s5)\r
+       sw                      s0, 20(s5)\r
+       sw                      $1, 16(s5)\r
+\r
+       /* s7 is used as a scratch register as this should always be saved across\r
+       nesting interrupts. */\r
+\r
+       /* Save the AC0, AC1, AC2 and AC3. */\r
+       mfhi            s7, $ac1\r
+       sw                      s7, 128(s5)\r
+       mflo            s7, $ac1\r
+       sw                      s7, 124(s5)\r
+\r
+       mfhi            s7, $ac2\r
+       sw                      s7, 136(s5)\r
+       mflo            s7, $ac2\r
+       sw                      s7, 132(s5)\r
+\r
+       mfhi            s7, $ac3\r
+       sw                      s7, 144(s5)\r
+       mflo            s7, $ac3\r
+       sw                      s7, 140(s5)\r
+\r
+       rddsp           s7\r
+       sw                      s7, 148(s5)\r
+\r
+       mfhi            s7, $ac0\r
+       sw                      s7, 12(s5)\r
+       mflo            s7, $ac0\r
+       sw                      s7, 8(s5)\r
+\r
+       /* Save the stack pointer to the task. */\r
+       la                      s7, pxCurrentTCB\r
+       lw                      s7, (s7)\r
+       sw                      s5, (s7)\r
+\r
+       /* Set the interrupt mask to the max priority that can use the API.  The\r
+       yield handler will only be called at configKERNEL_INTERRUPT_PRIORITY which\r
+       is below configMAX_SYSCALL_INTERRUPT_PRIORITY - so this can only ever\r
+       raise the IPL value and never lower it. */\r
+       di\r
+       ehb\r
+       mfc0            s7, _CP0_STATUS\r
+       ins             s7, zero, 10, 7\r
+    ins                s7, zero, 18, 1\r
+       ori                     s6, s7, ( configMAX_SYSCALL_INTERRUPT_PRIORITY << 10 ) | 1\r
+\r
+       /* This mtc0 re-enables interrupts, but only above\r
+       configMAX_SYSCALL_INTERRUPT_PRIORITY. */\r
+       mtc0            s6, _CP0_STATUS\r
+       ehb\r
+\r
+       /* Clear the software interrupt in the core. */\r
+       mfc0            s6, _CP0_CAUSE\r
+       ins                     s6, zero, 8, 1\r
+       mtc0            s6, _CP0_CAUSE\r
+       ehb\r
+\r
+       /* Clear the interrupt in the interrupt controller. */\r
+       la                      s6, IFS0CLR\r
+       addiu           s4, zero, 2\r
+       sw                      s4, (s6)\r
+\r
+       jal                     vTaskSwitchContext\r
+       nop\r
+\r
+       /* Clear the interrupt mask again.  The saved status value is still in s7. */\r
+       mtc0            s7, _CP0_STATUS\r
+       ehb\r
+\r
+       /* Restore the stack pointer from the TCB. */\r
+       la                      s0, pxCurrentTCB\r
+       lw                      s0, (s0)\r
+       lw                      s5, (s0)\r
+\r
+       /* Restore the rest of the context. */\r
+       lw                      s0, 128(s5)\r
+       mthi            s0, $ac1\r
+       lw                      s0, 124(s5)\r
+       mtlo            s0, $ac1\r
+\r
+       lw                      s0, 136(s5)\r
+       mthi            s0, $ac2\r
+       lw                      s0, 132(s5)\r
+       mtlo            s0, $ac2\r
+\r
+       lw                      s0, 144(s5)\r
+       mthi            s0, $ac3\r
+       lw                      s0, 140(s5)\r
+       mtlo            s0, $ac3\r
+\r
+       lw                      s0, 148(s5)\r
+       wrdsp           s0\r
+\r
+       lw                      s0, 8(s5)\r
+       mtlo            s0, $ac0\r
+       lw                      s0, 12(s5)\r
+       mthi            s0, $ac0\r
+\r
+       lw                      $1, 16(s5)\r
+       lw                      s0, 20(s5)\r
+       lw                      s1, 24(s5)\r
+       lw                      s2, 28(s5)\r
+       lw                      s3, 32(s5)\r
+       lw                      s4, 36(s5)\r
+\r
+       /* s5 is loaded later. */\r
+       lw                      s6, 44(s5)\r
+       lw                      s7, 48(s5)\r
+       lw                      v0, 52(s5)\r
+       lw                      v1, 56(s5)\r
+       lw                      a0, 60(s5)\r
+       lw                      a1, 64(s5)\r
+       lw                      a2, 68(s5)\r
+       lw                      a3, 72(s5)\r
+       lw                      t0, 76(s5)\r
+       lw                      t1, 80(s5)\r
+       lw                      t2, 84(s5)\r
+       lw                      t3, 88(s5)\r
+       lw                      t4, 92(s5)\r
+       lw                      t5, 96(s5)\r
+       lw                      t6, 100(s5)\r
+       lw                      t7, 104(s5)\r
+       lw                      t8, 108(s5)\r
+       lw                      t9, 112(s5)\r
+       lw                      s8, 116(s5)\r
+       lw                      ra, 120(s5)\r
+\r
+       /* Protect access to the k registers, and others. */\r
+       di\r
+       ehb\r
+\r
+       /* Set nesting back to zero.  As the lowest priority interrupt this\r
+       interrupt cannot have nested. */\r
+       la                      k0, uxInterruptNesting\r
+       sw                      zero, 0(k0)\r
+\r
+       /* Switch back to use the real stack pointer. */\r
+       add                     sp, zero, s5\r
+\r
+       /* Restore the real s5 value. */\r
+       lw                      s5, 40(sp)\r
+\r
+       /* Pop the status and epc values. */\r
+       lw                      k1, portSTATUS_STACK_LOCATION(sp)\r
+       lw                      k0, portEPC_STACK_LOCATION(sp)\r
+\r
+       /* Remove stack frame. */\r
+       addiu           sp, sp, portCONTEXT_SIZE\r
+\r
+       mtc0            k1, _CP0_STATUS\r
+       mtc0            k0, _CP0_EPC\r
+       ehb\r
+       eret\r
+       nop\r
+\r
+       .end            vPortYieldISR\r
+\r
+\r
+\r
diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h
new file mode 100644 (file)
index 0000000..86dde73
--- /dev/null
@@ -0,0 +1,232 @@
+/*\r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+#ifndef PORTMACRO_H\r
+#define PORTMACRO_H\r
+\r
+/* System include files */\r
+#include <xc.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/*-----------------------------------------------------------\r
+ * Port specific definitions.\r
+ *\r
+ * The settings in this file configure FreeRTOS correctly for the\r
+ * given hardware and compiler.\r
+ *\r
+ * These settings should not be altered.\r
+ *-----------------------------------------------------------\r
+ */\r
+\r
+/* Type definitions. */\r
+#define portCHAR               char\r
+#define portFLOAT              float\r
+#define portDOUBLE             double\r
+#define portLONG               long\r
+#define portSHORT              short\r
+#define portSTACK_TYPE unsigned long\r
+#define portBASE_TYPE  long\r
+\r
+#if( configUSE_16_BIT_TICKS == 1 )\r
+       typedef unsigned portSHORT portTickType;\r
+       #define portMAX_DELAY ( portTickType ) 0xffff\r
+#else\r
+       typedef unsigned long portTickType;\r
+       #define portMAX_DELAY ( portTickType ) 0xffffffff\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Hardware specifics. */\r
+#define portBYTE_ALIGNMENT                     8\r
+#define portSTACK_GROWTH                       -1\r
+#define portTICK_RATE_MS                       ( ( portTickType ) 1000 / configTICK_RATE_HZ )\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Critical section management. */\r
+#define portIPL_SHIFT                          ( 10UL )\r
+/* Don't straddle the CEE bit.  Interrupts calling FreeRTOS functions should \r
+never have higher IPL bits set anyway. */\r
+#define portALL_IPL_BITS                       ( 0x7FUL << portIPL_SHIFT )\r
+#define portSW0_BIT                                    ( 0x01 << 8 )\r
+\r
+/* This clears the IPL bits, then sets them to\r
+configMAX_SYSCALL_INTERRUPT_PRIORITY.  An extra check is performed if\r
+configASSERT() is defined to ensure an assertion handler does not inadvertently\r
+attempt to lower the IPL when the call to assert was triggered because the IPL\r
+value was found to be above configMAX_SYSCALL_INTERRUPT_PRIORITY when an ISR\r
+safe FreeRTOS API function was executed.  ISR safe FreeRTOS API functions are\r
+those that end in FromISR.  FreeRTOS maintains a separate interrupt API to\r
+ensure API function and interrupt entry is as fast and as simple as possible. */\r
+#ifdef configASSERT\r
+       #define portDISABLE_INTERRUPTS()                                                                                        \\r
+       {                                                                                                                                                       \\r
+       unsigned long ulStatus;                                                                                                         \\r
+                                                                                                                                                               \\r
+               /* Mask interrupts at and below the kernel interrupt priority. */               \\r
+               ulStatus = _CP0_GET_STATUS();                                                                                   \\r
+                                                                                                                                                               \\r
+               /* Is the current IPL below configMAX_SYSCALL_INTERRUPT_PRIORITY? */    \\r
+               if( ( ( ulStatus & portALL_IPL_BITS ) >> portIPL_SHIFT ) < configMAX_SYSCALL_INTERRUPT_PRIORITY ) \\r
+               {                                                                                                                                               \\r
+                       ulStatus &= ~portALL_IPL_BITS;                                                                          \\r
+                       _CP0_SET_STATUS( ( ulStatus | ( configMAX_SYSCALL_INTERRUPT_PRIORITY << portIPL_SHIFT ) ) ); \\r
+               }                                                                                                                                               \\r
+       }\r
+#else /* configASSERT */\r
+       #define portDISABLE_INTERRUPTS()                                                                                \\r
+       {                                                                                                                                               \\r
+       unsigned long ulStatus;                                                                                                 \\r
+                                                                                                                                                       \\r
+               /* Mask interrupts at and below the kernel interrupt priority. */       \\r
+               ulStatus = _CP0_GET_STATUS();                                                                           \\r
+               ulStatus &= ~portALL_IPL_BITS;                                                                          \\r
+               _CP0_SET_STATUS( ( ulStatus | ( configMAX_SYSCALL_INTERRUPT_PRIORITY << portIPL_SHIFT ) ) ); \\r
+       }\r
+#endif /* configASSERT */\r
+\r
+#define portENABLE_INTERRUPTS()                                                                                        \\r
+{                                                                                                                                              \\r
+unsigned long ulStatus;                                                                                                        \\r
+                                                                                                                                               \\r
+       /* Unmask all interrupts. */                                                                            \\r
+       ulStatus = _CP0_GET_STATUS();                                                                           \\r
+       ulStatus &= ~portALL_IPL_BITS;                                                                          \\r
+       _CP0_SET_STATUS( ulStatus );                                                                            \\r
+}\r
+\r
+\r
+extern void vTaskEnterCritical( void );\r
+extern void vTaskExitCritical( void );\r
+#define portCRITICAL_NESTING_IN_TCB    1\r
+#define portENTER_CRITICAL()           vTaskEnterCritical()\r
+#define portEXIT_CRITICAL()                    vTaskExitCritical()\r
+\r
+extern unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR();\r
+extern void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE );\r
+#define portSET_INTERRUPT_MASK_FROM_ISR() uxPortSetInterruptMaskFromISR()\r
+#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) vPortClearInterruptMaskFromISR( uxSavedStatusRegister )\r
+\r
+#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1\r
+\r
+       /* Check the configuration. */\r
+       #if( configMAX_PRIORITIES > 32 )\r
+               #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 difference priorities as tasks that share a priority will time slice.\r
+       #endif\r
+\r
+       /* Store/clear the ready priorities in a bit map. */\r
+       #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )\r
+       #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )\r
+\r
+       /*-----------------------------------------------------------*/\r
+\r
+       #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31 - _clz( ( uxReadyPriorities ) ) )\r
+\r
+#endif /* taskRECORD_READY_PRIORITY */\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Task utilities. */\r
+\r
+#define portYIELD()                                                            \\r
+{                                                                                              \\r
+unsigned long ulCause;                                                 \\r
+                                                                                               \\r
+       /* Trigger software interrupt. */                       \\r
+       ulCause = _CP0_GET_CAUSE();                                     \\r
+       ulCause |= portSW0_BIT;                                         \\r
+       _CP0_SET_CAUSE( ulCause );                                      \\r
+}\r
+\r
+#define portCURRENT_INTERRUPT_PRIORITY ( ( _CP0_GET_STATUS() & portALL_IPL_BITS ) >> portIPL_SHIFT )\r
+#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() configASSERT( portCURRENT_INTERRUPT_PRIORITY <= configMAX_SYSCALL_INTERRUPT_PRIORITY )\r
+\r
+#define portNOP()      __asm volatile ( "nop" )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Task function macros as described on the FreeRTOS.org WEB site. */\r
+#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__((noreturn))\r
+#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
+/*-----------------------------------------------------------*/\r
+\r
+#define portEND_SWITCHING_ISR( xSwitchRequired )       if( xSwitchRequired )   \\r
+                                                                                                       {                                               \\r
+                                                                                                               portYIELD();            \\r
+                                                                                                       }\r
+\r
+/* Required by the kernel aware debugger. */\r
+#ifdef __DEBUG\r
+       #define portREMOVE_STATIC_QUALIFIER\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* PORTMACRO_H */\r
+\r