Hi all AVR users
The problem is as follows (AVR Studio 4.08 @ mega64/128) :
When using "rcall" to call a subroutine you will get a problem when program gets larger and larger and flash adress locations of subroutine and rcall instruction has a larger distance than 4k. If this happens, rcall is out of range (must use call instead) BUT : AVR assembler does not give any error message or warning !!!!!
The result is that the out of range rcall jumps to a unknown (or msb bits just cleared) location and program unusally hangs og do strange things.
When debugging this have given me hours of search for fail since you often work with caode that (undebugged) may give simular result....
I have asked for a solution bouth from Atmel in Trondheim and Atmel main support center and have got no understanding at all for this problem, Atmel in US didnt see this as a problem at all !! Then, why did ass. give error mess. on rjmp out of range ???
I wonder if anyone have heard of a solution to the out of range rcall instructions. .
When programming I try to create routines as objects that I can use in later designs and that makes this problem bigger.
And, please do not tell me to use a C compiler ;)
Sorry 4 writing this much :)
Morten Bogevik @ Megacon AS