Hex file required.

Discussion in 'Embedded Systems and Microcontrollers' started by melathj, May 7, 2009.

  1. melathj

    Thread Starter Member

    Apr 21, 2009
    12
    0
    Friends, I know it sounds lazy.But I don't have .asm file to compile.So those who knows how to compile please sent me a compiled .Hex file. It will be a big help since I have to submit my project tomorrow.
     
  2. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    I'll agree with John on you other similar post.

    "MPLab is free from Microchip. Why not download it and compile the code yourself?"
     
  3. melathj

    Thread Starter Member

    Apr 21, 2009
    12
    0
    I downloaded and installed it. But for it to compile it needs .asm and I only have this attached file. If you can suggest me a tutorial, it will be nice.
     
  4. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,692
    901
    Do you realize that the file you attached IS assembly code with simply a TXT extension? ASM files can be saved as TXT files. All you need to do is start your assembler, paste the file and take care of a few tabs that may be in the wrong places.

    You have also posted a hex file in another thread and wanted its format changed to intel hex.

    In both cases, the txt file you have may easily be converted to the format you need.

    I would strongly recommend that you start with the assembly file you have, even though its extension is txt, change its extension, and get it to compile with whatever compiler/assembler you are using. Then you can be relatively sure the hex will run properly when you burn it on the chip.

    In contrast, if someone were to simply convert the hex file you have to intel hex (if it is not that way already; I didn't look at it very carefully), I suspect there is a very high chance it will not work when you burn the chip.

    When did you get the assignment? Were you supposed to generate the assembly code yourself?

    John
     
  5. melathj

    Thread Starter Member

    Apr 21, 2009
    12
    0
    Thanks John. I got this assignement long back. I bought all the hard ware and left the programming part to the last which was a big mistake. I got both source code and hex code as text files from this site .
    http://www.hamradio.cc/projects/Morse_Code_Decoder_Circuit.php
    I did as u said. Following is the message I get.

    Build aborted. The project contains no source files.

    Simply renaming it is not working. So with the hex file I have, is der any way to make .hex file.
     
  6. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,692
    901
    There is a very good chance the hex file that you downloaded will not work. But, you can upload the hex file into MPLab. Go through the instructions and tutorial from MicroChip. Be sure to set up the project files and .asm files. Then, work from the project menu.

    Again, for the best chance of success, create a .asm file in MPLab, paste the assembly code you have into that file, and debug it. There are bound to be many formatting errors (like needing labels and directives in the correct columns). MPLab will tell you where the problems are...check the disassembly listing for the line numbers. All of this assumes the actual code you have is correct for the MCU you are using. If it is not, then the hex code won't be any better.

    If this is the very first time you have done assembly, and it is due tomorrow, you have a long afternoon and night ahead of you. That will still be quicker than trying to get someone else to do it for you, only to find late tonight that what you got that way for "free" won't work either.

    John
     
  7. melathj

    Thread Starter Member

    Apr 21, 2009
    12
    0
    Thanks a lot John and all others hu helped me. I got it to compile and I got the hex file. Hopefully it should work. By the way...one doubt . Wat does this "udata" means?
     
Loading...