Quality RTOS & Embedded Software

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


Instruction decode error under MPLAB SIM

Posted by Chris Verges on September 15, 2008
Hey all,

We are starting to build a system around FreeRTOS, and I wanted to verify my dev environment before really getting into the nitty gritty coding. I wrote a simple program that was supposed to only have an Idle task:

#include <plib.h>
#include "FreeRTOS.h"
#include "task.h"

int main(void)
return 0;

void vApplicationStackOverflowHook(void)
/* Run for the hills */

I loaded this up in MPLAB IDE v8.10 and got it to compile fine using C32 v1.0.3. When I loaded the MPLAB SIM debugger and run the program, I get the following errors:

CORE-W0018: Instruction at 0x9fc0120c decoded as Reserved (NOP)
CORE-W0018: Instruction at 0x9fc01210 decoded as Reserved (NOP)
CORE-W0018: Instruction at 0x9fc01214 decoded as Reserved (NOP)
MAXIMUM number of warnings/errors exceeded 200, program execution halted.

I tried to step through the code and have deduced that vTaskStartScheduler() fires off properly and the Idle task runs for awhile. Somewhere around the time a context switch takes place (in the ISR_Support.h file), these errors begin to pop up.

Any ideas?


RE: Instruction decode error under MPLAB SIM

Posted by Chris Verges on September 16, 2008
It turns out that MPLAB SIM has a maximum limit of 215 instructions. (Thanks to Matt Coyler's blog at http://matt.colyer.name/projects/round-robin-scheduler/ for that little trivial piece of information.)

So it looks like it's not really possible to simulate FreeRTOS inside MPLAB's IDE. Talk about hard to debug!

Hope this helps someone else save hours of frustration!

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

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

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 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