AaA
AaA

Reputation: 3694

How to compile program for Arm processor using MingW for Windows?

I have a device that runs with Arm(Risc) CPU and I like to write program for it. Transferring binary to this device is easy but I cannot simply put com/exe files compiled in windows in this device.

I don't have a clue how can I compile a program to generate an Risc processor bin file (byte order, stack and memory architecture).

I am writing my code in C/C++ and I would like to know how can I compile for Arm/Risc?

This device starts running bin file from position 0 of the file (I believe it is like com files for MS-Dos)

Upvotes: 2

Views: 5425

Answers (2)

Timo
Timo

Reputation: 953

Newer versions of MS Visual Studio provide an ARM compiler. But the set of libraries is pretty limited (static CRT and MSVCRT). Also the win32 headers might miss ARM specific definitions. Here's a thread talking about how to enable ARM support in VS: http://www.betaarchive.com/forum/viewtopic.php?t=25956 If you want to compile simple command line apps, you might be lucky, for GUI apps, you will need to create your own libs and possibly modify headers or use your own header set. You can have a look at ReactOS, which provides basic ARM support (using VS11+ command line). You might be able to use it to generate the required import libraries. For missing ARM specific header definitions etc. you can always contact ReactOS developers and if you are lucky they will find time to fix it :)

Upvotes: 0

Bistro
Bistro

Reputation: 2025

You might like to look at GNU Arm website. It has binaries for compiling for ARM processor in Windows platform. However as Matteo explained in comments, you will need a tool to change ELF format to Raw format that you desire.

Upvotes: 2

Related Questions