[Fwd: Modes, stack setup for "no-OS" ARM app]
Tue Apr 20 14:12:00 GMT 2004
> Another question is how choose the stack size for each mode. For maximum
> flexibility, I guess I should allow the user to control each of the
> stacks via symbols defined in the linker script or similar, but that way
> the start code perhaps get a bit too dependent on external symbols.
I would start at 5K for each stack and see what happens. You can adjust as needed.
> So, you'd run the bulk of the code in User mode even when there is only
> one program that "owns" the hardware?
> Yeah, I guess that's the safest way. Whether I can easily organise my
> code (which is a port of an old M68K app that used to run in Supervisory
> mode, by the way) to make it possible remains to be seen, though...
Make it easy on yourself and run everything in Supervisor. Your previous code is already setup for that. There is alot of support code that is needed to support switching between User and Supervisor. I would only do it your system has requirements for that type of functionality.
-- Joe Kulig
More information about the Newlib