Until now, I have been working on x86 only, but recently I have started looking into ARM (specifically, the Raspberry Pi).
I used to use C in Visual Studio, but since I want to use ARM, I have decided to look at using GCC instead. I've only just started looking into it, so please forgive any stupid questions / comments.
I started looking at the Cambridge RPi tutorials, which suggested using YAGARTO. This has been working fine on their assembly tutorials, but now I want to try writing some C code.
I created a basic main.c just to see if I could get it tom compile, however I can't even get that to work.
It can't find crt0.o, which from my understanding is the C Runtime. According to a few ideas from this site, I created crt0.s:
Code: Select all
.global _start
.extern main
.extern exit
_start:
bl main
bl exit
.wait:
bl .wait
Code: Select all
STARTUP(crt0.o)
Code: Select all
arm-none-eabi-gcc -o kernel.img crt0.s main.c -T linker.ld
I realise this is probably very obvious to many of you out there, but I've only just started on GCC, and it's eluding me so far...
Can anyone point me in the right direction?
Thankyou