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