This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do I get a hex file?

I have code (written in c#) and a compiled .exe file, but in order to load in onto a board I need a .hex and a .dat file. Is there any way I can get these files from what I have, if so how? Thanks

  • The hex file format is just a container format for holding some data, normally a binary firmware image. So yes, it is trivial to convert data into a hex file.
    But it is very strange to see C# and hex in one sentence. Any kind of conversion of C# code into a hex file doesn't make any sense to me. What exactly are you trying to do? What is this board? What is the code supposed to do?

  • Indeed - and, in particular, a sencence on this forum!

    This is the Keil forum; it is for discussing Keil products - see: http://www.keil.com/forum/

    C# is specifically a Microsoft language, for use in its .net frameworks - it has nothing to do with Keil!

    You don't compile C# to a hex file - you build a so-called "assembly" which you then load into a suitable .net framework system.

    Note that "assembly" here is nothing at all to do with the Assemblers or assembly languages supported by Keil!