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.

MSP430 File end error

Other Parts Discussed in Thread: MSP430F5438A, MSP-FET

Hello,

I am new to MSP430F5438A.

I got this issue when using Command line to program MSP430F5438A.

Here is the link to the fw.hex file:

_https://drive.google.com/open?id=0BwT2OqNn__rDemlsTkpTYlpNMmc

Plz advise what is wrong with the hex file?

Thanks.

E:\Programs\MSP430Flasher>MSP430Flasher -n MSP430F5438A -w fw.hex -v -z [VCC]
* -----/|-------------------------------------------------------------------- *
*     / |__                                                                   *
*    /_   /   MSP430 Flasher v1.3.7                                           *
*      | /                                                                    *
* -----|/-------------------------------------------------------------------- *
*
* Evaluating triggers...done
* Checking for available FET debuggers:
* Found USB FET @ COM8 <- Selected
* Initializing interface @ COM8...done
* Checking firmware compatibility:
* FET firmware is up to date.
* Reading FW version...done
* Setting VCC to 3000 mV...done
* Accessing device...done
* Reading device information...done
* Loading file into device...
# Exit: 59
# ERROR: File end error
* Starting target code execution...done
* Disconnecting from device...done
*
* ----------------------------------------------------------------------------
* Driver      : closed (Could not reset device)
* ----------------------------------------------------------------------------
*/

  • (you can edit your post)

    The hex file has two end-of-file records:

    :105C00003140005C8C00041C3E40E3053F40000036
    :105C1000B013BC738C00001C8D00887A3E400300DA
    (2620 lines omitted)
    :10FFE000FFFFFFFFFFFFFFFF305CFFFFFFFFFFFF93
    :10FFF000FFFFFFFFDE5CFFFFFFFFFFFFFFFF005C77
    :005C0001A3
    :00000001FF

    Delete the second-to-last line.

    How did you create this file?

  • Thanks Clemens for reply.
    The hex file supplied by our Customer.

    After delete that line, that error went but new error appear:
    E:\Programs\MSP430Flasher>MSP430Flasher -n MSP430F5438A -w fw.hex -v -z [VCC]
    * -----/|-------------------------------------------------------------------- *
    * / |__ *
    * /_ / MSP430 Flasher v1.3.7 *
    * | / *
    * -----|/-------------------------------------------------------------------- *
    *
    * Evaluating triggers...done
    * Checking for available FET debuggers:
    * Found USB FET @ COM8 <- Selected
    * Initializing interface @ COM8...done
    * Checking firmware compatibility:
    * FET firmware is up to date.
    * Reading FW version...done
    * Setting VCC to 3000 mV...done
    * Accessing device...done
    * Reading device information...done
    * Loading file into device...
    # Exit: 59
    # ERROR: Could not erase device memory
    * Starting target code execution...done
    * Disconnecting from device...done
    *
    * ----------------------------------------------------------------------------
    * Driver : closed (Could not reset device)
    * ----------------------------------------------------------------------------


    Here is original instruction with TI_SmartRF Flasher software. I could not make it work, the refresh does not detect the MSP430 so I use the command line version to try.

    Link to the GUI instruction file.
    drive.google.com/.../view

    One more question:
    Does the MS-FET require external power supply to flash MSP430?

    Are the command line parameters correct?

  • Hi Toan Tran,

    Please take a look at this thread.

    Could it be that you are trying to write the INFOA or BSL memory without unlocking it? If so, use the -u (INFOA) or -b (BSL) switches to unlock them.

    To answer your other question: The MSP-FET is providing target VCC by default, so external power supply is not required for debugging. Should an external power source be connected, the MSP-FET will automatically detect this and shut down internal power supply to avoid damage to the target MSP.


    Hope this helps!

    Best regards,

    Robert

  • Thank Robert,
    Actually I followed Clement's instruction to remove the second last line in hex file and the CMD program ok.
    Now I have another issue.
    The Command line work ok, I can program, read, verify hex file.

    E:\Programs\MSP430Flasher>MSP430Flasher -n MSP430F5438A -w fw.hex -v -z [VCC]
    * -----/|-------------------------------------------------------------------- *
    *     / |__                                                                   *
    *    /_   /   MSP430 Flasher v1.3.7                                           *
    *      | /                                                                    *
    * -----|/-------------------------------------------------------------------- *
    * Evaluating triggers...done
    * Checking for available FET debuggers:
    * Found USB FET @ COM8 <- Selected
    * Initializing interface @ COM8...done
    * Checking firmware compatibility:
    * FET firmware is up to date.
    * Reading FW version...done
    * Setting VCC to 3000 mV...done
    * Accessing device...done
    * Reading device information...done
    * Loading file into device...done
    * Verifying memory (fw.hex)...done
    * ----------------------------------------------------------------------------
    * Arguments   : -n MSP430F5438A -w fw.hex -v -z [VCC]
    * ----------------------------------------------------------------------------
    * Driver      : loaded
    * Dll Version : 30501001
    * FwVersion   : 30501001
    * Interface   : TIUSB
    * HwVersion   : U 3.0
    * JTAG Mode   : AUTO
    * Device      : MSP430F5438A
    * EEM         : Level 7, ClockCntrl 2
    * Erase Mode  : ERASE_ALL
    * Prog.File   : fw.hex
    * Verified    : TRUE
    * BSL Unlock  : FALSE
    * InfoA Access: FALSE
    * VCC ON      : 3000 mV
    * ----------------------------------------------------------------------------
    * Starting target code execution...done
    * Disconnecting from device...done
    * ----------------------------------------------------------------------------
    * Driver      : closed (No error)
    



    However I can not make it work with SmartRF Flash software, when I click the "Refresh" button nothing happen, the software does not see the MSP430.
    What is wrong with SmartRF?

    Here is the connection between TI_MSPFET and the MCU. (use 8 wires)

**Attention** This is a public forum