Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: FREERTOS problem on gcc and LPC2138

2005-10-22 by FreeRTOS Info

> PS: Oh my God! I think I've been bumping my head against the desk all
> day for the same exact problem!

The scheduler code always runs in Supervisor mode (the tasks in System
mode).  The processor must therefore be in Supervisor mode when
vTaskStartScheduler() is called, otherwise the code fragment previously
posted will pop the registers into the wrong place.

The startup code for the demo applications ensures the processor is in
Supervisor mode when main() is called.  This is why I try and emphasis in
the docs that the best way of creating a new application is to start with
and then modify the provided code/project.  This way all the compiler
options and the startup code are automatically correct and you will not get
any problems.

I am thinking about updating the code to ensure a switch into Supervisor
mode actually in the scheduler code immediately prior to the first task
being started.  While it would prevent this problem from occurring it is
still really encouraged to use the provided startup code anyway, as it also
configures all the stacks as necessary.

Regards,
Richard.


http://www.FreeRTOS.org

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.