Illegal Operation?
Illegal Operation?
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?
for(i = 0; i < 256 * 192; i++)
is an illegal operation.
Any ideas?
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Illegal Operation?
You'll need to give us some more information.
What's the precise output when you try to compile?
What's the precise output when you try to compile?
Re: Illegal Operation?
I'll have to give you that information tomorrow morning when I have access to everthing.
Re: Illegal Operation?
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
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
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Illegal Operation?
Can you paste your complete main.c here inside code tags please?
Re: Illegal Operation?
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.
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;
}
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Illegal Operation?
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?
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.
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?
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.
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?
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.
Who is online
Users browsing this forum: No registered users and 3 guests