#47380 - batblaster - Fri Jul 08, 2005 9:07 am
Hi,
I have changed the compiler and from gcc 322 i moved to gcc 344 but now the code have an alignment problem how i can fix ??/ the project is very big is a complete game and i changed the compiler to solve another problem of the gcc 322
Thanks a lot..
_________________
Batblaster / 7 Raven Studios Co. Ltd
------------------------------------------
#47388 - tum_ - Fri Jul 08, 2005 2:37 pm
batblaster wrote: |
Hi,
I have changed the compiler and from gcc 322 i moved to gcc 344 but now the code have an alignment problem how i can fix ??/ the project is very big is a complete game and i changed the compiler to solve another problem of the gcc 322
Thanks a lot.. |
Do you mind describing the problem? Compiler error/warning?
If yes, what does it say? Quote the piece of code that causes it.
#47393 - batblaster - Fri Jul 08, 2005 3:16 pm
Hi,
the compiler do not give me any error, only with gcc3.2.2 i compile my game and all works fine with gcc 3.4.4 , the last available, when i compile all is done but when i run the game it crash , i haven't changed any part of the coe only changed the compiler version, tested with emu like No$GBA (Registered version) it show me an alignment error in a piece of code who work fine with gcc 3.2.2 ....
Cu..
_________________
Batblaster / 7 Raven Studios Co. Ltd
------------------------------------------
#47396 - tepples - Fri Jul 08, 2005 3:19 pm
Is this alignment error on an opcode fetch, or on a load or store? If the latter, then you may need to declare your arrays with __attribute__((aligned(4))) .
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#47405 - tum_ - Fri Jul 08, 2005 4:34 pm
batblaster wrote: |
Hi,
the compiler do not give me any error, only with gcc3.2.2 i compile my game and all works fine with gcc 3.4.4 , the last available, when i compile all is done but when i run the game it crash , i haven't changed any part of the coe only changed the compiler version, tested with emu like No$GBA (Registered version) it show me an alignment error in a piece of code who work fine with gcc 3.2.2 ....
Cu.. |
You're not giving enough info to help you. If the code is written incorrectly
from the alignment issues point of view, it's quite possible to be just lucky with one compiler version (a thing or things happen to be aligned properly - by chance) and get unlucky with another version because the arrays'
addresses have changed, etc.
Quote the code.
#47419 - tepples - Fri Jul 08, 2005 6:12 pm
If it freezes at a white screen, and you can't narrow down which code to share, try setting DISPCNT=0 and then writing to the first element of the palette several times during your startup code. This way you can see at least how far along your code gets before it freezes.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#47428 - Miked0801 - Fri Jul 08, 2005 7:31 pm
Post the code segment that is causing alignment issues.
#47543 - Peter - Sun Jul 10, 2005 6:36 pm
Hi,
I think batblaser refers to this problem. There is a bit more info.
#47614 - batblaster - Mon Jul 11, 2005 12:39 pm
Hi,
thanks a lot , strange but true i found the problem, is simple i have 2 SWI Call of the LZ function in asm and both are aligned by 2 , moved to aligned by 4 with the apposit .align 4 all works, i really don't know why is .2 and not .4 all my previous asm code are .4 ....
Sorry for a disturb but i didn't check it before because i don't think is a problem...
All my Arrays aren't included like using .h or .c file i'm using a filesystem and incbin...
Cu...
_________________
Batblaster / 7 Raven Studios Co. Ltd
------------------------------------------