Quality RTOS & Embedded Software

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




Loading

ARM 7 from STM

Posted 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 STM

Posted 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 STM

Posted 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 STM

Posted 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 STM

Posted by Nobody/Anonymous on February 7, 2005
Thank you. That's worked.


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




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

Latest News

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