HEX file not valid.

Issue #2 new
Former user created an issue

Hi, i'm making my programs in mplab x, and compiling them, generating the hex file, but, when i'm put to burn in pic trough arduino, i got the message:

" Connecting to arduino... Success Connecting to the mcu... Your MCU: 18f4550 Erasing chip............ Success Hex file not valid. "

how i can solve this problem? please someone, help me!

Comments (8)

  1. kirill kulakov

    You could try the windows version, but I guess there is a problem with the HEX file parser could you provide any HEX file that reproduces the problem?

  2. Pedro Aurélio

    I've tried the windows version too, but it doesn't program! Just says:"connecting to arduino", and never connect!

    This .hex file was created with mikroC. When I simulate this with proteus, it works fine.

  3. Jose FuzzNo repo owner

    Sorry guys, I didn't have much time lately.

    I noticed an error similar to this, but it was with the PicKit2 firmware. The error ocurred with all versions (win, linux, C, python).

    My thought at the time was that there's some program memory that the parser can't reach, but this shouldn't be a problem with a small file. There's a bug on the HEX parser but I can't help any further. Sorry.

  4. Pedro Aurélio

    Hi, i finally got it! I was thinking that the problem was at the compiler, and looks like was! I used the c18 compiler of microchip, and it works. Before this, I was trying with mpasm and xc8 of microchip, and ccs too, and always getting the same error. If someone got it with another way, tell me please! Thanks for all help!

  5. Former user Account Deleted

    I get the same!. The problem can be the compiler. Under linux in the xc8 compiler drop me the same error but i tried with the c18 and it works!.

    Thank you for you help

  6. Xerxes Rånby

    There is a xc8 compiled hex file at the end of this article http://www.rakeshmondal.info/Mplab-X-IDE-XC8-Tutorial-Blinking-LED This xc8 hex used Id memory region 0x2000000 - 0x200007 I also noted that there was an issue flashing fuses with bytes range 0x0 - 0xf because incorrect zfill Example when trying to set the fuse 0x1 to 0x8 then C18X was incorrectly sent to the arduino instead of C108X

    @hydracrux I am now able to flash the xc8 hex mentioned above using my changes in https://bitbucket.org/xranby/arduino-as-pic18f-programmer-for-linux

  7. kirill kulakov

    I had that feeling that something is broken in the flasher, it makes me excited that years later you found and fixes all some issue :D

  8. Log in to comment