This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: printf not working in ARM simulator
- From: Robin Randhawa <robin dot randhawa at gmail dot com>
- To: Portos <contact at portos dot org>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 29 Dec 2008 14:13:20 +0000
- Subject: Re: [ECOS] printf not working in ARM simulator
- References: <21193516.post@talk.nabble.com>
Greetings.
On 28 Dec 2008, at 16:03, Portos wrote:
We're trying to run the eCos examples such as hello.c and
twothreads.c under
arm-elf-gdb with "target sim" (cygwin on a Pentium). They seem to
work when
we remove the calls to printf.
AFAIK, GDB's 'sim' target is more of an instruction level simulation
and does not include
much else, timers and console centric devices included.
You would fare much better if you used a platform simulator such as
qemu or skyeye for ARM.
Googling should provide more information.
We use the default configuration given by the template ARM
Evaluation Board
(AEB-1), and configtool-060710.exe
malloc seems to work. Why doesn't printf work?
It hangs for a while and then exits with the message "ARMulator can't
allocate VM page: Cannot allocate memory".
On some occasions we got the message "unknown SWI encountered -
ffffff -
ignoring" but we can't remember how we got it (perhaps when running
Insight.
The number wasn't always ffffff).
A lot of ARM simulators try to provide glue for implementing a semi-
hosting system. This allows
rudimentary I/O with an external host and this scheme uses SWIs. The
"unknown SWI" message might
be the simulation environment complaining that it doesn't know how to
service an SWI invocation in code.
If someone could tell us how to get printf to work under ecos and ARM
simulation mode, it would be really helpful.
Rinse and repeat your experiments with a platform simulator is what I
would advise.
Cheers,
Robin
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss