[ECOS] printf not working in ARM simulator
Tue Dec 30 11:10:00 GMT 2008
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
> 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
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss