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.

LMFLASHPROGRAMMER File Access Error

Other Parts Discussed in Thread: LMFLASHPROGRAMMER, TM4C129ENCPDT, EK-TM4C1294XL

Hello

I am trying to use LMFlash programmer to program an TMS4C129ENCPDT processor.

I can use the User Register programming section to correctly set the MAC address for my board.

However whenever I attempt to write the bin file I have generated from my code, I just get the popup window

**ERROR**;File access error!

I am using an ICDI board to interface to the JTAG and I can program the board from within the IDE, it just won't work with LMFLASHprogrammer.

I am using manual configuration specified as

ICDI (Eval Board)

Port:JTAG

Speed: 1000000

Crystal value: 25MHz

As a programming tool this application seems very unreliable and error message is extremely vague as to why it doesn't like the file.

File is in a full read write directory, it is in a simple path.

Doesn't matter where the file is located I get the same error.

I am using latest build 1613.

Is there a better programming utility that this or a known issue?

  • Hi,

    1. TMS4C129ENCPDT? Are you sure this the Tiva MCU you are using. So far I can not find anything about it in the internet
    2. Are you using a custom Tiva Board?
    3. Does the same error happen with Tivaware example program like blinky?
    4. What is your PC operating system?

    - kel

  • Hi Markel,

    Markel Robregado said:
    TMS4C129ENCPDT? Are you sure this the Tiva MCU you are using. So far I can not find anything about it in the internet

    You can find out it here:

    and it is present as link on this page: www.ti.com/.../EK-TM4C129EXL

  • Doesn't that particular poster - most always - advise, "Do a Search?"

    Do a "thorough/proper" Search may prove more effective...
  • Hello Barry

    This is the first time I have seen this issue. Can you confirm if the file is actually in bin file format. Load it in a hex viewer and send a snapshot of the first few lines in hex viewer

    Regards
    Amit
  • Hello Amit

    I have found what the issue is.

    My linker is generating a binary file which is 524Kb in size because it is also including the vector table in the binary file generation.

    LMFLASHPROGRAMMER reports file access error rather than file too large.

    Now just have to find out how to get the compiler/linker to correctly generate the file so the hex2bin only takes the rom code to the binary.

    Regards

    Barry

  • Hello Barry

    What is the toolchain being used? I think a similar issue has been reported on the CCS Forum with the resolution.

    Regards
    Amit
  • I am using the TI tools, ccsv6 compiler version 5.2.4
    The only solution I found related to a project using the RTSC.
    My project is not using any of the bios features.

    Trying the solution on the forum added RTSC to my project and created a bunch of other errors.
    I have restored from CVS again (Thank goodness for built in CVS) and searching to see if I can find how to get the compiler to correctly exclude the vector table from the binary without resorting to RTSC project.
  • Hello Barry,

    Can you share the project as well, I can also try to check it up for you?

    Regards
    Amit
  • From what I have seen, it looks like changes in the linker file fix the issue.
    However the examples don't seem to relate to what I am doing.

    I am using a slightly modified version of the standard file.
    This is because my application is a bootloader and only should use the bottom section of flash.
    With the bulk of flash saved for the main application.

    I checked the current examples in CCSV6 and I match them.
    Perhaps you can see something obvious I am doing wrong.

    /******************************************************************************
    *
    * Default Linker Command file for the Texas Instruments TM4C129ENCPDT
    *
    * This is derived from revision 11167 of the TivaWare Library.
    *
    *****************************************************************************/

    --retain=g_pfnVectors

    MEMORY
    {
    FLASH (RX) : origin = 0x00000000, length = 0x00008000
    PROG_FLASH (RX) : origin = 0x00008000, length = 0x000F8000
    SRAM (RWX) : origin = 0x20000000, length = 0x00040000
    }

    /* The following command line options are set as part of the CCS project. */
    /* If you are building using the command line, or for some reason want to */
    /* define them here, you can uncomment and modify these lines as needed. */
    /* If you are using CCS for building, it is probably better to make any such */
    /* modifications in your CCS project and leave this file alone. */
    /* */
    /* --heap_size=0 */
    /* --stack_size=256 */
    /* --library=rtsv7M4_T_le_eabi.lib */

    /* Section allocation in memory */

    SECTIONS
    {
    .intvecs: > 0x00000000
    .text : > FLASH
    .const : > FLASH
    .cinit : > FLASH
    .pinit : > FLASH
    .init_array : > FLASH

    .vtable : > 0x20000000
    .data : > SRAM
    .bss : > SRAM
    .sysmem : > SRAM
    .stack : > SRAM
    }

    __STACK_TOP = __stack + 512;

    //__STACK_TOP = __stack + __STACK_SIZE;
  • If I modify the tiobj2bin.bat file and remove the -image switch I get a small binary file about the size I expect

    %hexcmd% -q -b -o %binfile% %hextmp% %outfile%
    rem %hexcmd% -q -b -image -o %binfile% %hextmp% %outfile%

    However LMflashprogrammer doesn't seem to work correctly.
    I have set the configuration to manual using ICDI, JTAG at 1M with Crystal frequency set to 25MHz (Also tried clock of 5MHz)
    If I click the erase button on flash utilities it says erase worked but blank check failed at 0 .
    However then clicking on the blank check button says blank check is okay (goes through from 0 to 100%).
    Going to the program tab sheet, the file now loads but I get "programming error 0x1"

    I tried using the red probe but LMflashprogrammer doesn't even find target with this.
    I did a reinstall of LMFlash programmer, same result doesn't program.
    I tried dropping the JTAG and clock source frequencies, still doesn't work.
    CCSV6 programs fine through either ICDI or redcode interfaces on the same PC.

    Other utilities tab correctly reads / writes the MAC address from the user registers.
    ICDI has the latest firmware in it (12630)
  • Just a further update Amit

    I was using a EK-TM4C1294XL Rev 4 board for its ICDI interface and having all sorts of issues with the LMFlash programmer.

    I switched back to an older BD-ICDI-C board and now it programs and verifies all fine at sensible clock rates.
    Seems there is either some firmware incompatibility or hardware difference?

    The main difference I can tell between these two interfaces is the BD-ICDI-C actually uses the FTDI drivers from TI and not the ICDI drivers which is what the EK-TM4C129XL uses.

    Is it possible there is an issue with LMFlashprogrammer when it comes to the ICDI interface, or an actual issue with the ICDI drivers?

    Is there anywhere I can find information on writing my own application to do the programming using the Ti drivers?
  • Hello Amit

    Switching back to older FTDI driver ICDI board (BD-ICDI-C) allows LMFlashprogrammer to work correctly and program the processor.
    This has driver version 2.8.14.0 and only appears as an ICDI com port on the PC (Windows 8.1 64 bit).

    EK-TM4C129XL board with the ICDI drivers will not do the programming and only do the blank check with very low clock rates of around 50kHz. This appears as a serial port, an ICDI device and a JTAG device in device manager on the PC.

    Both boards do the User register programming of MAC address correctly.
    This has been Verified by having my code check for a valid MAC address in the user registers when it is running.

    Not sure if this is an indication of issues with LMFlashProgrammer and the ICDI driver or an issue with the EK-TM4C129XL interfacing to TM4C129ENCPDT processor.
  • Hello Barry

    1. The steps to build a binary in CCS have to be added to the Build -> Steps -> Post-Build Steps as

    "${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"

    2. How have you connected the debugger to the board. if it is free wires then you may want to make sure to reduce the length of the wires and see if Pull control resistors are correctly installed.

    Regards
    Amit
  • Amit Ashara said:
    Hello Barry

    1. The steps to build a binary in CCS have to be added to the Build -> Steps -> Post-Build Steps as

    "${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"

    2. How have you connected the debugger to the board. if it is free wires then you may want to make sure to reduce the length of the wires and see if Pull control resistors are correctly installed.

    Regards
    Amit

    That is the exact post install command I have been running.

    Within the batch file that this calls it uses the -image option to call the conversion to binary, this generates the 524KB file.

    If I remove the -image option I get a 23KB file which LMFLashProgrammer doesn't complain about.

    I have connected to target using a ribbon cable 150mm long (6 inches).

    This works fine with the BD-ICDI-C board (which uses FTDI drivers) but fails with the EK-TM4C1294XL Rev D ICDI which uses the ICDI drivers.

    I have also tried a 50mm (2 inch) ribbon.

    Both cables work with the FTDI driver board but fail with the ICDI driver board.

    I tried adding additional pull up resistors to the ICDI driver board, this made no impact on operation.

  • Hello Barry,

    That is strange as I have been using the same for quite a long time w/o having seen an issue. Could it be because of a known bug in the 5.2.4 (I migrated from 5.2.3 to 5.2.5 never having used 5.2.4) version that you may be using?

    Since part of the LMFlashProgrammer works well and part does not, can you try to uninstall and delete the drivers and then do a fresh install of the stellaris_icdi_drivers?

    Regards
    Amit