EmbDev.net

Forum: ARM programming with GCC/GNU tools code compatibility


von suresh (Guest)


Rate this post
useful
not useful
Hi all,
I have ported an application c code to arm.The code contains file read &
write functions.But when iam running in simulator(arm realview debugger)
the assembly code is not reading the file from host system.I want to
know whether this is any compatibility problem with gnu and arm realview
debugger.

Thanks in advance
suresh

von Andreas S. (andreas) (Admin)


Rate this post
useful
not useful
I don't know about RealView, but it does work with GCC and the GDB
simulator.

von Martin Thomas (Guest)


Rate this post
useful
not useful
suresh wrote:
> I have ported an application c code to arm.The code contains file read &
> write functions.But when iam running in simulator(arm realview debugger)
> the assembly code is not reading the file from host system.I want to
> know whether this is any compatibility problem with gnu and arm realview
> debugger.

I do not know the RealView toolchain well too (just played with the
RealView-compiler which comes with the Keil uVision eval) so take it for
what it's worth: Searching the RealView-documentation for "semihosting"
should give further information. The gdb-Simulator catches SWI-calls to
provide read/write from/to files on the host-system. Maybe the
RealView-simulator uses a similar approach, if yes: please verify that
the low-level functions ("syscalls") use SWI-calls.

"Repeated suggestion": Since you are using a commercial toolchain the
best place to ask such questions is the tool-vendors's support. There
are support-people who know how their simulator works internaly.

Martin Thomas

von Clifford S. (clifford)


Rate this post
useful
not useful
suresh wrote:
> ...iam running in simulator(arm realview debugger)

Commercial development tools are normally supported by the tool vendor -
perhaps you might try that route. After all, you probably paid for
support when you bought the tool.

I took a quick look at http://www.keil.com/support/ and can find no
evidence that a host file system (or semi-hosting) is supported.

Clifford

von suresh (Guest)


Rate this post
useful
not useful
Clifford Slocombe wrote:
> suresh wrote:
>> ...iam running in simulator(arm realview debugger)
>
> Commercial development tools are normally supported by the tool vendor -
> perhaps you might try that route. After all, you probably paid for
> support when you bought the tool.
>
> I took a quick look at http://www.keil.com/support/ and can find no
> evidence that a host file system (or semi-hosting) is supported.
>
> Clifford

Hi all,
I cannot get support from arm ,since i have used the gnu tool chain for
cross compilation.Can any one could tell me the c FILE structure
definition and the structure elements.Iam planning to force the file
pointer to a memory location through load option in debugger, instead of
from the hard disk.Is there any problem inthat or will it work
Thanks in advance
suresh

von Martin Thomas (Guest)


Rate this post
useful
not useful
suresh wrote:
> Clifford Slocombe wrote:
>> suresh wrote:
>>> ...iam running in simulator(arm realview debugger)
>>
>> Commercial development tools are normally supported by the tool vendor -
>> perhaps you might try that route. After all, you probably paid for
>> support when you bought the tool.
>>
>> I took a quick look at http://www.keil.com/support/ and can find no
>> evidence that a host file system (or semi-hosting) is supported.
>>
>> Clifford
>
> Hi all,
> I cannot get support from arm ,since i have used the gnu tool chain for
> cross compilation.Can any one could tell me the c FILE structure
> definition and the structure elements.Iam planning to force the file
> pointer to a memory location through load option in debugger, instead of
> from the hard disk.Is there any problem inthat or will it work
> Thanks in advance
> suresh

Keil uses it's own simulator as far as I know. I think the
RealView-simulator is a completly different product (although Keil is
now owned by ARM). Semihosting is documented in the ARM manuals (just
did a quick browse: Compiler&Libary-Manual and ARM Armulator-Manual).
The Simulator uses SWI-calls for the low-level IO-functions which are
processed by the simulator. So you just have to implement the syscalls
with SWIs. Basicly the same as in the gdb-simulator (also called
Armulator). See the newlib-code the code for the syscalls already
include SWI-handling ("AngelSWI") so there is no need to reinvent "all"
wheels.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.