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.

TMS320F28027F: After Enabling Hex Utility and selecting output format as --ti-txt,many warnings are generated related to unconfigured memory

Part Number: TMS320F28027F
Other Parts Discussed in Thread: UNIFLASH

I am using Instaspin project lab_10a.

warning: section IMD_V0.9a.out(ramfuncs) at 07e0000h falls in
unconfigured memory (skipped)
warning: section IMD_V0.9a.out(.text) at 07e0f1ch falls in unconfigured
memory (skipped)
warning: section IMD_V0.9a.out(.cinit) at 07e755ch falls in unconfigured
memory (skipped)
warning: section IMD_V0.9a.out(codestart) at 07effech falls in
unconfigured memory (skipped)
warning: section IMD\_V0.9a.out(.econst) at 07ec000h falls in
unconfigured memory (skipped)

  • Have you made any edits to lab10a or do you get these errors with the original?

    See if this post helps:
    e2e.ti.com/.../441015

    Whitney
  • Whitney,

    I have made some edits, as of now.The original code was for RAM and I replaced linker command file from F28027F_RAM_Ink.cmd to F28027F.cmd to work with FLASH.I can easily program the board using CCS but want to program using GANG programmer that we recently purchased.I tried reinstalling CCS and motorwave but now it always work with FLASH now and give warnings if hex Utility is enabled.
  • Can you tell me what flags you're using with the hex utility?

    Whitney

  • I am enabling the C2000 Hex Utility and then in Output Format options I have selected TI-TXT hex format.

  • Thanks for the additional info. This sounds similar to this issue:

    e2e.ti.com/.../867010

    See if AartiG's comments help you.

    Whitney
  • Have you tried the suggestions in the post I shared? Were you able to solve this issue?

    Whitney
  • I tried but it still didn't work.Can you tell me the steps so that I can verify if I have done it correctly or not.The information is all confusing and scattered.

  • Are your memwidth and romwidth settings set to 16?

    Have you created a file containing a ROMS directive? Have you edited the command line pattern in the project properties to specify that file as shown in this wiki page?
    processors.wiki.ti.com/.../Hex_Utility_in_CCS

    In your ROMS directive, are your addresses and lengths in terms of 8 bits? Like "FLASH : origin = 0x7E0000" instead of "origin = 0x3F0000"?

    Whitney
  • Are your memwidth and romwidth settings set to 16?

    I have set it to 8.But for ti-txt format ,its default to 8 bit right?

    Have you created a file containing a ROMS directive?

    Contents of ROMS directive

    //-------------------------------------------------------------

    IMD.out /* input = executable object file */
    --ti_txt
    -o IMD.txt
    -order MS

    ROMS
    {
    FLASH: origin=0x7B0000, length=0x3FF00
    }

    //---------------------------------------------------------------------------------

    Have you edited the command line pattern in the project properties to specify that file as shown in this wiki page?

    Yes,I have modified the memory width and rom width to 8 as per the link.

    In Build->Post build steps:

    path/hex2000.exe path/mkhex.cmd  

    I still get the error that IMD.out  not found.If I check hex utility and add post build steps, then out file is not generated.

     

     

  • 8 is the default but I was under the impression that the GANG programmer required 16. You can contact the GANG programmer support here if you need more clarification: support@elprotronic.com

    Is there no .out because the link step is failing? Do you see any linking errors in the console? If mkhex.cmd is in your project, it's possible the linker is trying to use it as regular linker cmd file. Can you try giving it a different file extension than .cmd so the linker won't try to use it?

    Whitney
  • I have used the extension to .txt. The post built steps failed as permission is denied.


    Here is the console output.

    Building target: "IMD_V0.14.out"
    Invoking: C2000 Linker
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt -O2 --advice:performance=all --define=FLASH --define=FAST_ROM_V1p7 --define=F2802xF -g --diag_warning=225 --display_error_number --asm_listing -z -m"IMD_V0.14.map" --stack_size=0x200 --warn_sections -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/lib" -i"C:/Users/Admin/workspace_v8/IMD_V0.14/headers/" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --priority --reread_libs --disable_auto_rts --diag_suppress=16002 --xml_link_info="IMD_V0.14_linkInfo.xml" --rom_model -o "IMD_V0.14.out" "../2802xRevB_Fast_IQ_ROMSymbols.lib" "../2802xRevB_Fast_ONLY_ROMSymbols.lib" "../2802xRevB_Fast_RTS_ROMSymbols.lib" "../fast_public.lib" "../IQmath.lib" "./CodeStartBranch.obj" "./adc.obj" "./clarke.obj" "./clk.obj" "./cpu.obj" "./ctrl.obj" "./filter_fo.obj" "./flash.obj" "./fw.obj" "./gpio.obj" "./hal.obj" "./ipark.obj" "./memCopy.obj" "./offset.obj" "./osc.obj" "./park.obj" "./pid.obj" "./pie.obj" "./pll.obj" "./proj_lab10a.obj" "./pwm.obj" "./pwr.obj" "./svgen.obj" "./svgen_current.obj" "./timer.obj" "./traj.obj" "./usDelay.obj" "./user.obj" "./wdog.obj" "../F28027F.cmd" -llibc.a
    <Linking>
    Finished building target: "IMD_V0.14.out"

    Building files: "IMD_V0.14.out"
    Invoking: C2000 Hex Utility
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/hex2000" --map="IMD_V0.14.map" --memwidth=8 --romwidth=8 --ti_txt -o "IMD_V0.14.txt" "IMD_V0.14.out"
    Translating to TI-TXT format...
    "IMD_V0.14.out" .text ==> .text
    "IMD_V0.14.out" ramfuncs ==> ramfuncs
    "IMD_V0.14.out" .cinit ==> .cinit
    "IMD_V0.14.out" codestart ==> codestart
    "IMD_V0.14.out" .econst ==> .econst
    warning: section IMD_V0.14.out(.text) at 07e0000h falls in unconfigured memory
    (skipped)
    warning: section IMD_V0.14.out(ramfuncs) at 07e667ah falls in unconfigured
    memory (skipped)
    warning: section IMD_V0.14.out(.cinit) at 07e7596h falls in unconfigured memory
    (skipped)
    warning: section IMD_V0.14.out(codestart) at 07effech falls in unconfigured
    memory (skipped)
    warning: section IMD_V0.14.out(.econst) at 07ec000h falls in unconfigured
    memory (skipped)
    Finished building: "IMD_V0.14.out"

    C:\ti\ccsv8\tools\compiler\ti-cgt-c2000_18.1.2.LTS\bin\hex2000.exe C:\Users\Admin\workspace_v8\IMD_Pro35K_V0.14\mkhex.txt
    makefile:198: recipe for target 'post-build' failed
    fatal error: cannot open input file
    "C:\Users\Admin\workspace_v8\IMD_Pro35K_V0.14\mkhex.txt": Permission denied
    gmake[1]: [post-build] Error 1 (ignored)


    **** Build Finished ****

  • You shouldn't need to call hex2000 in a post-build step. Checking the "Enable C2000 Hex Utility" box should already cause hex2000.exe to run after the build.

    Add the file with the ROMs directive in the hex utility command-line pattern instead.

    Whitney

  • Building target: "IMD_V0.14.out"
    Invoking: C2000 Linker
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt -O2 --advice:performance=all --define=FLASH --define=FAST_ROM_V1p7 --define=F2802xF -g --diag_warning=225 --display_error_number --asm_listing -z -m"IMD_V0.14.map" --stack_size=0x200 --warn_sections -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/lib" -i"C:/Users/Admin/workspace_v8/IMD_V0.14/headers/" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --priority --reread_libs --disable_auto_rts --diag_suppress=16002 --xml_link_info="IMD_V0.14_linkInfo.xml" --rom_model -o "IMD_V0.14.out" "../2802xRevB_Fast_IQ_ROMSymbols.lib" "../2802xRevB_Fast_ONLY_ROMSymbols.lib" "../2802xRevB_Fast_RTS_ROMSymbols.lib" "../fast_public.lib" "../IQmath.lib" "./CodeStartBranch.obj" "./adc.obj" "./clarke.obj" "./clk.obj" "./cpu.obj" "./ctrl.obj" "./filter_fo.obj" "./flash.obj" "./fw.obj" "./gpio.obj" "./hal.obj" "./ipark.obj" "./memCopy.obj" "./offset.obj" "./osc.obj" "./park.obj" "./pid.obj" "./pie.obj" "./pll.obj" "./proj_lab10a.obj" "./pwm.obj" "./pwr.obj" "./svgen.obj" "./svgen_current.obj" "./timer.obj" "./traj.obj" "./usDelay.obj" "./user.obj" "./wdog.obj" "../F28027F.cmd" -llibc.a
    <Linking>
    Finished building target: "IMD_V0.14.out"

    Building files: "IMD_V0.14.out"
    Invoking: C2000 Hex Utility
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/hex2000" --memwidth=8 --romwidth=8 --ti_txt -o "IMD_V0.14.txt" "IMD_V0.14.out" "C:\Users\Admin\workspace_v8\IMD_V0.14\mkhex.txt"
    Translating to TI-TXT format...
    "IMD_V0.14.out" .text ==> .text
    "IMD_V0.14.out" ramfuncs ==> ramfuncs
    "IMD_V0.14.out" .cinit ==> .cinit
    "IMD_V0.14.out" codestart ==> codestart
    "IMD_V0.14.out" .econst ==> .econst
    warning: duplicate section name IMD_V0.14.out($build.attributes) (ignored)
    warning: duplicate section name IMD_V0.14.out(.cinit) (ignored)
    warning: duplicate section name IMD_V0.14.out(.text) (ignored)
    warning: duplicate section name IMD_V0.14.out(codestart) (ignored)
    warning: duplicate section name IMD_V0.14.out(ramfuncs) (ignored)
    warning: duplicate section name IMD_V0.14.out(.stack) (ignored)
    warning: duplicate section name IMD_V0.14.out(.ebss) (ignored)
    warning: duplicate section name IMD_V0.14.out(rom_accessed_data) (ignored)
    warning: duplicate section name IMD_V0.14.out(.econst) (ignored)
    warning: duplicate section name IMD_V0.14.out(.reset) (ignored)
    warning: duplicate section name IMD_V0.14.out(.debug_info) (ignored)
    warning: duplicate section name IMD_V0.14.out(.debug_line) (ignored)
    warning: duplicate section name IMD_V0.14.out(.debug_frame) (ignored)
    warning: duplicate section name IMD_V0.14.out(.debug_abbrev) (ignored)
    warning: duplicate section name IMD_V0.14.out(.debug_aranges) (ignored)
    warning: duplicate section name IMD_V0.14.out(.debug_pubnames) (ignored)
    warning: duplicate section name IMD_V0.14.out(.debug_pubtypes) (ignored)
    warning: section IMD_V0.14.out(codestart) at 07effech falls in unconfigured
    memory (skipped)
    warning: section IMD_V0.14.out(.econst) at 07ec000h falls in unconfigured
    memory (skipped)
    Finished building: "IMD_V0.14.out"


    **** Build Finished ****


    I am having these warnings now.
  • I suspect you're getting the "duplicate section name" warnings because you're specifying the .out file in both the mkhex.txt file and on the command line. Remove that line from mkhex.txt.

    The "falls in unconfigured memory" warning means you still need to adjust the origin and length values in the ROMs directive to cover that memory.

    Whitney
  • I am still not sure how to adjust the length and origin in ROMS directive.Can you suggest a document which explains this information.

    MAP file.zip

  • The best document for it is here:

    www.ti.com/lit/ug/spru513p/spru513p.pdf

    Looking at your .map file it's still not clear to me why you're still getting warnings. Can you share your current ROMS directive too?

    Whitney

  • mkhex.txt
    Fullscreen
    1
    2
    3
    4
    /*IMD_V0.14.out input = executable object file */
    --ti_txt
    -o IMD_V0.14.txt
    -order MS
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    ROMS directive

    Here are the build errors

    //----------------------------------------------------------------------------------------------------------

    Building target: "IMD_V0.14.out"
    Invoking: C2000 Linker
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt -O2 --advice:performance=all --define=FLASH --define=FAST_ROM_V1p7 --define=F2802xF -g --diag_warning=225 --display_error_number --asm_listing -z -m"IMD_V0.14.map" --stack_size=0x200 --warn_sections -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/lib" -i"C:/Users/Admin/workspace_v8/IMD_V0.14/headers/" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --priority --reread_libs --disable_auto_rts --diag_suppress=16002 --xml_link_info="IMD_V0.14_linkInfo.xml" --rom_model -o "IMD_V0.14.out" "../2802xRevB_Fast_IQ_ROMSymbols.lib" "../2802xRevB_Fast_ONLY_ROMSymbols.lib" "../2802xRevB_Fast_RTS_ROMSymbols.lib" "../fast_public.lib" "../IQmath.lib" "./CodeStartBranch.obj" "./adc.obj" "./clarke.obj" "./clk.obj" "./cpu.obj" "./ctrl.obj" "./filter_fo.obj" "./flash.obj" "./fw.obj" "./gpio.obj" "./hal.obj" "./ipark.obj" "./memCopy.obj" "./offset.obj" "./osc.obj" "./park.obj" "./pid.obj" "./pie.obj" "./pll.obj" "./proj_lab10a.obj" "./pwm.obj" "./pwr.obj" "./svgen.obj" "./svgen_current.obj" "./timer.obj" "./traj.obj" "./usDelay.obj" "./user.obj" "./wdog.obj" "../F28027F.cmd" -llibc.a
    <Linking>
    Finished building target: "IMD_V0.14.out"

    Building files: "IMD_V0.14.out"
    Invoking: C2000 Hex Utility
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/hex2000" --memwidth=8 --romwidth=8 --ti_txt -o "IMD_V0.14.txt" "IMD_V0.14.out" "C:\Users\Admin\workspace_v8\IMD_V0.14\mkhex.txt"
    Translating to TI-TXT format...
    "IMD_V0.14.out" .text ==> .text
    "IMD_V0.14.out" ramfuncs ==> ramfuncs
    "IMD_V0.14.out" .cinit ==> .cinit
    "IMD_V0.14.out" codestart ==> codestart
    "IMD_V0.14.out" .econst ==> .econst
    warning: section IMD_V0.14.out(.econst) at 07ec000h falls in unconfigured
    memory (skipped)
    Finished building: "IMD_V0.14.out"

    **** Build Finished ****

  • So that I can reproduce the same error diagnostics, I'd appreciate if you would also submit the file IMD_V0.14.out.  So the forum will accept it, please zip it up first.  If you are reluctant to post it to the forum, then please send it just to me, with the private messaging feature of the forum.  Hover your mouse over my name or avatar.  A box will pop up. Click on Send a private message. In the message compose interface which comes up, use the paper clip icon to attach the zip file.

    Thanks and regards,

    -George

  • The solution is to change your linker command file to put the output section .econst on page 0.

    Explanation ... The output section .econst is the only initialized section on page 1 which is in the memory range that should be converted by the hex utility.  Because it is on page 1, and not page 0, your current ROMS directive ...

    ROMS
    {
                FLASH:       origin=0x7a0000, length=0x8FF00
    }

    ... does not cover the .econst section.  That is why you get the diagnostic about how .econst falls in unconfigured memory.  You might consider changing the ROMS directive to this ...

    ROMS
    {
                FLASH:       origin=0x7a0000, length=0x8FF00
       PAGE 1 : FLASH_PAGE1: origin=0x7a0000, length=0x8FF00
    }

    That avoids the diagnostic, and .econst does get converted.  But not like all the other output sections.  Because it is on page 1, the hex utility puts the output for .econst in a separate file.  That does not solve the problem.

    So, the solution is to change the linker command file so the output section .econst is on page 0.

    Thanks and regards,

    -George

  • We have tried moving the output section.econst to page 0 .The code composer did not throw any warnings but GANG programmer did.I have attached the the modifications that we did and the error we got.

    Modifications.docxlinker command file.zip

  • We're aren't very familiar with the GANG programmer here. Please contact the Elprotronic support team for help debugging this issue. support@elprotronic.com

    Thanks,
    Whitney
  • Can you please confirm if the modifications that we have done are correct? Secondly do you provide any flasher tool like MSP flasher with which we can program the controller using ti-txt file.

  • Sorry but I accidentally clicked This resolved the issue.

  • Those changes seem fine. Does it make any difference to the GANG programmer if you change the romwidth and memwidth to 16?

    I believe the Uniflash tool supports ti-txt. Have you tried it?

    Whitney
  • Uniflash gives the following error irrespective of the mem/romwidth

    [8/24/2018, 5:24:22 PM] [ERROR] C28xx: File Loader: Verification failed: Attempted to read past the end of memory at 0x7E0000@Program
  • Hi Abhishek,

    Are you able to program your project within CCS using your modified linker command file? What about if you program the .out or .hex file using Uniflash, do the program and verify stages succeed?

    Best,
    Kevin

    P.S. Can you provide your .map and .hex files after building in CCS?

  • I am able to built the code and generate ti-txt file.But gang programmer and the uniflash gives an error when i upload the ti-txt file .Here are the files

    1565.files.zip

  • Kevin,
    This issue is still unresolved.
  • Whitney,
    I am able to built the code and generate ti-txt file.But gang programmer and the uniflash gives an error when i upload the ti-txt file .
  • Thanks for your patience. I'm exchanging some e-mails with the Uniflash and hex utility experts, trying to get to the bottom of this. We'll get back to you soon.

    Whitney

  • If you go into your ti-txt file and halve the addresses (0x7e0000->0x3f0000) will Uniflash let you load it?

    Whitney
  • Sorry for the late reply.But changing the address doesn't let me load the program.Any other suggestions.

  • What error message did you get? Was it the same one as before or a new one?

    Whitney
  • No,its a different error. Uniflash gave this error report .

    with address 0x3f0000 it says Attempted to write past the end of memory at  0x7effec@program

    with address 0x7f0000 it says Attempted to write past the end of memory at  0x7e0000@program 

  • Did you change all of the addresses in your hex file or only the first one? It sounds like you may have missed at least one.

    Whitney
  • I got the above error when iIchanged only one address.But after this error I check the memory map,it showed that other address was  out of bound.So I changed the other address too from 0x7effec to 0x3f7ff6.

    I am attaching 3 files.

    1> Original File generated by Code composer

    2< Replaced only 0x7e0000 by 0x3f0000

    3>Replaced  0x7e0000 by 0x3f0000 and 0x7effec by  0x3F7FF6  

    Error for 3

    [11/6/2018, 12:16:18 PM] [SUCCESS] Program Load completed successfully.
    [11/6/2018, 12:16:18 PM] [ERROR] C28xx: GEL: Error while executing OnFileLoaded( 0, 0): Could not read 0x003F7FFB@Data: target is not connected at XAR0=*(0x3F7FFB) [f28027.gel:549] at Device_Cal() [f28027.gel:68] at OnFileLoaded(0, 0)

    I have attached the 3 .txt files.Can you please check them

    1>1.txt

    2>2.txt

    3>3.txt

  • The fact that you got a success message is promising. Are you able to run the application from flash now?

    That other error message seems like it might be the issue mentioned in this thread:
    e2e.ti.com/.../726216

    Can you try the workaround Ricky suggested in that thread?

    Whitney
  • Yes it worked. Where should I change the address in code composer so that I don't have to modify the ti-txt file everytime?
  • Unfortunately right now there is no setting in CCS that can fix this. This is an inconsistency in the way ti-txt is generated. We've filed a bug to update the hex2000 documentation to call attention to this issue.

    Is it possible for you to use another format that doesn't have this problem (a format other than ti-txt or binary)? I know UniFlash accepts several other formats. If you plan on using a different programmer eventually, do you know if it supports other formats?

    If you need to stick with ti-txt, you could write a script that edits the addresses for you and set up your CCS project to run the script as a post-build step.

    Whitney