Update PIC32MX demo:

Change configCHECK_FOR_STACK_OVERFLOW to 3 to also check the interrupt stack.
Add a build configuration to allow use on the PIC32 USBII starter kit.
Increase some delays when talking to the LCD to ensure it always displays correctly.
Rewrite the register test tasks.
This commit is contained in:
Richard Barry
2013-11-07 09:54:13 +00:00
parent 2ee43fbc64
commit 1b7a2e40a3
21 changed files with 1432 additions and 451 deletions

View File

@ -112,7 +112,7 @@ unsigned long ulStatus;
unsigned long ulCacheStatus; unsigned long ulCacheStatus;
#endif #endif
/* Disable interrupts - not taskDISABLE_INTERRUPTS() cannot be used here as /* Disable interrupts - note taskDISABLE_INTERRUPTS() cannot be used here as
FreeRTOS does not globally disable interrupt. */ FreeRTOS does not globally disable interrupt. */
ulStatus = _CP0_GET_STATUS(); ulStatus = _CP0_GET_STATUS();
_CP0_SET_STATUS( ulStatus & ~hwGLOBAL_INTERRUPT_BIT ); _CP0_SET_STATUS( ulStatus & ~hwGLOBAL_INTERRUPT_BIT );
@ -227,7 +227,7 @@ __OSCCONbits_t xOSCCONBits;
static void prvConfigureWaitStates( void ) static void prvConfigureWaitStates( void )
{ {
unsigned long ulInterruptStatus, ulSystemClock = configCPU_CLOCK_HZ - 1; unsigned long ulSystemClock = configCPU_CLOCK_HZ - 1;
unsigned long ulWaitStates, ulCHECONVal; unsigned long ulWaitStates, ulCHECONVal;
/* 1 wait state for every hwMAX_FLASH_SPEED MHz. */ /* 1 wait state for every hwMAX_FLASH_SPEED MHz. */

View File

@ -89,14 +89,14 @@
#define configPERIPHERAL_CLOCK_HZ ( 40000000UL ) #define configPERIPHERAL_CLOCK_HZ ( 40000000UL )
#define configMAX_PRIORITIES ( 5UL ) #define configMAX_PRIORITIES ( 5UL )
#define configMINIMAL_STACK_SIZE ( 190 ) #define configMINIMAL_STACK_SIZE ( 190 )
#define configISR_STACK_SIZE ( 400 ) #define configISR_STACK_SIZE ( 250 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 28000 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 28000 )
#define configMAX_TASK_NAME_LEN ( 8 ) #define configMAX_TASK_NAME_LEN ( 8 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 0 #define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1 #define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1 #define configUSE_MUTEXES 1
#define configCHECK_FOR_STACK_OVERFLOW 2 #define configCHECK_FOR_STACK_OVERFLOW 3
#define configQUEUE_REGISTRY_SIZE 0 #define configQUEUE_REGISTRY_SIZE 0
#define configUSE_RECURSIVE_MUTEXES 1 #define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 1 #define configUSE_MALLOC_FAILED_HOOK 1
@ -119,7 +119,7 @@ to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1 #define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1 #define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 0 #define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0 #define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1 #define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1 #define INCLUDE_vTaskDelayUntil 1

View File

@ -0,0 +1,127 @@
/*
FreeRTOS V7.5.3 - 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 0x07
#define ptALL_OFF 0x07
#define ptNUM_LEDS 3
/*-----------------------------------------------------------
* Simple parallel port IO routines.
*-----------------------------------------------------------*/
void vParTestInitialise( void )
{
/* Bottom 3 LEDs output. */
TRISD = TRISD & ~ptOUTPUT;
PORTD = PORTD & ~ptALL_OFF;
}
/*-----------------------------------------------------------*/
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned portBASE_TYPE uxLEDBit;
if( uxLED < ptNUM_LEDS )
{
/* Which port A bit is being modified? */
uxLEDBit = 1 << uxLED;
if( xValue != 0 )
{
/* Turn the LED on. Use of the PORTASET register removes the need
to use a critical section. */
PORTDSET = uxLEDBit;
}
else
{
/* Turn the LED off. Use of the PORTACLR register removes the need
to use a critical section. */
PORTDCLR = uxLEDBit;
}
}
}
/*-----------------------------------------------------------*/
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned portBASE_TYPE uxLEDBit;
if( uxLED < ptNUM_LEDS )
{
uxLEDBit = 1 << uxLED;
/* Use of the PORTAINV register removes the need to use a critical section. */
PORTDINV = uxLEDBit;
}
}

View File

@ -1,14 +1,17 @@
# #
#Fri Jul 12 20:19:44 BST 2013 #Thu Nov 07 09:45:12 GMT 2013
USB-II_STARTER_KIT.languagetoolchain.version=1.30
EXPLORER_16_PIC32MX795.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.21\\bin EXPLORER_16_PIC32MX795.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.21\\bin
conf.ids=EXPLORER_16_PIC32MX360,EXPLORER_16_PIC32MX460,EXPLORER_16_PIC32MX795 conf.ids=EXPLORER_16_PIC32MX360,EXPLORER_16_PIC32MX460,EXPLORER_16_PIC32MX795,USB-II_STARTER_KIT
EXPLORER_16_PIC32MX460.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.21\\bin EXPLORER_16_PIC32MX460.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.21\\bin
EXPLORER_16_PIC32MX460.languagetoolchain.version=1.21 EXPLORER_16_PIC32MX460.languagetoolchain.version=1.21
EXPLORER_16_PIC32MX795.languagetoolchain.version=1.21 EXPLORER_16_PIC32MX795.languagetoolchain.version=1.21
EXPLORER_16_PIC32MX460.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=c2a849d41b027acc56c3e38cf973a35e EXPLORER_16_PIC32MX460.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=17fa0f767981f346ca4a53c17aed08b0
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 USB-II_STARTER_KIT.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.30-TC9\\bin
EXPLORER_16_PIC32MX795.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=c2a849d41b027acc56c3e38cf973a35e com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=40187da407bdeaa7cd9b46222921dc29
EXPLORER_16_PIC32MX795.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=17fa0f767981f346ca4a53c17aed08b0
EXPLORER_16_PIC32MX360.languagetoolchain.version=1.21 EXPLORER_16_PIC32MX360.languagetoolchain.version=1.21
EXPLORER_16_PIC32MX360.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.21\\bin EXPLORER_16_PIC32MX360.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.21\\bin
EXPLORER_16_PIC32MX360.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=c2a849d41b027acc56c3e38cf973a35e EXPLORER_16_PIC32MX360.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=17fa0f767981f346ca4a53c17aed08b0
USB-II_STARTER_KIT.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=17fa0f767981f346ca4a53c17aed08b0
host.platform=windows host.platform=windows

View File

@ -27,11 +27,11 @@ CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
PROJECTNAME=RTOSDemo.X PROJECTNAME=RTOSDemo.X
# Active Configuration # Active Configuration
DEFAULTCONF=EXPLORER_16_PIC32MX360 DEFAULTCONF=EXPLORER_16_PIC32MX460
CONF=${DEFAULTCONF} CONF=${DEFAULTCONF}
# All Configurations # All Configurations
ALLCONFS=EXPLORER_16_PIC32MX360 EXPLORER_16_PIC32MX460 EXPLORER_16_PIC32MX795 ALLCONFS=EXPLORER_16_PIC32MX360 EXPLORER_16_PIC32MX460 EXPLORER_16_PIC32MX795 USB-II_STARTER_KIT
# build # build
@ -48,6 +48,7 @@ ALLCONFS=EXPLORER_16_PIC32MX360 EXPLORER_16_PIC32MX460 EXPLORER_16_PIC32MX795
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX360 clean ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX360 clean
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX460 clean ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX460 clean
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX795 clean ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX795 clean
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=USB-II_STARTER_KIT clean
@ -56,6 +57,7 @@ ALLCONFS=EXPLORER_16_PIC32MX360 EXPLORER_16_PIC32MX460 EXPLORER_16_PIC32MX795
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX360 build ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX360 build
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX460 build ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX460 build
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX795 build ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=EXPLORER_16_PIC32MX795 build
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=USB-II_STARTER_KIT build

View File

@ -19,19 +19,19 @@ PATH_TO_IDE_BIN=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../b
# Adding MPLAB X bin directory to path. # Adding MPLAB X bin directory to path.
PATH:=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(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 # Path to java used to run MPLAB X when this makefile was created
MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.6.0_32-windows\java-windows/bin/" MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.7.0_25-windows\java-windows/bin/"
OS_CURRENT="$(shell uname -s)" OS_CURRENT="$(shell uname -s)"
MP_CC="C:\devtools\Microchip\xc32\v1.00\bin\xc32-gcc.exe" MP_CC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-gcc.exe"
# MP_CPPC is not defined MP_CPPC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-g++.exe"
# MP_BC is not defined # MP_BC is not defined
MP_AS="C:\devtools\Microchip\xc32\v1.00\bin\xc32-as.exe" MP_AS="C:\devtools\Microchip\xc32\v1.21\bin\xc32-as.exe"
MP_LD="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ld.exe" MP_LD="C:\devtools\Microchip\xc32\v1.21\bin\xc32-ld.exe"
MP_AR="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ar.exe" MP_AR="C:\devtools\Microchip\xc32\v1.21\bin\xc32-ar.exe"
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" 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.00\bin" MP_CC_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
# MP_CPPC_DIR is not defined MP_CPPC_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
# MP_BC_DIR is not defined # MP_BC_DIR is not defined
MP_AS_DIR="C:\devtools\Microchip\xc32\v1.00\bin" MP_AS_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
MP_LD_DIR="C:\devtools\Microchip\xc32\v1.00\bin" MP_LD_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
MP_AR_DIR="C:\devtools\Microchip\xc32\v1.00\bin" MP_AR_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
# MP_BC_DIR is not defined # MP_BC_DIR is not defined

View File

@ -19,7 +19,7 @@ PATH_TO_IDE_BIN=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../b
# Adding MPLAB X bin directory to path. # Adding MPLAB X bin directory to path.
PATH:=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(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 # 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_17/bin/" MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.7.0_25-windows\java-windows/bin/"
OS_CURRENT="$(shell uname -s)" OS_CURRENT="$(shell uname -s)"
MP_CC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-gcc.exe" MP_CC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-gcc.exe"
MP_CPPC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-g++.exe" MP_CPPC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-g++.exe"

View File

@ -19,19 +19,19 @@ PATH_TO_IDE_BIN=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../b
# Adding MPLAB X bin directory to path. # Adding MPLAB X bin directory to path.
PATH:=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(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 # Path to java used to run MPLAB X when this makefile was created
MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.6.0_32-windows\java-windows/bin/" MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.7.0_25-windows\java-windows/bin/"
OS_CURRENT="$(shell uname -s)" OS_CURRENT="$(shell uname -s)"
MP_CC="C:\devtools\Microchip\xc32\v1.00\bin\xc32-gcc.exe" MP_CC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-gcc.exe"
# MP_CPPC is not defined MP_CPPC="C:\devtools\Microchip\xc32\v1.21\bin\xc32-g++.exe"
# MP_BC is not defined # MP_BC is not defined
MP_AS="C:\devtools\Microchip\xc32\v1.00\bin\xc32-as.exe" MP_AS="C:\devtools\Microchip\xc32\v1.21\bin\xc32-as.exe"
MP_LD="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ld.exe" MP_LD="C:\devtools\Microchip\xc32\v1.21\bin\xc32-ld.exe"
MP_AR="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ar.exe" MP_AR="C:\devtools\Microchip\xc32\v1.21\bin\xc32-ar.exe"
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" 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.00\bin" MP_CC_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
# MP_CPPC_DIR is not defined MP_CPPC_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
# MP_BC_DIR is not defined # MP_BC_DIR is not defined
MP_AS_DIR="C:\devtools\Microchip\xc32\v1.00\bin" MP_AS_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
MP_LD_DIR="C:\devtools\Microchip\xc32\v1.00\bin" MP_LD_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
MP_AR_DIR="C:\devtools\Microchip\xc32\v1.00\bin" MP_AR_DIR="C:\devtools\Microchip\xc32\v1.21\bin"
# MP_BC_DIR is not defined # MP_BC_DIR is not defined

View File

@ -25,3 +25,10 @@ CND_ARTIFACT_PATH_EXPLORER_16_PIC32MX795=dist/EXPLORER_16_PIC32MX795/production/
CND_PACKAGE_DIR_EXPLORER_16_PIC32MX795=${CND_DISTDIR}/EXPLORER_16_PIC32MX795/package CND_PACKAGE_DIR_EXPLORER_16_PIC32MX795=${CND_DISTDIR}/EXPLORER_16_PIC32MX795/package
CND_PACKAGE_NAME_EXPLORER_16_PIC32MX795=rtosdemo.x.tar CND_PACKAGE_NAME_EXPLORER_16_PIC32MX795=rtosdemo.x.tar
CND_PACKAGE_PATH_EXPLORER_16_PIC32MX795=${CND_DISTDIR}/EXPLORER_16_PIC32MX795/package/rtosdemo.x.tar CND_PACKAGE_PATH_EXPLORER_16_PIC32MX795=${CND_DISTDIR}/EXPLORER_16_PIC32MX795/package/rtosdemo.x.tar
# USB-II_STARTER_KIT configuration
CND_ARTIFACT_DIR_USB-II_STARTER_KIT=dist/USB-II_STARTER_KIT/production
CND_ARTIFACT_NAME_USB-II_STARTER_KIT=RTOSDemo.X.production.hex
CND_ARTIFACT_PATH_USB-II_STARTER_KIT=dist/USB-II_STARTER_KIT/production/RTOSDemo.X.production.hex
CND_PACKAGE_DIR_USB-II_STARTER_KIT=${CND_DISTDIR}/USB-II_STARTER_KIT/package
CND_PACKAGE_NAME_USB-II_STARTER_KIT=rtosdemo.x.tar
CND_PACKAGE_PATH_USB-II_STARTER_KIT=${CND_DISTDIR}/USB-II_STARTER_KIT/package/rtosdemo.x.tar

View File

@ -22,7 +22,7 @@
</runprofile> </runprofile>
</conf> </conf>
<conf name="EXPLORER_16_PIC32MX460" type="2"> <conf name="EXPLORER_16_PIC32MX460" type="2">
<platformToolSN>:=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT112942201:=x:=en</platformToolSN> <platformToolSN>:=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT112942201:=x:=b:=en</platformToolSN>
<languageToolchainDir>C:\devtools\Microchip\xc32\v1.21\bin</languageToolchainDir> <languageToolchainDir>C:\devtools\Microchip\xc32\v1.21\bin</languageToolchainDir>
<mdbdebugger version="1"> <mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1> <placeholder1>place holder 1</placeholder1>
@ -57,5 +57,23 @@
</environment> </environment>
</runprofile> </runprofile>
</conf> </conf>
<conf name="USB-II_STARTER_KIT" type="2">
<platformToolSN></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> </confs>
</configurationDescriptor> </configurationDescriptor>

View File

@ -62,6 +62,7 @@ file_034=.
file_035=. file_035=.
file_036=. file_036=.
file_037=. file_037=.
file_038=.
[GENERATED_FILES] [GENERATED_FILES]
file_000=no file_000=no
file_001=no file_001=no
@ -101,6 +102,7 @@ file_034=no
file_035=no file_035=no
file_036=no file_036=no
file_037=no file_037=no
file_038=no
[OTHER_FILES] [OTHER_FILES]
file_000=no file_000=no
file_001=no file_001=no
@ -139,7 +141,8 @@ file_033=no
file_034=no file_034=no
file_035=no file_035=no
file_036=no file_036=no
file_037=yes file_037=no
file_038=yes
[FILE_INFO] [FILE_INFO]
file_000=main.c file_000=main.c
file_001=ParTest\ParTest.c file_001=ParTest\ParTest.c
@ -168,17 +171,18 @@ file_023=..\Common\Minimal\flash_timer.c
file_024=main_full.c file_024=main_full.c
file_025=..\..\Source\timers.c file_025=..\..\Source\timers.c
file_026=main_blinky.c file_026=main_blinky.c
file_027=FreeRTOSConfig.h file_027=ConfigPerformance.c
file_028=..\..\Source\portable\MPLAB\PIC32MX\portmacro.h file_028=FreeRTOSConfig.h
file_029=..\..\Source\include\portable.h file_029=..\..\Source\portable\MPLAB\PIC32MX\portmacro.h
file_030=..\..\Source\include\task.h file_030=..\..\Source\include\portable.h
file_031=..\..\Source\include\croutine.h file_031=..\..\Source\include\task.h
file_032=..\..\Source\include\FreeRTOS.h file_032=..\..\Source\include\croutine.h
file_033=..\..\Source\include\list.h file_033=..\..\Source\include\FreeRTOS.h
file_034=..\..\Source\include\projdefs.h file_034=..\..\Source\include\list.h
file_035=..\..\Source\include\queue.h file_035=..\..\Source\include\projdefs.h
file_036=..\..\Source\include\semphr.h file_036=..\..\Source\include\queue.h
file_037=PIC32MX_MPLAB.map file_037=..\..\Source\include\semphr.h
file_038=PIC32MX_MPLAB.map
[SUITE_INFO] [SUITE_INFO]
suite_guid={14495C23-81F8-43F3-8A44-859C583D7760} suite_guid={14495C23-81F8-43F3-8A44-859C583D7760}
suite_state= suite_state=

View File

@ -2,6 +2,6 @@
MagicCookie={0b13fe8c-dfe0-40eb-8900-6712719559a7} MagicCookie={0b13fe8c-dfe0-40eb-8900-6712719559a7}
Version=1.0 Version=1.0
[TOOL_LOC_STAMPS] [TOOL_LOC_STAMPS]
tool_loc{92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}=C:\devtools\Microchip\mplabc32\v2.02\bin\pic32-ar.exe tool_loc{92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}=C:\devtools\Microchip\xc32\v1.21\bin\xc32-ar.exe
tool_loc{430F471F-7ECB-4852-A80D-DEF9A5C8E751}=C:\devtools\Microchip\mplabc32\v2.02\bin\pic32-gcc.exe tool_loc{430F471F-7ECB-4852-A80D-DEF9A5C8E751}=C:\devtools\Microchip\xc32\v1.21\bin\xc32-gcc.exe
tool_loc{C68E5105-1196-4333-A0BF-3DC57271E614}=C:\devtools\Microchip\mplabc32\v2.02\bin\pic32-ld.exe tool_loc{C68E5105-1196-4333-A0BF-3DC57271E614}=C:\devtools\Microchip\xc32\v1.21\bin\xc32-ld.exe

File diff suppressed because it is too large Load Diff

View File

@ -106,7 +106,7 @@ static void prvLCDClear( void );
/* Brief delay to permit the LCD to catch up with commands. */ /* Brief delay to permit the LCD to catch up with commands. */
#define lcdVERY_SHORT_DELAY ( 1 ) #define lcdVERY_SHORT_DELAY ( 1 )
#define lcdSHORT_DELAY ( 4 / portTICK_RATE_MS ) #define lcdSHORT_DELAY ( 8 / portTICK_RATE_MS )
#define lcdLONG_DELAY ( 15 / portTICK_RATE_MS ) #define lcdLONG_DELAY ( 15 / portTICK_RATE_MS )
/* LCD specific definitions. */ /* LCD specific definitions. */

View File

@ -229,7 +229,7 @@ volatile unsigned long ul = 0;
( void ) pcFile; ( void ) pcFile;
( void ) ulLine; ( void ) ulLine;
taskENTER_CRITICAL(); __asm volatile( "di" );
{ {
/* Set ul to a non-zero value using the debugger to step out of this /* Set ul to a non-zero value using the debugger to step out of this
function. */ function. */
@ -238,5 +238,5 @@ volatile unsigned long ul = 0;
portNOP(); portNOP();
} }
} }
taskEXIT_CRITICAL(); __asm volatile( "ei" );
} }

View File

@ -166,9 +166,6 @@ in ticks using the portTICK_RATE_MS constant. */
#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY ) #define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) #define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )
/* The LED controlled by the 'check' software timer. */
#define mainCHECK_LED ( 7 )
/* The LED used by the comtest tasks. mainCOM_TEST_LED + 1 is also used. /* The LED used by the comtest tasks. mainCOM_TEST_LED + 1 is also used.
See the comtest.c file for more information. */ See the comtest.c file for more information. */
#define mainCOM_TEST_LED ( 4 ) #define mainCOM_TEST_LED ( 4 )
@ -194,8 +191,16 @@ test" interrupt. */
#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) ( configCPU_CLOCK_HZ >> 1 ) ) * 1000000000.0 ) ) #define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) ( configCPU_CLOCK_HZ >> 1 ) ) * 1000000000.0 ) )
/* The number of LEDs that should be controlled by the flash software timer /* The number of LEDs that should be controlled by the flash software timer
standard demo. */ standard demo and the LED to be toggle by the check task. The starter kit only
#define mainNUM_FLASH_TIMER_LEDS ( 3 ) has three LEDs so when the demo is configured to run on the starter kit there
is one less flash timer so the check task can use the third LED. */
#ifdef PIC32_STARTER_KIT
#define mainNUM_FLASH_TIMER_LEDS ( 2 )
#define mainCHECK_LED ( 2 )
#else
#define mainNUM_FLASH_TIMER_LEDS ( 3 )
#define mainCHECK_LED ( 7 )
#endif
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -228,10 +233,6 @@ static void prvRegTestTask2( void *pvParameters );
/* The queue used to send messages to the LCD task. */ /* The queue used to send messages to the LCD task. */
static xQueueHandle xLCDQueue; static xQueueHandle xLCDQueue;
/* Flag used by prvRegTestTask1() and prvRegTestTask2() to indicate their status
(pass/fail). */
volatile unsigned long ulStatus1 = pdPASS;
/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on /* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on
each iteration of their function. This is used to detect either task stopping each iteration of their function. This is used to detect either task stopping
their execution.. */ their execution.. */
@ -308,15 +309,15 @@ static void prvRegTestTask1( void *pvParameters )
{ {
extern void vRegTest1( volatile unsigned long * ); extern void vRegTest1( volatile unsigned long * );
for( ;; ) /* Avoid compiler warnings. */
{ ( void ) pvParameters;
/* Perform the register test function. */
vRegTest1( &ulStatus1 );
/* Increment the counter so the check task knows we are still /* Pass the address of the RegTest1 loop counter into the test function,
running. */ which is necessarily implemented in assembler. */
ulRegTest1Cycles++; vRegTest1( &ulRegTest1Cycles );
}
/* vRegTest1 should never exit! */
vTaskDelete( NULL );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -324,15 +325,15 @@ static void prvRegTestTask2( void *pvParameters )
{ {
extern void vRegTest2( volatile unsigned long * ); extern void vRegTest2( volatile unsigned long * );
for( ;; ) /* Avoid compiler warnings. */
{ ( void ) pvParameters;
/* Perform the register test function. */
vRegTest2( &ulStatus1 );
/* Increment the counter so the check task knows we are still /* Pass the address of the RegTest2 loop counter into the test function,
running. */ which is necessarily implemented in assembler. */
ulRegTest2Cycles++; vRegTest2( &ulRegTest2Cycles );
}
/* vRegTest1 should never exit! */
vTaskDelete( NULL );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -348,12 +349,6 @@ static char cStringBuffer[ mainMAX_STRING_LENGTH ];
extern unsigned long ulHighFrequencyTimerInterrupts; extern unsigned long ulHighFrequencyTimerInterrupts;
static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
/* Has either register check 1 or 2 task discovered an error? */
if( ulStatus1 != pdPASS )
{
xMessage.pcMessage = "Error: Reg test1";
}
/* Check that the register test 1 task is still running. */ /* Check that the register test 1 task is still running. */
if( ulLastRegTest1Value == ulRegTest1Cycles ) if( ulLastRegTest1Value == ulRegTest1Cycles )
{ {
@ -380,10 +375,6 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
{ {
xMessage.pcMessage = "Error: Q Peek"; xMessage.pcMessage = "Error: Q Peek";
} }
else if( xAreComTestTasksStillRunning() != pdTRUE )
{
xMessage.pcMessage = "Error: COM test";
}
else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
{ {
xMessage.pcMessage = "Error: Blck time"; xMessage.pcMessage = "Error: Blck time";
@ -396,6 +387,12 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
{ {
xMessage.pcMessage = "Error: Int queue"; xMessage.pcMessage = "Error: Int queue";
} }
#if !defined(__32MX795F512L__)
else if( xAreComTestTasksStillRunning() != pdTRUE )
{
xMessage.pcMessage = "Error: COM test";
}
#endif
if( xMessage.pcMessage != cStringBuffer ) if( xMessage.pcMessage != cStringBuffer )
{ {