EmbDev.net

Forum: ARM programming with GCC/GNU tools code compatibility


Author: suresh (Guest)
Posted on:

Rate this post
0 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

Author: Andreas Schwarz (andreas) (Admin) Flattr this
Posted on:

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

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 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

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 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

Author: suresh (Guest)
Posted on:

Rate this post
0 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

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 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.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.