EmbDev.net

Forum: ARM programming with GCC/GNU tools -mthumb-interwork, works without it


Author: Carlos Be (cjb)
Posted on:

Rate this post
0 useful
not useful
hi everybody,
first thanks for this great tool WinARM is!

I've been developing some arm code, and now I wan't to build some of it
to thumb mode.

I tried the mthumb-interwork option, but I got a data abort exception
somewhere on my code which wasn't there when using pure arm code. (I
compiled with -mthumb the thumb code).

further experimenting showed me that compiling everything as arm, but
adding -mthumb-interwork for both compiling and linking throws the same
result.

any clues? I'm using the last WinARM suite.

binaries are different of course, but what would make the code fail with
-mthumb-interwork only?

thanks!

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Carlos Be wrote:
> I tried the mthumb-interwork option, but I got a data abort exception
> somewhere on my code which wasn't there when using pure arm code. (I
> compiled with -mthumb the thumb code).

Can you track down the data-abort as explained in this text:
http://www.ethernut.de/en/documents/arm-exceptions.html

>
> further experimenting showed me that compiling everything as arm, but
> adding -mthumb-interwork for both compiling and linking throws the same
> result.
>
> any clues? I'm using the last WinARM suite.

Maybe a call of subroutines: Do you have any assembler-code in your
project which calls subroutines in thumb-mode with "BL"? This will fail.
Try to replace them with a "ldr, bx-sequence.
Maybe an issue with the interrupt-handling. Do you use
"attribute(interrupt)"?

> binaries are different of course, but what would make the code fail with
> -mthumb-interwork only?

Difficult to help without knowing the code. Try to create a minimal
example to reproduce the issue (makefile, linker-script, startup-code,
simple application-code) and attach it to a message in this forum.

Martin Thomas

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.