Hi folks,
I'm creating a GCC cross-compiler for the Raspberry Pi in order to program it at the bare-metal level, and I'm still a bit of a n00b I'm afraid when it comes to creating the cross-compiler. I've gotten a naked cross-compiler built, but I'm not sure how to build a complete cross-compiler with the standard and runtime libraries (it looks like the C Raspberry Pi tutorials require these as they contain code that includes 'stdint.h'). I followed the instructions on the GCC cross-compiler tutorial for the Raspberry Pi; I just wondered whether I need to build the required headers myself, or do I need to get pre-built headers from somewhere else? If I need to build the required headers myself, then how do I go about doing this when I have no kernel to make calls to?
Sorry if I come across as a confused little man...in all truth, I am!!!
Thanks in advanced to anybody who can help me with this!
Creating a GCC Cross-Compiler for the Raspberry Pi?
-
- Member
- Posts: 25
- Joined: Sat Jan 15, 2011 8:40 pm
Creating a GCC Cross-Compiler for the Raspberry Pi?
Lee.J.Baxter - Designer of CHAOS (Cybernetic Hivemind Adaptive Operating System)
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: Creating a GCC Cross-Compiler for the Raspberry Pi?
stdint.h is a freestanding header. It's highlighted somewhere on the wiki.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
-
- Member
- Posts: 25
- Joined: Sat Jan 15, 2011 8:40 pm
Re: Creating a GCC Cross-Compiler for the Raspberry Pi?
Brilliant! I've just re-read the Wiki page and noticed that it said that, as you pointed out! Forgive me for sounding n00bish again with another question, but it seems as though this header would have been compiled when I built the 'naked' compiler; am I right in saying that this header, as well as other freestanding headers, will be available for me to use (i.e. they'll have been created when I built the naked compiler)?Griwes wrote:stdint.h is a freestanding header. It's highlighted somewhere on the wiki.
Thanks again!
Lee.J.Baxter - Designer of CHAOS (Cybernetic Hivemind Adaptive Operating System)
Re: Creating a GCC Cross-Compiler for the Raspberry Pi?
Your cross-compiler comes with all the freestanding headers and a few compiler-specific headers. Things such as <stdint.h>, <stddef.h>, <stdbool.h> and more all work out of the box.
-
- Member
- Posts: 25
- Joined: Sat Jan 15, 2011 8:40 pm
Re: Creating a GCC Cross-Compiler for the Raspberry Pi?
Fantastic! Looks like I'll be able to jump into development then!sortie wrote:Your cross-compiler comes with all the freestanding headers and a few compiler-specific headers. Things such as <stdint.h>, <stddef.h>, <stdbool.h> and more all work out of the box.
Cheers!
Lee.J.Baxter - Designer of CHAOS (Cybernetic Hivemind Adaptive Operating System)