Yahoo Groups archive

Lpc2000

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

Message

Re: ARM_UCOS port and the use of stmfd/ldmfd

2005-09-21 by embeddedjanitor

Skip all valid stuff.... Zoom in on SWI.

> The RTOS, foreground tasks – pretty much all the code
> except for the ISRs run in SVC mode; I don't see any
> good reason to support SWI.

> 
> [ I have been in primary kernel development roles for
> Linux like virtual space user processes (TLB based
> MMU) & protected kernel OS on ARM9, where SWI was very
> much useful ]
> 
> One thought I always have is, Why not SVC?

For the most part, I think you are right. SWI is rather pointless in 
many/most single-chip embedded applications. I have shipped a few 
products that only use SVC and interrupt modes.

> 
> > 
> > Any other arguments in favor of SVC vs SYS mode?

The only time you might realisticly want to support SWI is for semi-
hosting mode support. I have also seen an RTOS done using SWI to make 
all OS calls atomic, but that was rather contrived and it would have 
been done better a duifferent way. Semi-hosting allows BIOS-like 
handlers (for you old x86/DOS rememberers like me) for printing etc to 
be handled by SWI handlers, but that can be typically ignored with no 
ill effects (other than not getting the functionality).

You might have semi-hosting without even realising it. For example, 
libgcc, by default, issues semi-hosting calls for various things like 
divide by zero handling.

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.