For days i tried to build the motorola sourceforge released kernels from scratch on a Win machine (they said it cant be done.. thinkin they may be right)
so i went and obtained a copy of Saucery CodeBench just to try and cross compile an ARM code from windows to ARM
here's how i did it
this code (not mine)
and using commandline gcc
arm-none-eabi-as.exe -o test.o test.cpp
arm-none-eabi-ld.exe -s -o test test.o
actually worked fine...
but when i try something like this:
it shows many errors like:
undefined reference to `abort'
undefined reference to `_sbrk'
undefined reference to `_lseek'
undefined reference to `_lwrite' etc etc
anyone know how to get the C-side of the compiler to work with a script??
so i went and obtained a copy of Saucery CodeBench just to try and cross compile an ARM code from windows to ARM
here's how i did it
this code (not mine)
Code:
.data HelloWorldString:
.ascii "Hello World\n"
.text
.globl _start
_start:
# Load all the arguments for write ()
mov r7, #4
mov r0, #1
ldr r1,=HelloWorldString
mov r2, #12
svc #0
# Need to exit the program
mov r7, #1
mov r0, #0
svc #0
arm-none-eabi-as.exe -o test.o test.cpp
arm-none-eabi-ld.exe -s -o test test.o
actually worked fine...
but when i try something like this:
Code:
#include <stdio.h>
#include <sys/types.h>
int main ()
{
printf ("!!!","%a");
return 0;
}
undefined reference to `abort'
undefined reference to `_sbrk'
undefined reference to `_lseek'
undefined reference to `_lwrite' etc etc
anyone know how to get the C-side of the compiler to work with a script??