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.

TMS320F28035: Uniflash generates errors with hex files, fails to lock the device with .out files

Part Number: TMS320F28035
Other Parts Discussed in Thread: UNIFLASH

This is with regards to the following thread:
 

When I go back to the device I had programmed before, I can verify the image without entering the CSM passcode. I am still curious why the hex file does not seem to work as well. 

Summarizing:

1. The application requires the flash to be protected

2. The device does not program and or verify with a generated hex file via CCS

3. The programming and execution of the image works fine with a .out file, however the flash does not seem to be protected. I can verify the code without entering any passcode.

Could you please try to reproduce the issue on your end? You will not need any special code - the simplest blinky example is what I am using.

Thank you!

  • Lenio,

    It sounds like you are asking 2 separate questions, so I will try to address each separately.

    A. "UniFlash generates errors with hex files"

    Is this the same issue as the one you were discussing on e2e.ti.com/.../2954033 already? Ie; the hex file is loading and verifying correctly, but it does not run correctly?

    B. "Fails to lock the device with .out files"

    Does the .out file program the password locations (0x3F7FF8-0x3F7FFF)? Can you see if the data is programmed at those addresses? You can use the Memory view in UniFlash to view that part of the memory. The memory should be viewable if the device is not locked.

    Thanks,
    Ricky
  • HI Ricky,

    yes, those questions are all related (difficult to track because my customer is using a third party and the development is happening in different sites).

    A. The hex file generation is still an issue. I cannot get it to work. I do not have any evidence that the hex file is loading correctly. Once I try to program it, I keep on getting errors. The reading of the memory shows zeroes and the program does not execute. I repeat the process with a .out and I verify execution without issues.

    B. I still have a problem, but I found an issue in my procedure. I was first programming the password and then loading the image, without realizing that sector A was getting erased in the process. Once I reverted those two steps, I verified that the device was locked. I can never read any content at the password location though - it always reads zeroes - is that correct?

    From "B" I have a follow up question: Uniflash does not seem to be able to program the device if I keep sector A preserved, e.g., if I uncheck the box for erasing. If I do erase sector A, I need to reprogram the password every time. Is that the normal procedure?

    Thank you!
  • Lenio,

    A. I don't have much experience with the C2000 Hex generator, so I'm not really sure what the issue might be. From UniFlash's perspective, when you select a hex file to load, it will parse the hex file and then load the data from it similar to an .out file. So if the hex file is in the right format (addressing, endianess, etc.), it should load the same way as an out file.

    B. When the device is locked, the memory will read out all 0x0 until it is unlocked.

    UniFlash will not be able to program flash memory that has already been programmed, so if you are loading data to memory addresses that have been written to on sector A, you will need to erase sector A first. This will erase the password as well.

    Alternately, you can also code your password into your program file; this way, you can load your program and password at the same time.

    Thanks,
    Ricky
  • Ricky,

    A. Should I contact the CCS group to understand whether the issue is with the compiler? Do you have a way of trying to reproduce the issue?

    B. I am unlocking the device but still read zeroes.