Quality RTOS & Embedded Software

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




Loading

Trouble with bare new dsPIC project

Posted by John B. on July 13, 2009
I was able to compile, link and run the dsPIC demo on my eval board but cannot get the bare project to compile. Getting error:
In function `prvIdleTask':
C:\FreeRTOS_5.3.1\FreeRTOS\source\tasks.c:1789: undefined reference to `vApplicationIdleHook'

My main code is:

/* Standard includes. */
//#include <stdio.h>

/* Scheduler includes. */
#include "FreeRTOS.h"
#include "task.h"
//#include "queue.h"
//#include "croutine.h"

/*
* Setup the processor ready for the demo.
*/
static void prvSetupHardware( void );

int main( void )
{
/* Configure any hardware required for this demo. */
prvSetupHardware();

/* Create the tasks. */
//xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );

/* Finally start the scheduler. */
vTaskStartScheduler();

/* Will only reach here if there is insufficient heap available to start
the scheduler. */
for (;;);
return 0;
}
/*-----------------------------------------------------------*/

static void prvSetupHardware( void )
{
//vParTestInitialise();
}
/*-----------------------------------------------------------*/

Am I missing something or including something that shouldn't be there?

Thanks!

RE: Trouble with bare new dsPIC project

Posted by Richard Damon on July 13, 2009
Sounds like you have configUSE_IDLE_HOOK set to one, and don't have the vApplicationIdleHook function defined. If you don't need the IdleHook function, change configUSE_ILDE_HOOK to 0, if you want to use an IdleHook, you need to define vApplicationIdleHook.

The idle hook gives a good point to put some simple processing that want to run at idle priority without needing to define a task. the IdleHook function can not block, as the Idletask can not block or the kernel crashes with nothing to run. One use I use for the idleHook is to go to sleep mode.

RE: Trouble with bare new dsPIC project

Posted by John B. on July 13, 2009
Ah yes. It was right there in front of me and I still missed it. Read the manual, eh?

Thanks very much Richard.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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