out of range error

cancel
Showing results for 
Search instead for 
Did you mean: 

out of range error

2,724 Views
king
Contributor I
Hi,
When I used CodeWarrior compiler for coldfire assembly files, it sometimes gave error messages such as "Error: number is out of range", or "Branch displacement out of range." I suspect it's complaining that size of the code is too large (although it's actually not large).
What's the limit of a function size and loop size? Where can I find an "errors and warnings" manual for compilers? Seems it's not in Freescale's website.
Thanks.
King
Labels (1)
0 Kudos
4 Replies

66 Views
CrasyCat
Specialist III

Hello

I would need to look at the actual source file generating the messages to help out here. These Out of range errors are usually generated when you use a BRA.B instruction with an offset bigger than 128.

But I would need to look at the actual source code to tell you more.

CrasyCat

0 Kudos

66 Views
king
Contributor I

You are right. The problem is about a "ble.s" instruction. After I change it to "ble", the problem is gone. Thanks.

Another question: Is there a way to link a codewarrior generated coldfire library into a GCC based application? Codewarrior gave a good optimization, but GCC linker seems having trouble in finding function index in the library.

0 Kudos

66 Views
CrasyCat
Specialist III

Hello

This will not work as we are using a different ABI as GCC for ColdFire object files.

CrasyCat

0 Kudos

66 Views
J2MEJediMaster
Specialist I
If you've downloaded the CodeWarrior for Coldfire v6.2 version, go to the ..\Freescale\CodeWarrior for Coldfire V6.2\Help\pdf directory. In there you'll find an Assembly manual and a C/++ manual that describe the directives and options you can use with the tools.

---Tom
0 Kudos