Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Emit code for running on bare hardware? No OS?

awbeale
Beginner
527 Views
Is there an option to use the Intel compilers for generating code which will run directly on the Itanium hardware? No Windows. No Linux. No OS of any kind. Just C++ code which has been linked and located and is ready for loading by EFI or a custom EFI extension. Is there a locater for IA64?
0 Kudos
5 Replies
John_O_Intel
Employee
527 Views
Hi,
Possibly, the Intel C Compiler for EFI Byte Code might be of interest. Info available at http://www.intel.com/software/products/compilers/efibc/whatsnew.htm
Regards,
John O'Neill
0 Kudos
awbeale
Beginner
527 Views

Thanks John, but would this not be interpreted? EFI code will not perform at the same level as native C++, or am I missing something fundamental here?

Andy

0 Kudos
John_O_Intel
Employee
527 Views
Hi Andy,
Yes, I believe this would be interpreted code.
I don't know how an application would run w/o an OS,as the standard library calls are implemented by the OS. And I don't know how the compiler could generate code that would run w/o the OS. If you could provide details on what you want to do, I might be able to find additional info thatmight help.
regards,
john
0 Kudos
awbeale
Beginner
527 Views

I wish to implementa project which does not rely on Windows or Linux or any OS. In essence, it is a form of an embedded system. I will only be callng functions within the C++ library which do not rely on an underlying OS.

Things like MIN, MAX, etc. should not be reliant on an underlying OS. Anything which is in the standard ANSI C libraries I do not believe should be dependent upon an OS underneath it. Now I understand that the Microsoft supplied library is intended for use with Windows and will probably leverage the Windows OS, but I think that is irrelevant for what I wish to do.

I wish to compile my project using standalone versions of runtime libraries. Once compiled, I need to have EFI transfer control to my project instead of some other OS. Looking at it this way, I am building an OS, just not in the traditional sense. In my case the OS is a dedicated program designed to run directly on the Itanium hardware. So how do I build a standard excuteable which can be loaded by EFI into memory and get control transfered to my outer block?

0 Kudos
John_O_Intel
Employee
527 Views
Hi Andy,
Thanks for the details. I don't know how you would do this with our compilers, but you can minimize OS system calls by building the app w/ -static option on Linux. Using the strace utility,a hello world app makes ~77 system call when compiled dynamically, but only 12 when compiled statically. If your able towrite a mini-OS, it will need to be able to implement someOS type calls, but I have no idea where to start. Good luck !
John
0 Kudos
Reply