Illegal Operation?

support for the ARM toolchain
WingedOne
Posts: 8
Joined: Mon Jan 17, 2011 2:52 pm

Illegal Operation?

Post by WingedOne » Mon Jan 17, 2011 2:59 pm

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?

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Illegal Operation?

Post by WinterMute » Mon Jan 17, 2011 8:58 pm

You'll need to give us some more information.

What's the precise output when you try to compile?
Help keep devkitPro toolchains free, Donate today

Personal Blog

WingedOne
Posts: 8
Joined: Mon Jan 17, 2011 2:52 pm

Re: Illegal Operation?

Post by WingedOne » Mon Jan 17, 2011 9:08 pm

I'll have to give you that information tomorrow morning when I have access to everthing.

WingedOne
Posts: 8
Joined: Mon Jan 17, 2011 2:52 pm

Re: Illegal Operation?

Post by WingedOne » Thu Jan 20, 2011 5:07 am

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

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Illegal Operation?

Post by WinterMute » Tue Jan 25, 2011 11:33 am

Can you paste your complete main.c here inside code tags please?
Help keep devkitPro toolchains free, Donate today

Personal Blog

WingedOne
Posts: 8
Joined: Mon Jan 17, 2011 2:52 pm

Re: Illegal Operation?

Post by WingedOne » Tue Jan 25, 2011 6:51 pm

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;
}

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Illegal Operation?

Post by WinterMute » Tue Jan 25, 2011 10:58 pm

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?
Help keep devkitPro toolchains free, Donate today

Personal Blog

WingedOne
Posts: 8
Joined: Mon Jan 17, 2011 2:52 pm

Re: Illegal Operation?

Post by WingedOne » Wed Jan 26, 2011 1:52 pm

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. :)

WingedOne
Posts: 8
Joined: Mon Jan 17, 2011 2:52 pm

Re: Illegal Operation?

Post by WingedOne » Wed Feb 02, 2011 4:37 pm

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.

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: Illegal Operation?

Post by zeromus » Wed Feb 02, 2011 11:52 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests