Quote:
Originally Posted by skiz
Is there such a thing or a way such that a window that is popped out by clicking a .exe file be changed to a .hex file? Or is it impossible? 
|
Assuming you're post fits the topic of the forum (as described in EricH's post), I also assume you're talking about somehow converting a
Window Executable into a
program image file for an embedded
microcontroller. While this is theoretically possible, you'd have to find a program that converted the
machine code from one
processor architecture (ISA) to another. In doing so, you'd be essentially integrating a minimal
virtual machine into the code at compile time, because the chances that you could directly convert from instructions in one ISA to another are quite small, especially since you're going from a desktop processor (probably
x86 and therefore a
CISC) to an embedded processor, which is probably a
RISC, which means that one instruction in the EXE file would probably correspond to multiple instructions in the HEX file. Also there would have to be a mechanism for translating memory addresses from one computer architecture to another. Essentially what you would be making is a compiler that translates x86 machine code into your embedded processor's machine code, which might be even harder than writing something like a C compiler, because C is designed to be a more or less portable language. I don't know of any product available that does this.
It should also be noted that this description thus far is assuming that the entirety of the code takes the form of direct processor instructions, and that your program doesn't make use of any
hardware interrupts,
operating system calls (it is highly likely that it does considering you mention that your program has a graphical interface), or
dynamic loading. Such utilities have no analog on a microcontroller.
In short, I know of nothing that exists that works the way you want. A better approach would be to go back to the source code (hopefully in a common language like C) and convert that to the desired platform.
Lots of good information at the linked Wikipedia articles if you want to do some more reading on the subject of computer architectures.
Good luck,
--Ryan