ARM (Thumb Mode) _CPU_Context_switch_arm

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Feb 26 08:34:33 UTC 2013


On 02/25/2013 08:37 PM, Matthew J Fletcher wrote:
> Hi,
>
> I guess it my fault for not 100% copying the rtl22xx BSP into my new one, i had
> the cpsr register in a different state at boot_card() time than the generic ARM
> context switch code expects. I think that common binary blob commercial RTOS
> must do a cpsr read before the first context switch, rather than rely on a
> fixed state as i've not encountered this type of issue before.
>

It is the responsibility of the low-level startup code to set up the C runtime 
environment.  For ARMv4 this is done in

http://git.rtems.org/rtems/tree/c/src/lib/libbsp/arm/shared/start/start.S

Some ARM BSPs still use their own startup file since I don't have the time to 
convert them all.

For ARMv7-M the execution context is set up in a ARMv7-M specific start/stop 
multitasking functions:

http://git.rtems.org/rtems/tree/cpukit/score/src/threadstartmultitasking.c

http://git.rtems.org/rtems/tree/cpukit/score/cpu/arm/armv7m-multitasking-start-stop.c

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list