-mthumb-interwork, works without it

OP #1173565
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!
Moderator
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

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.