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: Programming error on Tiva TM4C123GH6PM part

Part Number: UNIFLASH
Other Parts Discussed in Thread: TM4C123GH6PM,

Posted this yesterday, but can't find the original post.

I am trying to program the Tiva TM4C123GH6PM part using Uniflash 5.1.0 GUI.  When it completes the programming, it attempts to read address 0x20008000, which is reserved memory, so an error is generated.

If I create a standalone command line version, it programs WITHOUT the error being generated.

I need to use the GUI.  Both methods *should* behave identically.

  • I can't explain the root cause of the verification error, but I can explain why you see the below discrepancy: 

    Nelson Norris said:

    If I create a standalone command line version, it programs WITHOUT the error being generated.

    I need to use the GUI.  Both methods *should* behave identically.

    The GUI always has data verification enabled. The default for the command line package is to have it disabled.

    If you look at the dslite.bat file in your generated standalone package, you will see the additional option used (line 14):

    -s VerifyAfterProgramLoad="No verification"

    To re-enable verification, you can remove that setting or set it to "Full verification" or "Fast verification". I believe the default is fast verification (same with the GUI).

    Thanks

    ki

  • Thank you for the response.

    This leads to the following questions:

    1. Why does the verification fail?  Again, the root problem is the GUI is attempting to access reserved memory.

    2. Why does the standalone command line tool use different settings than those set in the GUI?

    3. How can I disable the verification in the GUI?  I see no setting.

  • Nelson Norris said:
    1. Why does the verification fail?  Again, the root problem is the GUI is attempting to access reserved memory.

    The likely culprit is that the debugger (regardless of GUI or command line) is trying to access that memory region because the generated executable some code that is allocated for that memory. Please check the generated executable, confirm that the memory allocation for the sections are correct. A good place to start is the linker command file.

    Nelson Norris said:
    2. Why does the standalone command line tool use different settings than those set in the GUI?

    Originally the command line tool also had verification enabled. But the request came from customers to change the default to no verification to speed the flashing process up. Basically, customers felt verification is useful when flashing from the GUI but not needed as the default from command line.

    Nelson Norris said:
    3. How can I disable the verification in the GUI?  I see no setting.

    No such setting exists. Verification is always on.

    Thanks

    ki

  • Below are the contents of the linker .cmd file.  Please note that nothing is mapped to 0x20008000.

    /******************************************************************************
    *
    * Default Linker Command file for the Texas Instruments LM4F232H5QD
    *
    * This is part of revision 9385 of the Stellaris Peripheral Driver Library.
    *
    *****************************************************************************/

    --retain=g_pfnVectors

    /* 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=rtsv7M3_T_le_eabi.lib */

    /* The starting address of the application. Normally the interrupt vectors */
    /* must be located at the beginning of the application. */
    #define APP_BASE 0x00001800
    #define RAM_BASE 0x20000000

    MEMORY
    {
    FLASH (RX) : origin = 0x00001800, length = 0x0003E800
    SRAM (RWX) : origin = 0x20000000, length = 0x00007000
    STACK_SECTION (RW) : origin = 0x20007000, length = 0x00001000, fill = 0x1234
    }

    /* 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=0x800 */
    /* --library=rtsv7M4_T_le_eabi.lib */

    /* Section allocation in memory */

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

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

    __STACK_TOP = __stack + 4096;

  • Nelson Norris said:
    Below are the contents of the linker .cmd file.

    You original post shows two images being flashed - boot_serial_Tiva.out and V0_07_MSS_PIB_Tiva_Magneto.out. Which of the two images is the linker .cmd file from?

    Nelson Norris said:
    Please note that nothing is mapped to 0x20008000.

    Agree, but STACK_SECTION from addresses 0x20007000 ... 0x20007FFF with a fill ends just before the address 0x20008000. I had a go at creating a single image which had a stack fill to end of RAM but couldn't repeat the error with Uniflash 5.1.0.2397.

    Under the Uniflash options can you enable Debug Server Logging and attach the log file from when the error occurs? That might reveal why Uniflash is trying to read from address 0x20008000.

  • Here is the ds.log file.

    ds.log

    The linker .cmd file above is for V0_07_MSS_PIB_Tiva_Magneto.out.  

    The linker.cmd file for boot_serial_Tiva.out is below:

    /******************************************************************************
    *
    * bl_link_ccs.cmd - CCS linker configuration file for boot loader.
    *
    * Copyright (c) 2009-2010 Texas Instruments Incorporated. All rights reserved.
    * Software License Agreement
    *
    * Texas Instruments (TI) is supplying this software for use solely and
    * exclusively on TI's microcontroller products. The software is owned by
    * TI and/or its suppliers, and is protected under applicable copyright
    * laws. You may not combine this software with "viral" open-source
    * software in order to form a larger program.
    *
    * THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
    * NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
    * NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    * A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
    * CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
    * DAMAGES, FOR ANY REASON WHATSOEVER.
    *
    * This is part of revision 6288 of the Stellaris Firmware Development Package.
    *
    *****************************************************************************/

    --retain=Vectors

    /* 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=rtsv7M3_T_le_eabi.lib */

    /* System memory map */

    MEMORY
    {
    FLASH (RX) : origin = 0x00000000, length = 0x00010000
    SRAM (RWX) : origin = 0x20000000, length = 0x00010000
    }

    /* Section allocation in memory */

    SECTIONS
    {
    GROUP
    {
    .intvecs
    .text
    .const
    .data
    } load = FLASH, run = SRAM, LOAD_START(init_load), RUN_START(init_run), SIZE(init_size)

    GROUP
    {
    .bss
    .stack
    } run = SRAM, RUN_START(bss_run), RUN_END(bss_end), SIZE(bss_size), RUN_END(__STACK_TOP)

    }

  • Hi Nelson,

      The TM4C123GH6PM has only 32kB of SRAM. Therefore, the length is 0x8000. You specify 0x10000 (for 64kB). I think this is the reason for the Uniflash error. Please correct it and try again. Please note your flash size is also wrong. The TM4C123GH6PM  has 256kB of flash. You specify 0x10000 which is again 64kB only. Should be 0x40000. 

  • Nelson,

    Charles is correct. The second cmd file you posted looks incorrect for your device (the first one looks correct as I believe LM4F232H5QD is similar to the TM4C123G).

    Thanks

    ki

  • I agree that the mappings are not correct, but we are using the boot_serial_Tiva.out file with multiple processors.  And since the maximum RAM and Flash is not being used, these lines are not an issue.

    The issue is with the following line: 

    STACK_SECTION (RW) : origin = 0x20007000, length = 0x00001000, fill = 0x1234

    If I change the length to 0x00000FFF, then it programs without any errors

    STACK_SECTION (RW) : origin = 0x20007000, length = 0x00000FFF, fill = 0x1234

    The original line is correct and valid.  It is filling RAM from 0x20007000 - 0x20007FFF with the value of 0x1234.

    I program these files all the time with CCS v5.5 and there are no issues.  Somehow Uniflash thinks it is trying to go from 0x20007000 - 0x20008000.

  • Can you provide both *.out files being used? Please start a private conversation with me if you wish to share privately

  • Trying to private message you but I keep getting the following error message:

    Sorry, there was a problem with your last request!

    Either the site is offline or an unhandled error occurred. We apologize and have logged the error. Please try your request again or if you know who your site administrator is let them know too.

  • I zipped the two files and sent them privately.

  • Thanks Nelson. I got them.

    The error seems to be coming from V0_07_MSS_PIB_Tiva_Magneto.out. When I load that one, I get the verification error.

    The odd thing is when I load the same file with CCS 9.2, with FULL verification on, it is successful. When I manually run a full verification on the file afterwards, it succeeds again.

    Now the weird thing is that the after the error in UniFlash, when I run a manual verification, it is successful!

      

    I'm not sure why Uniflash is getting the issue just on the program load (while the subsequent manual verify step succeeds). Your ds log certainly shows uniflash trying to read that address on load.

    I will need to escalate this to the engineering team for more analysis. I will keep you posted

    Thanks for providing all the data we need to continue our analysis.

    ki

  • I filed a bug for this. Tracking ID: UNIFLASH-1320

  • Any update on this issue?  How can I track the status of the issue you logged?

    Nelson

  • It is still under investigation. The Bug ID has changed to CCBT-2551. The public tracking link to it is: 

    cqweb.ext.ti.com/.../CCBT-2551