Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

MPLAB RTOS viewer

Posted by Oleg Mazurov on February 16, 2009
There is a FreeRTOS dropdown in MPLAB v8.20 RTOS viewer. When selected, it shows some (correct) information, like number of tasks, ticks, queues, etc. However, the tasks window is empty. What do I need to do to get this window populated with task information?

RE: MPLAB RTOS viewer

Posted by mike on February 17, 2009
Hello Oleg

You need to set configQUEUE_REGISTRY_SIZE to the maximum number of Queues, the FreeRTOSConfig.h is a likely place. This then shows the queue data. It still shows no tasks, and no task data though

Regards
Mike

RE: MPLAB RTOS viewer

Posted by mike on February 17, 2009
Hi again

If you set configUSE_TRACE_FACILITY to '1' (also in FreeRTOSConfig.h) the tasks now appear in the the viewer - you use more memory of course and slow the operation down but...

Regards

Mike

RE: MPLAB RTOS viewer

Posted by Oleg Mazurov on February 17, 2009
Hi Mike,

Thank you for the information. When I'm trying to compile with configUSE_TRACE_FACILITY I get the following error:

Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4520 /i"C:\MCC18\h" -I"Z:\projects\RTOS_USB_Host\RTOS_Source" "RTOS_Source\tasks.c" -fo="tasks.o" -D__DEBUG -D__MPLAB_DEBUGGER_ICD2=1 -w3 -DMPLAB_PIC18F_PORT -Ls -Opa- -nw 2074 -nw 2066

MPLAB C18 v3.22 (demo)

Copyright 2000-2008 Microchip Technology Inc.

Days remaining until demo becomes feature limited: 24

Z:\projects\RTOS_USB_Host\RTOS_Source\tasks.c:1820:Error [1131] type mismatch in assignment
Z:\projects\RTOS_USB_Host\RTOS_Source\tasks.c:1823:Error [1131] type mismatch in assignment

pointing to two listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList ); lines in the follwing fragment of code:

#if ( configUSE_TRACE_FACILITY == 1 )

static void prvListTaskWithinSingleList( const signed portCHAR *pcWriteBuffer, xList *pxList, signed portCHAR cStatus )
{
volatile tskTCB *pxNextTCB, *pxFirstTCB;
unsigned portSHORT usStackRemaining;

/* Write the details of all the TCB's in pxList into the buffer. */
listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList );
do
{
listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );
usStackRemaining = usTaskCheckFreeStackSpace( ( unsigned portCHAR * ) pxNextTCB->pxStack );
sprintf( pcStatusString, ( portCHAR * ) "%s\t\t%c\t%u\t%u\t%u\r\n", pxNextTCB->pcTaskName, cStatus, ( unsigned int ) pxNextTCB->uxPriority, usStackRemaining, ( unsigned int ) pxNextTCB->uxTCBNumber );
strcat( ( portCHAR * ) pcWriteBuffer, ( portCHAR * ) pcStatusString );

} while( pxNextTCB != pxFirstTCB );
}

#endif


my FreeRTOSConfig.h definitions are as follows:

#define configUSE_PREEMPTION1
#define configUSE_IDLE_HOOK1
#define configUSE_TICK_HOOK0
#define configTICK_RATE_HZ( ( portTickType ) 1000 )
#define configCPU_CLOCK_HZ( ( unsigned portLONG ) 10000000 )
#define configMAX_PRIORITIES( ( unsigned portBASE_TYPE ) 3 )
#define configMINIMAL_STACK_SIZE( 105 )//init.105
#define configTOTAL_HEAP_SIZE( ( size_t ) 796 /* 1052 */)
#define configMAX_TASK_NAME_LEN( 4 )
#define configUSE_TRACE_FACILITY1
#define configUSE_16_BIT_TICKS1
#define configIDLE_SHOULD_YIELD1
#define configUSE_MUTEXES1
//#define configCHECK_FOR_STACK_OVERFLOW1
#define configUSE_APPLICATION_TASK_TAG1

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 1 )

/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */

#define INCLUDE_vTaskPrioritySet0
#define INCLUDE_uxTaskPriorityGet0
#define INCLUDE_vTaskDelete1
#define INCLUDE_vTaskCleanUpResources0
#define INCLUDE_vTaskSuspend1
#define INCLUDE_vTaskDelayUntil1
#define INCLUDE_vTaskDelay1
#define INCLUDE_uxTaskGetStackHighWaterMark 1


Could you please take a look and tell me what's wrong?

Thank you,
Oleg.

RE: MPLAB RTOS viewer

Posted by Juan_Pablo Garcia_Martinez on February 18, 2009
There are some casts that need to be added for MCC18 compiler, either remove warnings or remove errors.

Look for in list.h line 193 and:

pxTCB = (volatile tskTCB *) (px....



RE: MPLAB RTOS viewer

Posted by mike on February 18, 2009
The element ( pxConstList )->pxIndex->pvOwner is defined as void *, and I guess the C18 compiler does not silently cast pointer types as some do. I can't argue about whether they should!

RE: MPLAB RTOS viewer

Posted by Oleg Mazurov on February 19, 2009
Thank you, Juan and Mike. I compiled with configUSE_TRACE_FACILITY but it didn't help much. I still can't get a list of tasks in RTOS viewer window reliably. It works OK under simulator. It doesn't show anything with ICD2. Also, queue list is strange - sometimes it contains one queue, sometimes 3, sometimes 10 (I have 4 queues and 2 semaphores). I think now that this feature in MPLAB is too new to be useful.

RE: MPLAB RTOS viewer

Posted by Juan_Pablo Garcia_Martinez on February 19, 2009
I don't remember where I read about MPLAB RTOS viewer tool is only available for C30 and C32. I've tested with C30 and PIC24 that RTOS viewer is OK. Nevertheles this tool do not provides so much information.
Macros available fom 5.0.0 version of FreeRTOS are better solution and platform independent. Meanwhyle Microchip takes in account that FreeRTOS is becoming the best choice, for many people that will select PIC or another platform if FreeRTOS is supported or not.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists