Using Xcode for OSDev
Using Xcode for OSDev
Hello! I'm sure this has been discussed before, but I couldn't find any concrete info.
As the title suggests, I'm trying to setup an Xcode project for my OS.
I've managed to use an External Build System template to set up my makefile and at least get the project to build.
Problem is, none of the code-stuff works, such as Go to Implementation or a proper autocomplete (right now I think it just lists a bunch of matching symbols)
It all seems to be overly-biased towards actually creating App store apps, and not as a fully-featured IDE...
but it looks so good!
Any help?
As the title suggests, I'm trying to setup an Xcode project for my OS.
I've managed to use an External Build System template to set up my makefile and at least get the project to build.
Problem is, none of the code-stuff works, such as Go to Implementation or a proper autocomplete (right now I think it just lists a bunch of matching symbols)
It all seems to be overly-biased towards actually creating App store apps, and not as a fully-featured IDE...
but it looks so good!
Any help?
[nx] kernel: http://github.com/zhiayang/nx
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Using Xcode for OSDev
Mac user stereotype detected!requimrar wrote:but it looks so good!
XCode's autocomplete is far from perfect, and it works best with "typical" objective-C use, Basically, if you're trying regular C like I'm guessing you are, then there will be relatively less context-sensitive things to autocomplete as the only place you can try that is by accessing struct members.Problem is, none of the code-stuff works, such as Go to Implementation or a proper autocomplete (right now I think it just lists a bunch of matching symbols)
It all seems to be overly-biased towards actually creating App store apps, and not as a fully-featured IDE...
Based on the description I just can't deduce if autocompletion is working worse than it would for a normal C app.
Re: Using Xcode for OSDev
Exactly. However the way xcode does with autocompletion is different from visual studio, kdev or code block.Combuster wrote:Based on the description I just can't deduce if autocompletion is working worse than it would for a normal C app.
It blindly scan the whole project and put every word into the dictionary for completion, therefore you don't get class specific hints, even for normal C++ project.
(Or it was designed so poorly I could not make use of it).
Re: Using Xcode for OSDev
Oh well. I'm actually using C++, so there's slightly more autocomplete-able things out there.
Too bad then.
Also, another unrelated issue; right now my makefile is set up to execute qemu, which mostly works fine... except for one annoyance.
For some reason, the QEMU window doesn't come into focus automatically. It used to do that before, but now for some reason it stopped, and I have to click on the dock icon to bring it up.
Not game-breaking, but definitely an inconvenience.
Too bad then.
I'm actually currently using that, just that with the new version 3 it's terrible hard to edit the language files (now hidden inside the .app, thanks a lot for nothing!) to change a couple of things that I want todozniak wrote: Yep. ST3!
Well. Let's just say I really like the new ios7 look (:Combuster wrote: Mac user stereotype detected!
Also, another unrelated issue; right now my makefile is set up to execute qemu, which mostly works fine... except for one annoyance.
For some reason, the QEMU window doesn't come into focus automatically. It used to do that before, but now for some reason it stopped, and I have to click on the dock icon to bring it up.
Not game-breaking, but definitely an inconvenience.
[nx] kernel: http://github.com/zhiayang/nx
Re: Using Xcode for OSDev
When it comes to OSDeving I guess there are only 2 OSes that are "made" for that :
Linux
BSD
No buggy Windows or Stylish Macintosh is optimized for OSDeving,
Anyways Seems that you would need some help
First set up GCC, (Nope,I don't care Whatever the XCode Compiler is. OSDeving is best on GCC.(But that's my opinion))
Read Here : http://stackoverflow.com/questions/9353 ... -xcode-4-4
Now goto the Wiki and checkout C Barebones,
Follow the steps,
Or maybe you could set up a light-weight Linux Distro on a Virtual Machine? Howzz That?
If you are having any problems them keep us updated.
Linux
BSD
No buggy Windows or Stylish Macintosh is optimized for OSDeving,
Anyways Seems that you would need some help
First set up GCC, (Nope,I don't care Whatever the XCode Compiler is. OSDeving is best on GCC.(But that's my opinion))
Read Here : http://stackoverflow.com/questions/9353 ... -xcode-4-4
Now goto the Wiki and checkout C Barebones,
Follow the steps,
Or maybe you could set up a light-weight Linux Distro on a Virtual Machine? Howzz That?
If you are having any problems them keep us updated.
When you say, "I wrote a program that crashed Windows," people just stare at you blankly and say, "Hey, I got those with the system, for free." - Linus Torvalds
64 bit Kernel in early development
http://github.com/nerdguy12/core64
64 bit Kernel in early development
http://github.com/nerdguy12/core64
Re: Using Xcode for OSDev
Then tell me how did those two operating systems get developed?nerdguy wrote:When it comes to OSDeving I guess there are only 2 OSes that are "made" for that :
Linux
BSD
Every universe of discourse has its logical structure --- S. K. Langer.
Re: Using Xcode for OSDev
nerdguy wrote:When it comes to OSDeving I guess there are only 2 OSes that are "made" for that :
Linux
BSD
No buggy Windows or Stylish Macintosh is optimized for OSDeving,
Anyways Seems that you would need some help
First set up GCC, (Nope,I don't care Whatever the XCode Compiler is. OSDeving is best on GCC.(But that's my opinion))
Read Here : http://stackoverflow.com/questions/9353 ... -xcode-4-4
Now goto the Wiki and checkout C Barebones,
Follow the steps,
Or maybe you could set up a light-weight Linux Distro on a Virtual Machine? Howzz That?
If you are having any problems them keep us updated.
One, help appreciated.
Two, you misunderstand.
This topic is purely about the IDE. Nothing about compilers of any of the sort.
Three, my toolchain is already set up, and I'd like to say that I prefer clang, simply because you don't need to rebuild for every damn platform, but to each his own.
Four, I don't need any barebones tutorial, because as I said this discussion is purely about using an IDE.
Five, I've already tried doing OSDev in a VM and let's just say it is /not/ pleasant.
Six, if you'd read between the lines the problem was already solved by compromise, Xcode is simply not suitable for this kind of stuff.
Last, I'd suggest you understand the topic before you go randomly posting things.
No offence intended.
[nx] kernel: http://github.com/zhiayang/nx
Re: Using Xcode for OSDev
bwat wrote:Then tell me how did those two operating systems get developed?nerdguy wrote:When it comes to OSDeving I guess there are only 2 OSes that are "made" for that :
Linux
BSD
<sarcasm>
Someone used BSD to develop Linux.
Elsewhere, someone used Linux to develop BSD.
</sarcasm>
[nx] kernel: http://github.com/zhiayang/nx
Re: Using Xcode for OSDev
Thought you handled that very well. You see a certain problem with reading comprehension on internet forums but it seems especially bad here. I've bitten my tongue more than once today.requimrar wrote: One, help appreciated.
Two, you misunderstand.
This topic is purely about the IDE. Nothing about compilers of any of the sort.
...
Last, I'd suggest you understand the topic before you go randomly posting things.
No offence intended.
Every universe of discourse has its logical structure --- S. K. Langer.
Re: Using Xcode for OSDev
bwat wrote:
Thought you handled that very well. You see a certain problem with reading comprehension on internet forums but it seems especially bad here. I've bitten my tongue more than once today.
Haha thanks!
I try to distance myself from these discussions, because more often than not these are a bunch of wannabes who think this is some easy thing to do. Also those who can't really speak english (not a problem with that), and are using that as a crutch or excuse instead of actually doing the required reading etc.
[nx] kernel: http://github.com/zhiayang/nx
Re: Using Xcode for OSDev
I agree.Haha thanks!
I try to distance myself from these discussions, because more often than not these are a bunch of wannabes who think this is some easy thing to do. Also those who can't really speak english (not a problem with that), and are using that as a crutch or excuse instead of actually doing the required reading etc.
Anyways, Did you get the answer? (I am sorry for the misunderstanding)
When you say, "I wrote a program that crashed Windows," people just stare at you blankly and say, "Hey, I got those with the system, for free." - Linus Torvalds
64 bit Kernel in early development
http://github.com/nerdguy12/core64
64 bit Kernel in early development
http://github.com/nerdguy12/core64
Re: Using Xcode for OSDev
I wonder if you can expand on your answer a little. What, in your experience of using XCode, makes it unsuitable for OS development?nerdguy wrote:When it comes to OSDeving I guess there are only 2 OSes that are "made" for that :
Linux
BSD
No buggy Windows or Stylish Macintosh is optimized for OSDeving,
Re: Using Xcode for OSDev
As I said it's all my opinion, For XCode there aren't many docs available + the wiki kernel tutorials doesn't tell you anything for XCode
Google Searches would prove it.
https://www.google.com/search?q=buildin ... 20mac%20os
Brokenthron Kernel Tutorials use Visual C++ as an IDE. (I take back my Windows Statement but again you need a lot of tools like Cygwin which make it a bit uncomfortable for OSDeving)
Also COSMOS (C# Open-Source Managed OS) uses VC#,VB,VC++ or any other .NET Language IDE.
I have nothing to say about Linux and BSD. (Most of the OSes can be easily Compiled on Linux and BSD)
Also people in this topic have said that to compile the Linux Kernel on Mac is to use a Virtual Machine that runs Linux.
http://stackoverflow.com/questions/1001 ... n-mac-os-x
Except one who gave an unclear solution.
Note that it's all my opinion, Might be that someone may have managed to compile a kernel on a Mac. But it's not fitting for certain reasons like Documentation.
Google Searches would prove it.
https://www.google.com/search?q=buildin ... 20mac%20os
Brokenthron Kernel Tutorials use Visual C++ as an IDE. (I take back my Windows Statement but again you need a lot of tools like Cygwin which make it a bit uncomfortable for OSDeving)
Also COSMOS (C# Open-Source Managed OS) uses VC#,VB,VC++ or any other .NET Language IDE.
I have nothing to say about Linux and BSD. (Most of the OSes can be easily Compiled on Linux and BSD)
Also people in this topic have said that to compile the Linux Kernel on Mac is to use a Virtual Machine that runs Linux.
http://stackoverflow.com/questions/1001 ... n-mac-os-x
Except one who gave an unclear solution.
Note that it's all my opinion, Might be that someone may have managed to compile a kernel on a Mac. But it's not fitting for certain reasons like Documentation.
When you say, "I wrote a program that crashed Windows," people just stare at you blankly and say, "Hey, I got those with the system, for free." - Linus Torvalds
64 bit Kernel in early development
http://github.com/nerdguy12/core64
64 bit Kernel in early development
http://github.com/nerdguy12/core64
Re: Using Xcode for OSDev
I'm just curious as to how this translates into your actual experience of development on a Mac. After all, it uses the same compiler as Linux, so it should be trivial to apply any tutorials based on Linux to a Mac. I can't see that documentation is a problem. (And there are plenty of OS tutorials aimed at Windows.)
I'm not really interested in third-hand accounts from StackOverflow - I could read them for myself. I am just interested to know what experience makes you recommend against using a Mac for OS development. What particular problems have you encountered?
I'm not really interested in third-hand accounts from StackOverflow - I could read them for myself. I am just interested to know what experience makes you recommend against using a Mac for OS development. What particular problems have you encountered?