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


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. */

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

/* Finally start the scheduler. */

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

static void prvSetupHardware( void )

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


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) 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