AnimalMachine
Still Fresh
- Joined
- Jan 8, 2007
- Messages
- 6
I've been trying for days now to get a setup that will successfully compile and run on my gp2x from my Mac and have been defeated at every turn. I'm hoping someone else here will have a suggestion or two to point me in the right direction.
My last attempt involved installing arm-elf-gcc (4.1.1) from darwine ports and just trying to run a simple c program such as:
Which compiles & works fine under macosx native tools. Under arm-elf-gcc, it will compile and static link fine:
If I copy it over to the gp2x and run it from the std interface, I get the black screen and have to restart the device. If I set up usb networking and start via telnet, I get "Segmentation error", or fault, or whatever. My other sdl 'test' program that draws random rectangles does the same thing.
I've tried other toolchains as well such as devkitGP2X on macosx to no avail. I've set up parallels to run ubuntu and have tried the official sdk, and open2x chains to no avail.
Am I just screwing something up on the command line? With my simple example above I comple with this:
With, or without the -mcpu parameter it has the same segmentation fault issue.
I've been pretty frustrated with this, so I'm hoping someone out here has tread this path on Mac OS X before and can let me know what I'm doing wrong.
TIA
My last attempt involved installing arm-elf-gcc (4.1.1) from darwine ports and just trying to run a simple c program such as:
Code:
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char* argv[])
{
FILE* my_file = NULL;
my_file = fopen ("mytest.txt", "w");
fputs ("This line managed to execute!\n", my_file);
fflush (my_file);
fclose (my_file);
return (0);
}
Which compiles & works fine under macosx native tools. Under arm-elf-gcc, it will compile and static link fine:
Code:
file filetest.gpe
filetest.gpe: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, not stripped
If I copy it over to the gp2x and run it from the std interface, I get the black screen and have to restart the device. If I set up usb networking and start via telnet, I get "Segmentation error", or fault, or whatever. My other sdl 'test' program that draws random rectangles does the same thing.
I've tried other toolchains as well such as devkitGP2X on macosx to no avail. I've set up parallels to run ubuntu and have tried the official sdk, and open2x chains to no avail.
Am I just screwing something up on the command line? With my simple example above I comple with this:
Code:
arm-elf-gcc-4.1.1 -o filetest.gpe file.c -O2 -mcpu=arm940t
With, or without the -mcpu parameter it has the same segmentation fault issue.
I've been pretty frustrated with this, so I'm hoping someone out here has tread this path on Mac OS X before and can let me know what I'm doing wrong.
TIA