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.

LM FLASH PROGRAMMER **ERROR**:File access error

Other Parts Discussed in Thread: TM4C129ENCPDT

Hello

I am attempting to program a binary file into a TM4C129ENCPDT processor using LM Flash programmer build 1613

I am using a mikroprog ICDI device to program the processor.

I can program the user registers using the other utilities tab.

I can erase the entire flash using the flash utilities tab.

However when I try to burn the .BIN file I get the error message

 

I have tried locating the file in root folder, there are no spaces in the file name.

I am running under windows 8.1 64 bit.

I can program the processor using CCSV6 and the ICDI interface and also using CCSV6 and Blackhawk Red probe.

I have tried slowing the clock frequency down with no effect.

BIN file is generated using tiobj2bin as a post build step

"${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

  • Hello Barry,

    Are you using a TI evaluation board or a custom board? To isolate the issue, I would recommend that you:

    • First program the binary into a TI evaluation board using the on-board ICDI interface.
    • If the previous step is successful, try programming the same image on the same TI board with mikroprog ICDI.

    If you have alredy tried the above steps, please share the results so that we try to recreate the issue.

    Thanks,

    Sai

  • Hello Sai

    Overnight I have worked out that it must be the bin file is too big and that's what the error means.

    So now I need to determine why the recommended BIN file creation post build step is including RAM addresses into the BIN file creation.

    I tried a small hex file and LM Flash programmer was happy to try and burn it, so as file is 524K in size I am guessing that it doesn't like that for the TMS4C129ENCPDT

    Regards

    Barry

  • Hello Barry,

    I don't think it is the size of the bin file as TM4C129ENCPDT should have 1MB of flash size. Although I did not try burning a file of size 524K, I did program the "enet_io.bin" file, which is 491KB, into Crypto Connected LaunchPad board (which has the same device) using LM Flash Programmer.

    Can you confirm that you are able to program the "enet_io.bin" file? If this is successful, then the issue could be with the .bin file generation process.

    Thanks,
    Sai
  • Hello Sai

    Thanks for the prompt response

    I had my build targeting the debug build which includes
    C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b/grlib/debug/grlib.lib
    C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b/driverlib/debug/driverlib.lib

    This generates a bin file of 524kB

    I changed to release configuration as the active Configuration which includes
    C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b/grlib/rvmdk/grlib.lib
    C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b/driverlib/rvmdk/driverlib.lib

    This generates a bin file of 21kB and also a bunch of warnings about creating sections without a SECTIONS specification.
    Not sure what these are caused by, am doing some research to work it out (Maybe I need to rebuild the library for release?)

    However if I burn the release BIN this works fine with LM Flash Programmer and my code runs.

    Regards
    Barry
  • Hello Sai

    I could not find out how to rebuild the Tivaware grlib and driverlib
    Instead I changed my release build to also include
    C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b/grlib/ccs/Debug/grlib.lib
    C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b/driverlib/ccs/Debug/driverlib.lib

    Now I don't get the warnings anymore and the BIN file is only 20k.
    Building the debug configuration gives me a file of 524K which won't work with LM Flash programmer.
    Only difference I can observe in the settings is -O2 in the compiler optimisation.
    At least it is now working.
    Would be good to understand exactly the difference so I don't hit this issue again.

    Regards
    Barry
  • Just some further information

    I found the only difference between the linking for the DEBUG configuration and the RELEASE configuration is the -g switch for the linker.
    I cannot find where in the project this is set by the debug configuration. Both release and debug appear to have the same settings.

    However the -g flag seems to make the BIN file generate for both ROM and RAM addresses.
  • Hello Barry,

    From the information you provided, 524KB binary file should not be generated. That is clearly a mistake. I have double checked and the post build command look correct.

    If you are using Code Composer Studio toolchain, then you must use the library file only under "ccs/Debug" folder of the library. You should not be rebuilding these libraries, unless you had to change the source code.

    I have not used the RELEASE configuration so cannot comment much on it. But I did use the DEBUG configuration on a TI-RTOS project, which generates .bin file. The name of the project is "Secure IoT Demo v1.0.0.7" and is located here: www.ti.com/.../ek-tm4c129exl. You can refer the settings of this project if you have more questions.

    Hope this information helps!

    Thanks,
    Sai
  • Hello Sai

    Thanks for confirming the library files I should be including.
    I have now eliminated the -g flag as being anything to do with the generation of the 524k file.
    I have been through each setting for my release vs debug and can find no difference, but the output binary file still gets generated as 524k

    I got your project and did comparisons and cannot find any differences other than my install folder paths.

    Even map files look very similar.

    Not sure where to look now.

    Regards
    Barry
  • Hello Sai

    Finally found the difference.
    My Debug version had Initialisation module in the "Runtime Environment" set to Link using RAM model, the other targets had link using ROM model.
    This is why bin file was so large.

    Thanks for your assistance.

    Regards
    Barry
  • Hello Barry,

    Good work in finding out the solution. I really appreciate you taking time to post the solution on the forum. This will help others how might have similar issue in future.

    Regards,
    Sai