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


MPLAB PIC32MX reserved instruction?

Posted by ulmus on January 4, 2012
Hi! I try to run freeRTOS for the first time, i have main.c as simple as possible:

int main( void )
/* Finally start the scheduler. */

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

void vApplicationStackOverflowHook( void )
/* Look at pxCurrentTCB to see which task overflowed its stack. */
for( ;; );

but i get exception titled:
EXCEP_RI, // reserved instruction

dissamble looks like:

2120: static void prvCheckTasksWaitingTermination( void )
2121: {
9D002138 27BDFFF8 addiu sp,sp,-8
9D00213C AFBE0000 sw s8,0(sp) <--- exception address points here
9D002140 03A0F021 addu s8,sp,zero
9D002144 03C0E821 addu sp,s8,zero
9D002148 8FBE0000 lw s8,0(sp)
9D00214C 27BD0008 addiu sp,sp,8
9D002150 03E00008 jr ra

Thanx for any advice, i can't start freeRTOS and dont know why.

RE: MPLAB PIC32MX reserved instruction?

Posted by ulmus on January 4, 2012
I think i got answer:
in main() you have to call
hmm, i googled it but i have also 'Using the freertos' pic32 edition book and in examples from the book there is no call for that function... :(

RE: MPLAB PIC32MX reserved instruction?

Posted by Richard on January 4, 2012
It sounds like you just haven't set up the CPU, which you would have to do for any application you were writing (although the actual setup required depends on the application).

I suggest starting with an existing FreeRTOS demo application. Several are provided with the book, and there is a more complex example in the main FreeRTOS zip file download. Once you have an existing example compiling, you can leave in any configuration and setup necessary in main (the #pragmas at the top of main, and normally a function called prvSetupHardware()), and edit away the rest and replace it with your code.


RE: MPLAB PIC32MX reserved instruction?

Posted by ulmus on January 4, 2012
Thanx, only enable vectored interrupt i was missing:) now all works fine. I have a big application with lots of hardware and now i want to transalte it into freeRTOS app :)
Cross your fingers:)

[ 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