Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner