This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ECOS] printf does not work in user mode on Arm E7T


Andrew Lunn wrote:
> 
> This is not an area of eCos i know, so this is more of a guess.
> 
> How is your MMU setup? Maybe in user mode the MMU is stopping access
> to the memory where the serial port is, or some other critical region
> of memory.

The Samsung processor on Evaluator 7T board does not have a MMU.


> What is it trying to do when you get a BUS error? That may
> give you a clue.

What is strange is that I can't step into the printf subroutine: gdb
hangs as soon as I have typed the command stepi.
Actually, it seems that it is the 'branch to subroutine' (Arm BL)
instruction which hangs when executed in user mode: I wrote a small C
program the main function of which merely switches to usr mode and then
call a dummy subprogram, and could observe the same behavior, ie the BL
instruction hangs.
I fear that the problem is related neither to printf nor to newlib or
redboot but to the Arm (Samsung implementation) processor...

Pierre
> On Wed, Mar 26, 2003 at 09:19:51AM +0100, Pierre Habraken wrote:
> > Hello,
> >
> > For demonstration purpose, I have inserted printf calls in a program
> > running on an Arm Evaluator 7T (controlled by gdb as a remote target).
> > The program is linked against newlib libc but and it uses redboot
> > syscalls (redboot.specs).
> > Some parts of the program runs in svc mode (cpsr = 0x13), other parts
> > run in usr mode (cpsr = 0x10), each mode using its own stack.
> > When printf is called with the processor being in svc mode, the
> > corresponding output is displayed in the gdb console and the program
> > continues then with its execution.
> > When printf is called with the processor being in usr mode, nothing is
> > displayed in the gdb console and the program hangs or raises a BUS
> > ERROR.
> > Could someone explain me what printf would not work in user mode ?
> >
> > Thanks in advance for any help.
> >
> > Pierre
> > --
> > ________________________________________________________________________
> > Pierre HABRAKEN - mailto:Pierre dot Habraken at imag dot fr
> > Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87
> > IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex
> > ________________________________________________________________________
> >
> > --
> > Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> > and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> >

-- 
________________________________________________________________________
Pierre HABRAKEN - mailto:Pierre dot Habraken at imag dot fr
Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex
________________________________________________________________________


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]