Quality RTOS & Embedded Software

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


Undefined Handler - STR711

Posted by velososcooby on August 26, 2007

I'm getting an undefined handler on vPortStartFirstTask(). It happens when "SUBS PC, LR, #4" executes... I've checked and MCU is in supervisor mode. I'm using STR711FR0.

Can anyone help me?


RE: Undefined Handler - STR711

Posted by Dave on August 27, 2007
Can you be more specific? You are going into a default interrupt handler, or you are going into the undefined processor mode?

In the former case you will have to determine the source of the interrupt. Which interrupts do you configure prior to starting the first task.

I have no experience of the latter case other than to know the undefined processor mode is something to do with interfacing coprocessors so if you go into this state something very bad has happened.

RE: Undefined Handler - STR711

Posted by velososcooby on August 27, 2007
I'm going into the undefined processor mode.
I'm using FreeRTOS example and I didn't configure other interrupt source than wdg, configured by freertos.
The tasks are created correctly but when restoring context of first task the MCU going into undefined mode.
SUBS PC, LR, #4 must jump for the first task and copy SPSR to CPSR, ok?
If I substitute that by SUB PC, LR, #4 it jumps for the task but stay in supervisor mode, don't enable interrupts and executes the first task forever.

Should I try recover task CPSR without enable interrupts? It doesn't resolve the problem but can show us if the it is wdg interrupt.


RE: Undefined Handler - STR711

Posted by velososcooby on September 1, 2007
The CPSR created for my task was setting THUMB bit and causing the undefined processor mode.
So, I change it by setting thumb bit to 0.


RE: Undefined Handler - STR711

Posted by sotd on September 1, 2007
That something was probably having "-D THUMB_INTERWORK" defined in your makefile.

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

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

Latest News

Version 10.1.0 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.


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


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