Page 1 of 2
Illegal Operation?
Posted: Mon Jan 17, 2011 2:59 pm
by WingedOne
I tried compiling the basic "Hello World" program with the latest version of devkitARM, but it keeps telling me that this line:
for(i = 0; i < 256 * 192; i++)
is an illegal operation.
Any ideas?
Re: Illegal Operation?
Posted: Mon Jan 17, 2011 8:58 pm
by WinterMute
You'll need to give us some more information.
What's the precise output when you try to compile?
Re: Illegal Operation?
Posted: Mon Jan 17, 2011 9:08 pm
by WingedOne
I'll have to give you that information tomorrow morning when I have access to everthing.
Re: Illegal Operation?
Posted: Thu Jan 20, 2011 5:07 am
by WingedOne
Here's the error output that I received when I tried to compile the program:
main.c
arm-eabi-gcc -MMD -MP -MF /c/devkitPro/Tutorial1/build/main.d -g -Wall -O2 -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -march=armv5te -mtune=arm946e-s -iquote /c/devkitPro/Tutorial1/include -I/c/devkitPro/libnds/include -I/c/devkitPro/Tutorial1/build -DARM9 -c /c/devkitPro/Tutorial1/source/main.c -o main.o
c:/devkitPro/Tutorial1/source/main.c: In function 'main':
c:/devkitPro/Tutorial1/source/main.c:28:1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <
http://wiki.devkitpro.org/index.php/Bug_Reports> for instructions.
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2
> Process Exit Code: 2
> Time Taken: 00:02
Re: Illegal Operation?
Posted: Tue Jan 25, 2011 11:33 am
by WinterMute
Can you paste your complete main.c here inside code tags please?
Re: Illegal Operation?
Posted: Tue Jan 25, 2011 6:51 pm
by WingedOne
It's the same as the code from this site (
http://dev-scene.com/NDS/Tutorials_Day_1) for their first Tutorial:
As a test, I took the line "for(i = 0; i < 256 * 192; i++)" out and then it compiled fine, but then of course, it doesn't do what it's supposed to do.
Code: Select all
#include <nds.h>
#include <stdio.h>
int main(void)
{
int i;
consoleDemoInit();
videoSetMode(MODE_FB0);
vramSetBankA(VRAM_A_LCD);
printf("Hello World!\n");
printf("www.Drunkencoders.com");
for(i = 0; i < 256 * 192; i++)
VRAM_A[i] = RGB15(31,0,0);
swiWaitForVBlank();
return 0;
}
Re: Illegal Operation?
Posted: Tue Jan 25, 2011 10:58 pm
by WinterMute
That doesn't have 28 lines and it compiles fine for me, really not sure what to tell you now. Is your main.c in some kind of weird encoding?
Re: Illegal Operation?
Posted: Wed Jan 26, 2011 1:52 pm
by WingedOne
I used Programmer's Notepad which came with devkitPro, so nothing should be wrong with the encoding.
At this point, I think something might have gotten corrupted during my download, so I'll try re-downloading and re-installing.
Thanks for your help.
Re: Illegal Operation?
Posted: Wed Feb 02, 2011 4:37 pm
by WingedOne
Well, I re-downloaded devkitPro to a friend's computer and tried it on her computer and it worked fine. I transfered the very same folder of files that I downloaded to my computer and tried it again, and I still get the same error.
It must have something to do with my computer then. Any ideas?
My computer is running Windows XP with an 800MHz VIA C3 Ezra processor and 256 megs of ram.
I'd like to get this working somehow on my computer so that I can started on things with this.
Re: Illegal Operation?
Posted: Wed Feb 02, 2011 11:52 pm
by zeromus
that cpu is gimpy. i recommend building increasingly simple source files until youre building the simplest possible thing, which would be int main() { return 0; } and if that doesnt work then you may need to blame your cpu supplier. You can't seriously expect people to support that cpu in 2011.