This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Program MSP430 with hex file.

Other Parts Discussed in Thread: MSP430F2272

I can download and debug in debug mode (IAR Kickstart) via JTAG and MSP FET.

Then I switch to release mode and generate the hex file.

For some reason I cannot get the MSP430F2272 to program.

I first tried the FET-Pro 430 from Elprotronic (with JTAG MSP FET) and even though it says it passes it does not work. I then tried to download the hex file in Release mode (IAR) and it still does not work. But if I set IAR to debug mode and download it works fine.

Any ideas?

Thanks.

  • Please can you clarify "does not work":

    Does it leave the device blank? (FET-Pro430 allows you to compare the contents of the hex file and the flash memory; check the IAR launch settings and make sure they are set to download rather than use simulator)

    Do you get error messages?

    Or does the msp program not work as you expect it to? (if the optimisation settings are different then perhaps a critical section of the code is not working as expected...)

  • Hi chris_m.

    I changed IAR Debugger Driver from Simulator to FET Debugger and now I can download in Release mode and it works.

    The FET Pro430 still does not work. After programming and power cycling it does nothing.

     I will include screen shot. Maybe some setting is not correct?

     Thanks.

     

  • I changed IAR setting from .hex to .d43 and that now works with FET-Pro430.

    Is there a reason why the .hex file did not work with FET-Pro430? After programming with the .hex file the flash was blank.

    Thanks.

  • Hmmmn.  I have no problems writing hex files using FETPro430 so there must be something going wrong somewhere.  If you can program the .d43 file then the device settings must be correct so perhaps there is a problem with the IAR settings for generating the hex file.

    I don't know the solution but I can suggest the things I would try if I were in your shoes...

    One thing I have noticed is that the checksum in your screenshot is "0x00000000", is there any chance that the hex file is invalid or empty?  Does it look reasonable when viewed in notepad?  When you open the file what is the reported code size (see my screenshot)?

     

    Also try the "View -> Compare Code File and Flash Data" feature to see if it is opening the file ok but not writing it properly.

     

     

    Chris.

  •  I looked at the .hex file with notepad and it was full of non-readable stuff, so I changed the Linker asetting to Other->Output format: intel-extended and the file was readable and it worked with FET-Pro430.

    I noticed that All memory Blank checking failed but passed on yours. Not sure what that does but it appears to work. Any way to compare IAR download to FET-Pro430 download to see if they are the same?

     Thanks.

  • Ok it looks like IAR was to blame after all - well done for sorting it out.

     

    newbie said:
    I noticed that All memory Blank checking failed but passed on yours.

    FETPro has a few options for which parts of memory to erase.  I am using the some of the Info memory blocks in my application so have set these (except for infoA) to be erased as well.  Probably in your setup the "Main Memory Only" option is selected - if you look on the FET progress window below "All memory blank checking failed" there is another line that says "...without protected area OK"; this indicates that the protected area (probably the info segments if you have the default settings) has not been erased but the main memory was successfully erased.  For most applications this is the message you want to see!  Look at "Setup -> Memory Options" for the erase range setting.

     

    newbie said:
    Any way to compare IAR download to FET-Pro430 download to see if they are the same?

    FETPro has a built in comparison feature.  Program the msp with IAR and then open the hex file in FETPro and use "View -> Compare code file and flash data" and click "Yes" to download from the device.  This will show any differences.

    Alternatively the "Read / Copy" button on FetPro430 downloads the memory contents.  You can then save it to TI or Intel format or copy it to notepad.  Program and then download the memory for both IAR and FETPro and use a diff comparison on the files (either use the FETPro "View -> Compare two code files..." or an alternative such as Notepad++ or TortoiseSVN).

  • Thanks chris_m.

     

**Attention** This is a public forum