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.

UniFlash odd problem with flashing bootloader

Other Parts Discussed in Thread: UNIFLASH, MSP430F5310, MSP430F5528

I'm using CCS to develop a bootloader for MSP430.  I can flash that from within CCS. 

When using UniFlash commandline, like this:

/opt/ti/ccsv6/ccs_base/scripting/examples/uniflash/cmdLine/uniflash.sh \
  -ccxml targetConfigs/MSP430F5310.ccxml \
  -setOptions MSP430UnlockBSLMode=true \
  -program Debug/BSL.hex

I get the following results:

1. I can uniflash a non-bootloader always without problems

2. I can uniflash a bootloader successfully if the exact same hex file was flashed in CCS just before

3. If I try to uniflash any bootloader hex file that was not just flashed in CCS before, for example this very simple test file

:0410100000080800CC
:101042000A141F431F52801C1E42801C5C4E030068
:00000001FF

It always fails, with this error:

SEVERE: MSP430: File Loader: Data verification failed at address 0x00001048 Please verify target memory and memory map.
SEVERE: MSP430: GEL: File: test.hex: a data verification error occurred, file load failed
SEVERE: File: test.hex: a data verification error occurred, file load failed.
SEVERE: Error loading "test.hex": File: test.hex: a data verification error occurred, file load failed.

What is going on, and how do I fix it?

Environment: CCS 6.1, Ubuntu 14.04LTS, MSP430F5310

  • Alex Izvorski said:
    It always fails, with this error:
    SEVERE: MSP430: File Loader: Data verification failed at address 0x00001048 Please verify target memory and memory map.

    Address 0x00001048 is in the BSL memory of a MSP430F5310.

    Looking at the available MSP430 properties for a MSP430F5310 in Uniflash 3.4.0 shows that the "Allow Read/Write/Erase access to BSL memory" option is grayed out and therefore can't be selected. I think this is why Uniflash doesn't allow the BSL memory to be programmed, but not sure if this is a bug or intentional limitation in Uniflash.

    When you successfully program a bootloader in CCS is the "Allow Read/Write/Erase access to BSL memory" option selected in the CCS project properties?

  • Hi Chester,

    Yes the "Allow Read/Write/Erase access to BSL memory" is selected in CCS.  Without that it reports an error.

    Interesting, I'm using the commandline, didn't even realize there was a GUI :)

    Thanks,
    -Alex

  • Alex Izvorski said:
    Interesting, I'm using the commandline, didn't even realize there was a GUI :)

    Try adding the following to the Uniflash command line:

    -setOptions MSP430UnlockBSLMode=true

    With that change checked that Uniflash could successfully read form the BSL memory on a MSP430F5528. I haven't tried a write to the BSL memory from the Uniflash command line as don't have a suitable bootloader.

    [Without the option Uniflash read the BSL memory as 0x3fff which means access to BSL memory wasn't allowed]

  • Hi Chester - I already was using "-setOptions MSP430UnlockBSLMode=true" on the command line, it wasn't working even with that.

    If re-writing memory with the same values as it already has (if it was flashed in CCS) then it appears to succeed.
    -Alex