CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2013
    Posts
    24

    C Compiler for bare metal

    1. I want to create utilites to use in bare metal.
    2. I want to create my own OS.
    3. I want to create app that works with Oracle.
    Which compiler is best for thoese purposes?

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: C Compiler for bare metal

    1 & 2 - it depends upon the processor you are targetting. Note that many compilers produce code that is dependent upon libraries already being present on the system. For a 'bare metal' system, these libraries won't be present. Also, most compilers produce some sort of 'exe' image which is loaded into memory etc by the underlying os. Again, with a bare metal system this underlying os will not be present to perform this function. Also, you will have to directly address the hardware as again there will be no underlying libraries to acept input from the keyboad, display on screen, read/write from disk etc etc.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Jul 2013
    Posts
    576

    Re: C Compiler for bare metal

    How many times are you going to ask this question? Have you tried out any of the suggestions you got in your previous thread on the subject?

    http://forums.codeguru.com/showthrea...in-creating-OS

    In my view it's very naive of someone who can't even select an appropriate C compiler to think he will be able to create his own OS. Having a vision is fine but you have to learn how to walk before you can run. A few questions on a forum won't turn a novice into an expert.
    Last edited by razzle; December 17th, 2013 at 05:56 PM.

  4. #4
    Join Date
    Nov 2013
    Posts
    24

    Re: C Compiler for bare metal

    Quote Originally Posted by 2kaud View Post
    1 & 2 - it depends upon the processor you are targetting. Note that many compilers produce code that is dependent upon libraries already being present on the system. For a 'bare metal' system, these libraries won't be present. Also, most compilers produce some sort of 'exe' image which is loaded into memory etc by the underlying os. Again, with a bare metal system this underlying os will not be present to perform this function. Also, you will have to directly address the hardware as again there will be no underlying libraries to acept input from the keyboad, display on screen, read/write from disk etc etc.
    Intel processor.

  5. #5
    Join Date
    Nov 2013
    Posts
    24

    Re: C Compiler for bare metal

    Quote Originally Posted by razzle View Post
    How many times are you going to ask this question? Have you tried out any of the suggestions you got in your previous thread on the subject?

    http://forums.codeguru.com/showthrea...in-creating-OS

    In my view it's very naive of someone who can't even select an appropriate C compiler to think he will be able to create his own OS. Having a vision is fine but you have to learn how to walk before you can run. A few questions on a forum won't turn a novice into an expert.
    So many time, as much as possible to obtain non fake information.

  6. #6
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: C Compiler for bare metal

    gcc will do what you need.

    I suggest you learn about virtualization environments such as qemu. They can greatly simplify the process of experimenting with OS-level functionality without jeopardizing your machine.

  7. #7
    Join Date
    Nov 2013
    Posts
    24

    Re: C Compiler for bare metal

    Quote Originally Posted by Lindley View Post
    gcc will do what you need.

    I suggest you learn about virtualization environments such as qemu. They can greatly simplify the process of experimenting with OS-level functionality without jeopardizing your machine.
    Thank you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured