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.

TM4C1294KCPDT: "armhex" output or "lm flash programmer" are sending a bad binary, it appears as a bad memory alignment into device flash at some point.

Part Number: TM4C1294KCPDT
Other Parts Discussed in Thread: UNIFLASH, EK-TM4C1294XL

How can I fix this? Need help!

We can see it start at $C$L1, the first one is the one after LM Flasher is done and it's not working after a reset (Fault ISR).

This one is after I programmed it with XDS110 probe and it's working after a reset.

I'm a missing a parameter in armhex or it is a bug with this type of MCU?

I tried many (fill, binary, memwidth=32), none of them have fix it yet.

  • Hi,

      I'm not fully clear with your question. Can you answer me a few questions so I'm on the same page with your finding.

      - Here you are showing $C$L1 in the memory browser window. This is a debug symbol. What program image format are you trying to load? is it a .hex or a .bin or a .out? You should not see the debug symbols if you load a .hex or a .bin file unless you later on do a 'Load Symbol'. Only .out contains debug symbols, not .bin or .hex. Can you clarify?

      - Do you mean to say you are using the LM flash programmer (the download tool) and ICDI (the debug probe) to load the hex file? 

      - You said using LM flash programmer to load the hex file creates a wrong program image when you view in CCS memory browser? Is that your finding?

      - Have you tried to use Uniflash to load the same hex file? Uniflash supports both ICDI and XDS110 debug probes and several others. Please see below an example loading a .hex file. Suppose you were trying to load a hex file. Can you repeat the same problem when using Uniflash? The reason is that LM flash programmer can only load the .bin file. If you want to load a hex file, you can use either the CCS or Uniflash. Uniflash is a stand-alone flash programmer tool that supports various debug probes. LM flash programmer only supports ICDI and it can only load .bin file successfully. 

      - LM flash programmer does not support XDS110. However, you said using XDS110 works. This means you are using a different flash programmer which is not LM flash programmer. I assume you use either the CCS or Uniflash. Is that correct?

      - Can you provide the full armhex command?

       

  • Hi,

    First, programming with a probe XDS110, using CCS or UniFlash are working well. No issue at all with .out.

    The problem is using LM Flash programmer with the bootloader from "TivaWare_C_Series-2.2.0.295".

    For the figure, I did load the .out with XDS110, this is how I got the symbol. Then I have downloaded the bin into the flash with LM flash programmer. I restarted the probe with symbol only. This is how I've been able to see the discrepancy between the .out and .bin. And I ensure both .bin and .out where not updated in between.

    I'm using LM flash programmer (build 1613) with a .bin (generated by armhex) not a hex file. Hex file do not seem to be supported. I tried, but the acsii stuff have been written into the flash! I've been using .out for XDS110.

    Yes, but I think the problem is into the .bin itself. Look like a filling issue after a 16-bit variable $C1$L1.

    armhex" --linkerfill --memwidth=32 --romwidth=32 --diag_wrap=off --binary -o "Test.bin"  "Test.out" 

  • Hi,

    First, programming with a probe XDS110, using CCS or UniFlash are working well. No issue at all with .out.

    This is expected to work. No issue here.

    The problem is using LM Flash programmer with the bootloader from "TivaWare_C_Series-2.2.0.295".

    For the figure, I did load the .out with XDS110, this is how I got the symbol. Then I have downloaded the bin into the flash with LM flash programmer. I restarted the probe with symbol only. This is how I've been able to see the discrepancy between the .out and .bin. And I ensure both .bin and .out where not updated in between

      Basically, you are saying the .bin file produces different flash image compared to .out file, correct? 

      Can you import the TivaWare hello example at C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hello. Look under the CCS Build steps for generating .bin file. See below.   As you can see, it is quite different in the way the .bin file is generated vs yours. I will suggest you use the same steps to generate your .bin file. Give it a try and does it fix the problem?

  • If you build the hello project you would have seen the below commands in the post process step. I'm using CCS10. 

    "C:/ti/ccs1011/ccs/utils/tiobj2bin/tiobj2bin" "hello.out" "hello.bin" "C:/ti/ccs1011/ccs/tools/compiler/ti_cgt-arm_18.12.0.LTS/bin/armofd" "C:/ti/ccs1011/ccs/tools/compiler/ti_cgt-arm_18.12.0.LTS/bin/armhex" "C:/ti/ccs1011/ccs/utils/tiobj2bin/mkhex4bin"

  • This is what I'm was looking for. I didn't know where to find it.

    It works well now, and the flash is now the same as the .out.

    It could be interesting to add some information into the help of LM Flash Programmer in the program tab how to do it correctly or in which example to look for.

    Thanks,