Re: ARM code crash on symbian 8.1b device



Hi Wilco,

Regarding your query about "whats wrong with the C code". In this
particular instance, nothing is wrong with the C code, and it would
work just as fine. However, there are other functions (much larger)
which have portions written in inline assembly. To make those
compatible with RVCT 2.2, we first generate .s files from which we get
the corresponding assembly code. So the the RVCT 2.2 compatible code
would look like :

#ifndef RVCT
int foo_func(var1, var2)
{
Original C code without inline assembly
}
#else
__asm int foo_func(var1, var2)
{
assembly code for foo_func from the .s file
}
#endif

where RVCT is a macro I'm using to toggle between C and assembly.

The reason I used pure C code and corresponding assembly generated by
ADS 1.2 is to absolutely rule out any error due to the handcoded
assembly part.
Is there a better/easier way to do this ? I'm a novice at this and any
guidance/suggestions/brickbats will be greatly appreciated ! :-)

Thanks again !

Best,
-g

Wilco Dijkstra wrote:
<gautham.chundi@xxxxxxxxx> wrote in message
news:1163583924.053164.129800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Tauno,

Thanks for the response. I'm pasting the offending code below (Its
fairly long, so I appreciate your response all the more :-) ).

This is for ARM9 TDMI, built on RVCT 2.1 for Symbian 8.1b. We're
testing it on a TI OMAP 2420 board where its crashing. As I'd said
earlier, the equivalent C code works on the device. Also, this assembly
code has been generated by the ARM C compiler from the corresponding C
code using ADS 1.2

There is nothing wrong with the assembly code per se, it is just not
compatible with all the changes you've made. You're using a different
Symbian OS version, a different compiler and most likely different source
code as well. That's 3 ABI changes, making failure a certainty.

The last sentence hints to the problem. Why use disassembled code
compiled by a different compiler as embedded assembler? What was
wrong with the *working* C code?

Wilco

.



Relevant Pages

  • Re: Using RVCT compiler for WinCE
    ... I know how to generate the machine code in RVCT. ... the ARM options that the compiler knows about. ... assembler didn't know about). ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Using RVCT compiler for WinCE
    ... I know how to generate the machine code in RVCT. ... the ARM options that the compiler knows about. ... compiler and then, with the help of a few macros, get the VS2008 ... assembler didn't know about). ...
    (microsoft.public.windowsce.platbuilder)
  • compiler profiling
    ... I am trying to compare the performance of MS compiler with ARM's rvct ... Is some optimization done by MS assembler? ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: ARM code crash on symbian 8.1b device
    ... Thanks for the response. ... a different compiler and most likely different source ... That's 3 ABI changes, making failure a certainty. ... compiled by a different compiler as embedded assembler? ...
    (comp.arch.embedded)
  • Re: ARM code crash on symbian 8.1b device
    ... My code does compile with RVCT 2.2 using RVDS 2.1. ... RVCT doesnt support inline assemby. ... inline assembler, so check it and ensure it is legal inline assembler. ...
    (comp.arch.embedded)