Yahoo Groups archive

Lpc2000

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

Message

[lpc2000] ARM_UCOS port and the use of stmfd/ldmfd

2005-09-20 by David Hawkins

Hey Michael,

In your port os_cpu_a.S, you use the store/load-multiple
instructions in your context save and restore routines, whereas
in Jean Labrosse's versions he uses individual instructions.

The comment made by Jean in one or more of his app notes runs 
along the lines that in User/System mode the store/load-multiple 
instructions are unsafe. Sure enough the ARM-ARM makes some 
comments to that extent, but the comments are a bit obtuse
(to me anyway). It may be that in some situations the code 
is unsafe while in others its ok.

In an earlier version of your port, tasks ran in supervisor
mode (in which the store/load multiple instructions would
be deemed safe). From init.S from the lpc2xxx folder, it
looks like you leave the processor in SVC mode.
Is this why you chose this mode? 

Any other arguments in favor of SVC vs SYS mode?

Any comments on the store/load-multiple instructions and
issues with their use?

(Philips apps guys - any comments?)

Cheers
Dave Hawkins.
Caltech.

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.