FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [January 2006 Threads] Keil arm7 crashes at startup with at91sam7sPosted by Jokke on January 18, 2006 I am using the Keil arm7 port to run on atmels at91sam7s256. When I come to the first portRESTORE_CONTEXT (vPortISRStartFirstTask) the following instructions:
__asm{ LDMFDLR, {R0-R14}^}; __asm{ NOP}; __asm{ LDRLR, [LR, #+60]};
will load 0xaaaaaaaa into LR(=R14), and then try to load LR from there. I have also access to the IAR port, where the same instruction comes, but of some strange reason R13 and R14 are not loaded! Therefore it works with IAR. I find this very strange. Does anyone have an explanation, and most important of course, how should it be for Keil? Shouldn't the correct content be on stack first? Where should that be put there the first time?
Jokke
RE: Keil arm7 crashes at startup with at91sam7sPosted by Nobody/Anonymous on January 18, 2006 The processor is in the wrong mode. It must be in Supervisor mode when vPortISRStartFirst is called.
My guess is that you are using the startup code from the FreeRTOS download when you are running using IAR, but not using something other than that included in the download when running using Keil.
Take a look at the startup code from the downloaded .zip file for the keil demo. This will show you what you need. (unless the mode is set using the IDE for Keil?)
This is a common mistake which is why the code is littered with comments saying that the processor must be in Supervisor mode when the scheduler is started ;-) [as is the WEB documentation].
RE: Keil arm7 crashes at startup with at91samPosted by Jokke on January 18, 2006 OK, I made an attempt to put it in the right mode, but apparently I failed. Thanks
Jokke
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|