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] [February 2005 Threads] ARM 7 from STMPosted by Nobody/Anonymous on February 4, 2005 Has anyone done a port of FreeRTOS to the new ARM 7 family (STR71x) from STMicroelectronics ?
RE: ARM 7 from STMPosted by Nobody/Anonymous on February 4, 2005 I'm not aware of any.
Which compiler are you wanting to use? If a port for that compiler already exists then it should just be a matter of writting the memory map (linker script) and peripheral setup routines.
RE: ARM 7 from STMPosted by Nobody/Anonymous on February 4, 2005 I'm using a Keil compiler. I already tried to port to my uC with the actual port of LPC21xx from philips. The memory mapping is checked, but my problems were with software interrupts and mode for the context switching...
RE: ARM 7 from STMPosted by Nobody/Anonymous on February 4, 2005 Here are a few pointers.
----
Check the startup code [it can be compared to that for the lpc2000 demo]. Make sure that the stacks are all configured correctly. Here are some suggested sizes.
UND_Stack_Size EQU 0x00000004 SVC_Stack_Size EQU 0x00000100 ABT_Stack_Size EQU 0x00000004 FIQ_Stack_Size EQU 0x00000004 IRQ_Stack_Size EQU 0x00000300 USR_Stack_Size EQU 0x00000200
----
You need to install the SWI handler and set the IRQ vector. The LPC2000 port assumes that there is an interrupt controller at PC,[PC, #-0x0FF0] from the IRQ vector.
Vectors: LDR PC,Reset_Addr LDR PC,Undef_Addr LDR PC,SWI_Addr LDR PC,PAbt_Addr LDR PC,DAbt_Addr NOP /* Reserved Vector */ ; LDR PC,IRQ_Addr LDR PC,[PC, #-0x0FF0] /* Vector from VicVectAddr */ LDR PC,FIQ_Addr
Reset_Addr: DD Reset_Handler Undef_Addr: DD Undef_Handler?A SWI_Addr: DD vPortYieldProcessor?A PAbt_Addr: DD PAbt_Handler?A DAbt_Addr: DD DAbt_Handler?A DD 0 /* Reserved Address */ IRQ_Addr: DD IRQ_Handler?A FIQ_Addr: DD FIQ_Handler?A
----
Hardware configuration needs consideration. The phase locked loop and interrupt controller are specific to the LPC and may be different on your uC. Also the timer that generates the tick interrupt will require modification to your particular uC peripheral standard.
----
Try starting with the simplest of programs and without using the preemptive scheduler (set portUSE_PREEMPTION to 0). A sample program would be along the lines of:
void main( void ) { sTaskCreate( TestTask, "test", portMINIMAL_STACK_SIZE, NULL, 0, NULL ); vTaskStartScheduler( portUSE_PREEMPTION ); /* Should not get here. */ }
void TestTask( void *pvParameters ) { for( ;; ) { taskYIELD(); } }
You will end up with two tasks. TestTask() and the automatically generated Idle task. Neither block so it does not matter if the RTOS tick is not running. With the cooperative scheduler you should be able to step through the code without the tick interrupting you. Step through the code in the Keil simulator and see how far you get then let us know. When you hit a taskYIELD you should go to the SWI handler. Do you ever get into the first task?
RE: ARM 7 from STMPosted by Nobody/Anonymous on February 7, 2005 Thank you. That's worked.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|